-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: fixes to runner image update (#1847)
- Updates devenv to match rust version on CI (1.84) - clippy fixes - Installs llvm all the time and removes separate hugr-llvm job because runner image no longer has LLVM to link to. Follow up issue: #1851 - ~[Nightly is failing](https://github.com/CQCL/hugr/actions/runs/12696563342/job/35390874375?pr=1847) for what appears to be an unrelated rustc bug.~ has been fixed! - Semver checks failing because adding "llvm-14" to the `apt-dependencies` appears to not be changing anything??? https://github.com/CQCL/hugr/actions/runs/12707081975/job/35421268084?pr=1847 Closes #1843
- Loading branch information
Showing
11 changed files
with
58 additions
and
75 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,11 @@ env: | |
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
HUGR_TEST_SCHEMA: "1" | ||
# different strings for install action and feature name | ||
# adapted from https://github.com/TheDan64/inkwell/blob/master/.github/workflows/test.yml | ||
LLVM_VERSION: "14.0" | ||
LLVM_FEATURE_NAME: "14-0" | ||
|
||
|
||
jobs: | ||
# Check if changes were made to the relevant files. | ||
|
@@ -72,6 +77,10 @@ jobs: | |
run: sudo apt-get install -y capnproto | ||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
- name: Install LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: ${{ env.LLVM_VERSION }} | ||
- name: Run clippy | ||
run: cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
- name: Build docs | ||
|
@@ -91,6 +100,10 @@ jobs: | |
uses: dtolnay/rust-toolchain@stable | ||
- name: Install CapnProto | ||
run: sudo apt-get install -y capnproto | ||
- name: Install LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: ${{ env.LLVM_VERSION }} | ||
- name: Build benchmarks with no features | ||
run: cargo bench --verbose --no-run --no-default-features | ||
- name: Build benchmarks with all features | ||
|
@@ -114,6 +127,10 @@ jobs: | |
|
||
- name: Install CapnProto | ||
run: sudo apt-get install -y capnproto | ||
- name: Install LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: ${{ env.LLVM_VERSION }} | ||
- name: Build with no features | ||
run: cargo test --verbose --no-default-features --no-run | ||
- name: Tests with no features | ||
|
@@ -125,6 +142,7 @@ jobs: | |
if: ${{ needs.changes.outputs.rust == 'true' }} | ||
runs-on: ubuntu-latest | ||
name: tests (Rust stable, all features) | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: mozilla-actions/[email protected] | ||
|
@@ -137,10 +155,20 @@ jobs: | |
|
||
- name: Install CapnProto | ||
run: sudo apt-get install -y capnproto | ||
- name: Install LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: ${{ env.LLVM_VERSION }} | ||
- name: Build with all features | ||
run: cargo test --verbose --all-features --no-run | ||
- name: Tests with all features | ||
run: cargo test --verbose --all-features | ||
- name: Build hugr-llvm | ||
if: ${{ needs.changes.outputs.llvm == 'true'}} | ||
run: cargo test -p hugr-llvm --verbose --features llvm${{ env.LLVM_FEATURE_NAME }} --no-run | ||
- name: Tests hugr-llvm | ||
if: ${{ needs.changes.outputs.llvm == 'true'}} | ||
run: cargo test -p hugr-llvm --verbose --features llvm${{ env.LLVM_FEATURE_NAME }} | ||
- name: Build HUGR binary | ||
run: cargo build -p hugr-cli | ||
- name: Upload the binary to the artifacts | ||
|
@@ -172,6 +200,10 @@ jobs: | |
run: rustup override set ${{steps.toolchain.outputs.name}} | ||
- name: Install CapnProto | ||
run: sudo apt-get install -y capnproto | ||
- name: Install LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: ${{ env.LLVM_VERSION }} | ||
- name: Build with no features | ||
run: cargo test --verbose --no-default-features --no-run | ||
- name: Tests with no features | ||
|
@@ -226,8 +258,7 @@ jobs: | |
- name: Install LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: "14.0" | ||
env: true | ||
version: ${{ env.LLVM_VERSION }} | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Run tests with coverage instrumentation | ||
|
@@ -246,39 +277,6 @@ jobs: | |
flags: rust | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
tests-stable-llvm: | ||
needs: changes | ||
if: ${{ ( needs.changes.outputs.llvm == 'true' && github.event_name == 'push' ) || needs.changes.outputs.override == 'true' }} | ||
runs-on: ubuntu-latest | ||
name: tests hugr-llvm | ||
strategy: | ||
matrix: | ||
llvm-version: | ||
# different strings for install action and feature name | ||
# adapted from https://github.com/TheDan64/inkwell/blob/master/.github/workflows/test.yml | ||
- ["14.0", "14-0"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: mozilla-actions/[email protected] | ||
- id: toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: "stable" | ||
- name: Configure default rust toolchain | ||
run: rustup override set ${{steps.toolchain.outputs.name}} | ||
- name: Install CapnProto | ||
run: sudo apt-get install -y capnproto | ||
- name: Install LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: ${{ matrix.llvm-version[0] }} | ||
env: true | ||
- name: Build | ||
run: cargo test -p hugr-llvm --verbose --features llvm${{ matrix.llvm-version[1] }} --no-run | ||
- name: Tests with no features | ||
run: cargo test -p hugr-llvm --verbose --features llvm${{ matrix.llvm-version[1] }} | ||
|
||
# This is a meta job to mark successful completion of the required checks, | ||
# even if they are skipped due to no changes in the relevant files. | ||
required-checks: | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.