Add probe-rs-tester-0 (#2847) #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: [master, staging, trying] | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| name: Run smoke test | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| # Cancel any currently running workflows from the same PR, branch, or | |
| # tag when a new workflow is triggered. | |
| # | |
| # https://stackoverflow.com/a/66336834 | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| jobs: | |
| build-smoke-tester: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install target for cross-compilation | |
| run: rustup target add aarch64-unknown-linux-musl | |
| - uses: taiki-e/install-action@nextest | |
| - name: Cache Dependencies | |
| uses: Swatinem/rust-cache@v2.8.2 | |
| - name: Show rust info | |
| run: rustup show | |
| - name: Build smoke-tester | |
| run: cargo nextest archive --release --target aarch64-unknown-linux-musl -p smoke_tester --archive-file smoke_tester.tar.zst | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: smoke_tester | |
| path: smoke_tester.tar.zst | |
| build-probe-rs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install target for cross-compilation | |
| run: rustup target add aarch64-unknown-linux-gnu | |
| - name: Install cross | |
| uses: taiki-e/install-action@v2.67.11 | |
| with: | |
| tool: cross | |
| - name: Cache Dependencies | |
| uses: Swatinem/rust-cache@v2.8.2 | |
| - name: Build probe-rs | |
| run: cross build --release --target aarch64-unknown-linux-gnu -p probe-rs-tools --features remote | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: probe-rs | |
| path: target/aarch64-unknown-linux-gnu/release/probe-rs | |
| test: | |
| runs-on: ["self-hosted", "linux", "ARM64", "${{ matrix.runner }}"] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runner: ["smoke-test", "smoke-tester-2", "probe-rs-tester-0"] | |
| needs: build-smoke-tester | |
| env: | |
| CARGO_TERM_COLOR: always | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| with: | |
| # There is a conflict between the probe-rs/ subfolder and the probe-rs binary artifact, if the | |
| # checkout is done into the workspace root. | |
| path: src/ | |
| - uses: taiki-e/install-action@nextest | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: smoke_tester | |
| - name: Run smoke-tester | |
| run: | | |
| cargo-nextest nextest run --archive-file smoke_tester.tar.zst --profile ci-hardware --workspace-remap $GITHUB_WORKSPACE/src | |
| embedded-test: | |
| runs-on: ["self-hosted", "linux", "ARM64", "${{ matrix.runner }}"] | |
| strategy: | |
| matrix: | |
| runner: ["smoke-tester-2"] | |
| needs: build-probe-rs | |
| steps: | |
| # Avoid conflicts when downloading the probe-rs artifact | |
| - name: Clean workspace | |
| run: rm -rf "${GITHUB_WORKSPACE}/*" | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: probe-rs | |
| - name: Run embedded-tests | |
| run: | | |
| chmod +x probe-rs | |
| if [ -n "$EMBEDDED_TEST_RUNNER" ]; then | |
| . $EMBEDDED_TEST_RUNNER | |
| fi |