[anneal][v2] Add DiagnosticMapper to map compiler errors back to Rust source code #497
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
| # Copyright 2026 The Fuchsia Authors | |
| # | |
| # Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0 | |
| # <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT | |
| # license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option. | |
| # This file may not be copied, modified, or distributed except according to | |
| # those terms. | |
| name: Anneal Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| merge_group: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -Dwarnings | |
| RUSTDOCFLAGS: -Dwarnings | |
| CARGO_ZEROCOPY_AUTO_INSTALL_TOOLCHAIN: 1 | |
| jobs: | |
| build_docker_env: | |
| name: Build Docker image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required to push benchmark data to the storage branch | |
| packages: write # required to push docker caches to ghcr.io | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate sanitized Docker tag | |
| id: docker_tag | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| shell: bash | |
| run: | | |
| echo "tag=${REF_NAME//\//-}" >> "$GITHUB_OUTPUT" | |
| - name: Get UID/GID | |
| id: get_uid | |
| run: | | |
| echo "uid=$(id -u)" >> "$GITHUB_OUTPUT" | |
| echo "gid=$(id -g)" >> "$GITHUB_OUTPUT" | |
| - name: Start build timer | |
| id: start_timer | |
| run: echo "start=$(date +%s)" >> "$GITHUB_OUTPUT" | |
| - name: Build Docker image (Dry Run) | |
| id: build_dry | |
| uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0 | |
| with: | |
| context: anneal | |
| file: anneal/Dockerfile | |
| push: false | |
| tags: ghcr.io/google/zerocopy/anneal:${{ steps.docker_tag.outputs.tag }} | |
| provenance: false | |
| # Use zstd compression at level 19 to minimize image size and maximize | |
| # decompression speed on matrix runners. This shifts the heavy | |
| # compression work to the runner used for building the image, saving | |
| # time in the consumer jobs that pull the image. Level 19 is the | |
| # practical maximum for standard use. | |
| outputs: type=image,compression=zstd,compression-level=19,force-compression=true | |
| build-args: | | |
| UID=${{ steps.get_uid.outputs.uid }} | |
| GID=${{ steps.get_uid.outputs.gid }} | |
| cache-from: | | |
| type=registry,ref=ghcr.io/google/zerocopy/anneal-cache:${{ steps.docker_tag.outputs.tag }} | |
| type=registry,ref=ghcr.io/google/zerocopy/anneal-cache:main | |
| cache-to: type=registry,ref=ghcr.io/google/zerocopy/anneal-cache:${{ steps.docker_tag.outputs.tag }},mode=max | |
| - name: Record build time | |
| env: | |
| START_TIME: ${{ steps.start_timer.outputs.start }} | |
| run: | | |
| end=$(date +%s) | |
| start=$START_TIME | |
| duration=$((end - start)) | |
| echo "Docker Build Time: $duration seconds" | |
| echo "[{\"name\": \"Docker Build Time\", \"unit\": \"seconds\", \"value\": $duration}]" > build_time.json | |
| - name: Store build time benchmark | |
| uses: benchmark-action/github-action-benchmark@a60cea5bc7b49e15c1f58f411161f99e0df48372 # v1.22.0 | |
| with: | |
| name: Docker Build Time | |
| tool: 'customSmallerIsBetter' | |
| output-file-path: build_time.json | |
| gh-pages-branch: benchmark-data | |
| auto-push: true | |
| save-data-file: ${{ github.ref == 'refs/heads/main' }} | |
| benchmark-data-dir-path: dashboard | |
| fail-on-alert: false | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check if remote image matches | |
| id: check_remote | |
| shell: bash | |
| env: | |
| DOCKER_TAG: ${{ steps.docker_tag.outputs.tag }} | |
| LOCAL_DIGEST: ${{ steps.build_dry.outputs.digest }} | |
| run: | | |
| # Fetch the digest of the remote image | |
| REMOTE_DIGEST=$(docker manifest inspect ghcr.io/google/zerocopy/anneal:$DOCKER_TAG | jq -r '.manifests[0].digest') | |
| echo "Remote digest: $REMOTE_DIGEST" | |
| echo "Local digest: $LOCAL_DIGEST" | |
| if [ "$REMOTE_DIGEST" = "$LOCAL_DIGEST" ]; then | |
| echo "match=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "match=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| continue-on-error: true # Handle case where remote tag doesn't exist yet | |
| # The build portion of this step will always be cached thanks to the | |
| # dry-run build above. | |
| - name: Build and push Docker image | |
| if: steps.check_remote.outputs.match != 'true' | |
| uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0 | |
| # NOTE: All arguments here must match the dry-run step above exactly | |
| # in order to ensure we hit the cache for the local build! | |
| with: | |
| context: anneal | |
| file: anneal/Dockerfile | |
| push: true | |
| tags: ghcr.io/google/zerocopy/anneal:${{ steps.docker_tag.outputs.tag }} | |
| provenance: false | |
| outputs: type=image,compression=zstd,compression-level=19,force-compression=true | |
| build-args: | | |
| UID=${{ steps.get_uid.outputs.uid }} | |
| GID=${{ steps.get_uid.outputs.gid }} | |
| cache-from: | | |
| type=registry,ref=ghcr.io/google/zerocopy/anneal-cache:${{ steps.docker_tag.outputs.tag }} | |
| type=registry,ref=ghcr.io/google/zerocopy/anneal-cache:main | |
| cache-to: type=registry,ref=ghcr.io/google/zerocopy/anneal-cache:${{ steps.docker_tag.outputs.tag }},mode=max | |
| measure_image_size: | |
| # This job measures the size of the Docker image built in the previous step | |
| # and records it to maintain a history of resource usage over time. | |
| name: Measure Docker image size | |
| runs-on: ubuntu-latest | |
| needs: build_docker_env | |
| # We only run this on the main branch (and the test branch for verification) | |
| # to ensure we only track history for merged code. | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/anneal-dashboards' | |
| permissions: | |
| contents: write # Required to push benchmark data to the storage branch | |
| packages: read # Required to pull the Docker image from GHCR | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate sanitized Docker tag | |
| # We need to replace slashes in branch names with hyphens to form a valid | |
| # Docker tag, matching the logic used in the build job. | |
| id: docker_tag | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| shell: bash | |
| run: | | |
| echo "tag=${REF_NAME//\//-}" >> "$GITHUB_OUTPUT" | |
| - name: Pull image | |
| # We pull the image we just built and tag it locally so we can inspect it. | |
| run: | | |
| docker pull ghcr.io/google/zerocopy/anneal:${STEPS_DOCKER_TAG_OUTPUTS_TAG} | |
| docker tag ghcr.io/google/zerocopy/anneal:${STEPS_DOCKER_TAG_OUTPUTS_TAG} anneal-ci:local | |
| env: | |
| STEPS_DOCKER_TAG_OUTPUTS_TAG: ${{ steps.docker_tag.outputs.tag }} | |
| - name: Measure size | |
| # We use docker image inspect to get the size in bytes and convert it to | |
| # Megabytes for easier reading on the dashboard. | |
| id: measure | |
| run: | | |
| size=$(docker image inspect anneal-ci:local --format '{{.Size}}') | |
| size_mb=$((size / 1024 / 1024)) | |
| echo "Image size: $size_mb MB" | |
| echo "[{\"name\": \"Docker Image Size\", \"unit\": \"Megabytes\", \"value\": $size_mb}]" > output.json | |
| - name: Store benchmark result | |
| # We use github-action-benchmark to manage the history of image sizes. | |
| # It is configured to store results in a dedicated branch to avoid | |
| # complex cache management. | |
| uses: benchmark-action/github-action-benchmark@a60cea5bc7b49e15c1f58f411161f99e0df48372 # v1.22.0 | |
| with: | |
| name: Docker Image Size | |
| tool: 'customSmallerIsBetter' | |
| output-file-path: output.json | |
| gh-pages-branch: benchmark-data | |
| auto-push: true | |
| benchmark-data-dir-path: dashboard | |
| fail-on-alert: false | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| anneal_tests: | |
| name: Anneal Tests | |
| runs-on: ubuntu-latest | |
| needs: build_docker_env | |
| permissions: | |
| contents: write # Required to push benchmark data to the storage branch | |
| packages: read # required to pull docker caches from ghcr.io | |
| steps: | |
| - name: Record job start time | |
| id: job_start_time | |
| run: echo "unix=$(date +%s)" >> "$GITHUB_OUTPUT" | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate sanitized Docker tag | |
| id: docker_tag | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| shell: bash | |
| run: | | |
| echo "tag=${REF_NAME//\//-}" >> "$GITHUB_OUTPUT" | |
| - name: Get UID/GID | |
| id: get_uid | |
| run: | | |
| echo "uid=$(id -u)" >> "$GITHUB_OUTPUT" | |
| echo "gid=$(id -g)" >> "$GITHUB_OUTPUT" | |
| - name: Pull and tag image | |
| run: | | |
| start=$(date +%s) | |
| docker pull ghcr.io/google/zerocopy/anneal:${STEPS_DOCKER_TAG_OUTPUTS_TAG} | |
| end=$(date +%s) | |
| duration=$((end - start)) | |
| echo "Docker Pull Time: $duration seconds" | |
| echo "[{\"name\": \"Docker Pull Time\", \"unit\": \"seconds\", \"value\": $duration}]" > pull_time.json | |
| docker tag ghcr.io/google/zerocopy/anneal:${STEPS_DOCKER_TAG_OUTPUTS_TAG} anneal-ci:local | |
| env: | |
| STEPS_DOCKER_TAG_OUTPUTS_TAG: ${{ steps.docker_tag.outputs.tag }} | |
| # Ensure `llms-full.txt` file is up-to-date. | |
| - name: Check doc generation | |
| run: | | |
| # We intentionally omit the `--rm` flag here. In the GitHub Actions | |
| # environment, Docker's container removal process can take over 5 | |
| # minutes to complete after the tests finish. Since the runner VM is | |
| # destroyed at the end of the job, leaving the container is safe and | |
| # saves time. | |
| docker run -v $GITHUB_WORKSPACE/anneal:/workspace anneal-ci:local cargo run -p doc_gen -- --check | |
| # Run unit tests separately, as they're much less likely to have bugs | |
| # during local development, and this makes the GitHub Actions output | |
| # easier to skim (in particular, it's clear at a glance whether a failure | |
| # is due to unit or integration tests). | |
| - name: Run unit tests | |
| run: | | |
| # We intentionally omit the `--rm` flag here. In the GitHub Actions | |
| # environment, Docker's container removal process can take over 5 | |
| # minutes to complete after the tests finish. Since the runner VM is | |
| # destroyed at the end of the job, leaving the container is safe and | |
| # saves time. | |
| docker run -v $GITHUB_WORKSPACE/anneal:/workspace anneal-ci:local cargo test --verbose --bin cargo-anneal | |
| # We duplicate running unit tests since they're very cheap compared to | |
| # integration tests, and this way it's easier to be sure that we run all | |
| # tests instead of specifically trying to carve out unit tests and risk | |
| # missing test categories. | |
| - name: Run all tests | |
| run: | | |
| start=$(date +%s) | |
| # We intentionally omit the `--rm` flag here. In the GitHub Actions | |
| # environment, Docker's container removal process can take over 5 | |
| # minutes to complete after the tests finish. Since the runner VM is | |
| # destroyed at the end of the job, leaving the container is safe and | |
| # saves time. | |
| docker run -v $GITHUB_WORKSPACE/anneal:/workspace anneal-ci:local cargo test --verbose | |
| end=$(date +%s) | |
| duration=$((end - start)) | |
| echo "Test Time: $duration seconds" | |
| echo "[{\"name\": \"Test Time\", \"unit\": \"seconds\", \"value\": $duration}]" > test_time.json | |
| - name: Combine benchmarks | |
| env: | |
| JOB_START_TIME_UNIX: ${{ steps.job_start_time.outputs.unix }} | |
| run: | | |
| total_duration=$(( $(date +%s) - $JOB_START_TIME_UNIX )) | |
| echo "Total CI Duration (All Steps): $total_duration seconds" | |
| echo "[{\"name\": \"Total CI Duration (All Steps)\", \"unit\": \"seconds\", \"value\": $total_duration}]" > total_time.json | |
| jq -n \ | |
| --slurpfile pull pull_time.json \ | |
| --slurpfile test test_time.json \ | |
| --slurpfile total total_time.json \ | |
| '[ | |
| $pull[0][0], | |
| $test[0][0], | |
| $total[0][0] | |
| ]' > output.json | |
| - name: Store CI duration benchmarks | |
| uses: benchmark-action/github-action-benchmark@a60cea5bc7b49e15c1f58f411161f99e0df48372 # v1.22.0 | |
| with: | |
| name: CI Durations | |
| tool: 'customSmallerIsBetter' | |
| output-file-path: output.json | |
| gh-pages-branch: benchmark-data | |
| auto-push: true | |
| save-data-file: ${{ github.ref == 'refs/heads/main' }} | |
| benchmark-data-dir-path: dashboard | |
| fail-on-alert: false | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| verify_examples: | |
| name: Verify example (${{ matrix.example }}) | |
| runs-on: ubuntu-latest | |
| needs: build_docker_env | |
| permissions: | |
| contents: read | |
| packages: read # required to pull docker caches from ghcr.io | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: | |
| - abs | |
| - anatomy | |
| - checked_add | |
| - const_generics | |
| - design_doc | |
| - linked_list | |
| - namespaces | |
| - never_type | |
| - ptr_concat | |
| - size_of_align_of | |
| - swap | |
| - unchecked_get | |
| - update_max | |
| steps: | |
| - name: Free up disk space | |
| run: | | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /usr/local/share/boost | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate sanitized Docker tag | |
| id: docker_tag | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| shell: bash | |
| run: | | |
| echo "tag=${REF_NAME//\//-}" >> "$GITHUB_OUTPUT" | |
| - name: Get UID/GID | |
| id: get_uid | |
| run: | | |
| echo "uid=$(id -u)" >> "$GITHUB_OUTPUT" | |
| echo "gid=$(id -g)" >> "$GITHUB_OUTPUT" | |
| - name: Pull and tag image | |
| run: | | |
| docker pull ghcr.io/google/zerocopy/anneal:${STEPS_DOCKER_TAG_OUTPUTS_TAG} | |
| docker tag ghcr.io/google/zerocopy/anneal:${STEPS_DOCKER_TAG_OUTPUTS_TAG} anneal-ci:local | |
| env: | |
| STEPS_DOCKER_TAG_OUTPUTS_TAG: ${{ steps.docker_tag.outputs.tag }} | |
| - name: Verify example | |
| env: | |
| EXAMPLE: ${{ matrix.example }} | |
| run: | | |
| KNOWN_FAILING=("design_doc" "never_type" "ptr_concat") | |
| example="$EXAMPLE" | |
| expect_failure=0 | |
| for kf in "${KNOWN_FAILING[@]}"; do | |
| if [ "$kf" = "$example" ]; then | |
| expect_failure=1 | |
| break | |
| fi | |
| done | |
| echo "Verifying $example (expect failure: $expect_failure)" | |
| # We intentionally omit the `--rm` flag here. In the GitHub Actions | |
| # environment, Docker's container removal process can take over 5 | |
| # minutes to complete after the tests finish. Since the runner VM is | |
| # destroyed at the end of the job, leaving the container is safe and | |
| # saves time. | |
| if docker run -v $GITHUB_WORKSPACE/anneal:/workspace -e __ZEROCOPY_LOCAL_DEV=1 anneal-ci:local cargo run verify --unsound-allow-is-valid --example "$example"; then | |
| if [ "$expect_failure" -eq 1 ]; then | |
| echo "::error::Example $example succeeded but was expected to fail." | |
| exit 1 | |
| else | |
| echo "Example $example succeeded." | |
| fi | |
| else | |
| if [ "$expect_failure" -eq 1 ]; then | |
| echo "Example $example failed as expected." | |
| else | |
| echo "::error::Example $example failed." | |
| exit 1 | |
| fi | |
| fi | |
| v2_nix_cache: | |
| name: Warm Nix Cache for V2 | |
| runs-on: ubuntu-latest | |
| needs: build_docker_env | |
| permissions: | |
| contents: read | |
| id-token: write # Required to exchange GitHub OIDC tokens for Determinate Systems Cache API access | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install Nix | |
| uses: DeterminateSystems/determinate-nix-action@441b9e401ac050c38a07d8313748c5c2d17e8aff # v3.6.1 | |
| - name: Run Magic Nix Cache | |
| uses: DeterminateSystems/magic-nix-cache-action@main # zizmor: ignore[unpinned-uses] | |
| # On Ubuntu 24.04 (currently `ubuntu-latest`), AppArmor restricts unprivileged user namespaces by default. | |
| # The Nix build sandbox runs `steam-run` (which uses `bubblewrap`/`bwrap`) during the `mathlib-cache-download` | |
| # phase to create an FHS environment. `bwrap` requires creating a user namespace to set up uid mappings, | |
| # which fails with "Permission denied" unless this restriction is temporarily disabled on the host. | |
| # | |
| # We temporarily disable it right before the `nix build` step and re-enable it immediately after | |
| # to maintain the principle of least privilege. | |
| - name: Enable unprivileged user namespaces (Ubuntu 24.04) | |
| run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
| - name: Warm Nix Cache | |
| run: nix build .#omnibus-archive | |
| working-directory: anneal/v2 | |
| # Re-enable the AppArmor namespace restriction to restore the runner host's default security posture. | |
| # `if: always()` ensures this cleanup step runs even if the Nix build fails. | |
| - name: Restore AppArmor restriction | |
| if: always() | |
| run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=1 | |
| v2: | |
| name: Run V2 tests | |
| runs-on: ubuntu-latest | |
| # Depending on `v2_nix_cache` avoids duplicate work and ensure `nix build ...` step for this job is fast. | |
| needs: [build_docker_env, v2_nix_cache] | |
| permissions: | |
| contents: read | |
| id-token: write # Required to exchange GitHub OIDC tokens for Determinate Systems Cache API access | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install Nix | |
| uses: DeterminateSystems/determinate-nix-action@441b9e401ac050c38a07d8313748c5c2d17e8aff # v3.6.1 | |
| - name: Run Magic Nix Cache | |
| uses: DeterminateSystems/magic-nix-cache-action@main # zizmor: ignore[unpinned-uses] | |
| # On Ubuntu 24.04 (currently `ubuntu-latest`), AppArmor restricts unprivileged user namespaces by default. | |
| # The Nix build sandbox runs `steam-run` (which uses `bubblewrap`/`bwrap`) during the `mathlib-cache-download` | |
| # phase to create an FHS environment. `bwrap` requires creating a user namespace to set up uid mappings, | |
| # which fails with "Permission denied" unless this restriction is temporarily disabled on the host. | |
| # | |
| # We temporarily disable it right before the `nix build` step and re-enable it immediately after | |
| # to maintain the principle of least privilege. | |
| - name: Enable unprivileged user namespaces (Ubuntu 24.04) | |
| run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
| - name: Build outside-cargo dependencies (cached) | |
| run: | | |
| mkdir -p target | |
| nix build .#omnibus-archive --out-link target/anneal-exocrate.tar.zst | |
| working-directory: anneal/v2 | |
| # Re-enable the AppArmor namespace restriction to restore the runner host's default security posture. | |
| # `if: always()` ensures this cleanup step runs even if the Nix build fails. | |
| - name: Restore AppArmor restriction | |
| if: always() | |
| run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=1 | |
| - name: Install latest nightly Rust | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # zizmor: ignore[superfluous-actions] | |
| with: | |
| toolchain: nightly | |
| - name: Run V2 tests | |
| run: cargo test --workspace --all-features # include, e.g., tests that assume exocrate prebuilt | |
| working-directory: anneal/v2 | |
| # Used to signal to branch protections that all other jobs have succeeded. | |
| all-jobs-succeed: | |
| # WARNING: This name is load-bearing! It's how GitHub's settings UI | |
| # configures which jobs to block on. DO NOT change this name without | |
| # updating the settings UI to match. | |
| name: All checks succeeded (anneal.yml) | |
| # On failure, we run and unconditionally exit with a failing status code. | |
| # On success, this job is skipped. Jobs skipped using `if:` are considered | |
| # to have succeeded: | |
| # | |
| # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks | |
| if: failure() | |
| runs-on: ubuntu-latest | |
| needs: [build_docker_env, anneal_tests, verify_examples, measure_image_size, v2_nix_cache, v2] | |
| steps: | |
| - name: Mark the job as failed | |
| run: exit 1 |