Skip to content

Commit b45304b

Browse files
committed
[anneal][v2] Add and integrate nix-built exocrate
- Add nix derivations for exocrate - Add `setup` sub-command to locate-or-install exocrate - Add integration test for "developer mode" `setup` that presumes local exocrate archive - Add github workflows to: - Warm nix cache - Locally link exocrate archive from nix, then run all tests gherrit-pr-id: Gwhroikc5idscowxamayknlke2uiddzv3
1 parent d22541f commit b45304b

908 files changed

Lines changed: 390068 additions & 3 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/anneal.yml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ jobs:
274274
duration=$((end - start))
275275
echo "Docker Pull Time: $duration seconds"
276276
echo "[{\"name\": \"Docker Pull Time\", \"unit\": \"seconds\", \"value\": $duration}]" > pull_time.json
277-
277+
278278
docker tag ghcr.io/google/zerocopy/anneal:${STEPS_DOCKER_TAG_OUTPUTS_TAG} anneal-ci:local
279279
env:
280280
STEPS_DOCKER_TAG_OUTPUTS_TAG: ${{ steps.docker_tag.outputs.tag }}
@@ -455,6 +455,60 @@ jobs:
455455
fi
456456
fi
457457
458+
v2_nix_cache:
459+
name: Warm Nix Cache for V2
460+
runs-on: ubuntu-latest
461+
needs: build_docker_env
462+
permissions:
463+
contents: read
464+
id-token: write
465+
steps:
466+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
467+
with:
468+
persist-credentials: false
469+
470+
- name: Install Nix
471+
uses: DeterminateSystems/determinate-nix-action@441b9e401ac050c38a07d8313748c5c2d17e8aff # v3.6.1
472+
473+
- name: Run Magic Nix Cache
474+
uses: DeterminateSystems/magic-nix-cache-action@main # zizmor: ignore[unpinned-uses]
475+
476+
- name: Warm Nix Cache
477+
run: nix build .#omnibus-archive
478+
working-directory: anneal/v2
479+
480+
v2:
481+
name: Run V2 tests
482+
runs-on: ubuntu-latest
483+
needs: [build_docker_env, v2_nix_cache]
484+
permissions:
485+
contents: read
486+
id-token: write
487+
steps:
488+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
489+
with:
490+
persist-credentials: false
491+
492+
- name: Install Nix
493+
uses: DeterminateSystems/determinate-nix-action@441b9e401ac050c38a07d8313748c5c2d17e8aff # v3.6.1
494+
495+
- name: Run Magic Nix Cache
496+
uses: DeterminateSystems/magic-nix-cache-action@main # zizmor: ignore[unpinned-uses]
497+
498+
- name: Build outside-cargo dependencies (cached)
499+
run: |
500+
mkdir -p target
501+
nix build .#omnibus-archive --out-link target/anneal-exocrate.tar.zst
502+
working-directory: anneal/v2
503+
504+
- name: Install latest nightly Rust
505+
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # zizmor: ignore[superfluous-actions]
506+
with:
507+
toolchain: nightly
508+
509+
- name: Run V2 tests
510+
run: cargo test --workspace --features exocrate_tests # include tests that assume exocrate prebuilt
511+
working-directory: anneal/v2
458512

459513
# Used to signal to branch protections that all other jobs have succeeded.
460514
all-jobs-succeed:
@@ -469,7 +523,7 @@ jobs:
469523
# 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
470524
if: failure()
471525
runs-on: ubuntu-latest
472-
needs: [build_docker_env, anneal_tests, verify_examples, measure_image_size]
526+
needs: [build_docker_env, anneal_tests, verify_examples, measure_image_size, v2]
473527
steps:
474528
- name: Mark the job as failed
475529
run: exit 1

anneal/v2/Cargo.lock

Lines changed: 229 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)