From 4343955f31750086d0dee7e8da087ecb1ccfb287 Mon Sep 17 00:00:00 2001 From: Rainer Zaiser Date: Wed, 11 Dec 2024 19:53:40 +0100 Subject: [PATCH] workflows updated --- .github/workflow | 68 ----------------------------------- .github/workflows/default.yml | 56 +++++++++++++++++++++++++++++ .gitignore | 11 ++---- 3 files changed, 59 insertions(+), 76 deletions(-) delete mode 100644 .github/workflow create mode 100644 .github/workflows/default.yml diff --git a/.github/workflow b/.github/workflow deleted file mode 100644 index 1246294..0000000 --- a/.github/workflow +++ /dev/null @@ -1,68 +0,0 @@ -name: XCP_lite Default - -on: - workflow_dispatch: - push: - branches: ["**"] - tags: ["**"] - -concurrency: - group: ${{ (github.ref == 'refs/heads/main') && 'main' || format('{0}-{1}', github.workflow, github.ref) }} # concurrency does not include main branch - cancel-in-progress: true - -jobs: - lint: - name: Lint - runs-on: [production] - steps: - - uses: actions/checkout@v3 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - bins: cargo-make - components: clippy - - name: Run linter - run: cargo clippy - build: - name: Build - runs-on: ${{ matrix.os }} - needs: [lint] - strategy: - matrix: - os: [production] - fail-fast: false - steps: - - uses: actions/checkout@v3 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: rustfmt - - name: Build binary - run: | - cargo build --verbose - test: - name: Test - runs-on: ${{ matrix.os }} - needs: [build] - strategy: - matrix: - os: [production] - fail-fast: false - steps: - - uses: actions/checkout@v3 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - bins: cargo-make, cargo-nextest - - name: Run tests - run: | - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_single_thread - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_multi_thread - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_registry_2 - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_registry_1 - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_attribute_macros - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_calibration_segment_basics - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_calibration_segment_persistence - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_cal_page_switch - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_cal_page_freeze - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_cal_page_trait - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_daq_register - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_daq_capture - cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture --test test_a2l_local_variables_capture diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml new file mode 100644 index 0000000..349b1ee --- /dev/null +++ b/.github/workflows/default.yml @@ -0,0 +1,56 @@ +name: XCP_lite Default + +on: + workflow_dispatch: + push: + branches: ["**"] + tags: ["**"] + +concurrency: + group: ${{ (github.ref == 'refs/heads/main') && 'main' || format('{0}-{1}', github.workflow, github.ref) }} # concurrency does not include main branch + cancel-in-progress: true + +jobs: + lint: + name: Lint + runs-on: [ubuntu-22.04] + steps: + - uses: actions/checkout@v3 + - uses: moonrepo/setup-rust@v1 + with: + bins: cargo-make + components: clippy + - name: Run linter + run: cargo clippy + build: + name: Build + runs-on: ${{ matrix.os }} + needs: [lint] + strategy: + matrix: + os: [ubuntu-22.04, macos-13, macos-14, windows-2022] + fail-fast: false + steps: + - uses: actions/checkout@v3 + - uses: moonrepo/setup-rust@v1 + with: + components: rustfmt + - name: Build binary + run: | + cargo build --verbose + test: + name: Test + runs-on: ${{ matrix.os }} + needs: [build] + strategy: + matrix: + os: [ubuntu-22.04, macos-13, macos-14, windows-2022] + fail-fast: false + steps: + - uses: actions/checkout@v3 + - uses: moonrepo/setup-rust@v1 + with: + bins: cargo-make, cargo-nextest + - name: Run tests + run: cargo test --features=a2l_reader --features=serde -- --test-threads=1 --nocapture + diff --git a/.gitignore b/.gitignore index 6187d5f..ec5a158 100644 --- a/.gitignore +++ b/.gitignore @@ -25,11 +25,8 @@ xcp_client.a2l xcp_client_autodetect.a2l test_single_thread.a2l test_multi_thread.a2l -test_tokio_single_thread.a2l -test_tokio_multi_thread.a2l - +tokio_demo_autodetect.a2l xcp_benchmark.a2l - hello_xcp.a2l tokio_demo.a2l rayon_demo.a2l @@ -38,7 +35,5 @@ mandelbrot.a2l mandelbrot.png multi_thread_demo.a2l single_thread_demo.a2l -/examples/point_cloud_demo/CANape/~CANapeCurrentCfg.gvc -/.github/workflows/default.yml -/multi_thread_demo_autodetect.a2l -/examples/tokio_demo/tokio_demo_autodetect.a2l +multi_thread_demo_autodetect.a2l +