@@ -631,6 +631,45 @@ jobs:
631631 - name : Check big endian for aarch64_be-unknown-linux-gnu target
632632 run : ./cargo.sh +nightly build --target=aarch64_be-unknown-linux-gnu -Zbuild-std --features simd
633633
634+ # We can't use this as part of the build matrix because rustup doesn't support
635+ # the `avr-none` target.
636+ check_avr_artmega :
637+ runs-on : ubuntu-latest
638+ name : Build (zerocopy / nightly / --simd / avr-none)
639+ steps :
640+ - uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
641+ - name : Configure environment variables
642+ run : |
643+ set -eo pipefail
644+ ZC_TOOLCHAIN="$(./cargo.sh --version nightly)"
645+ RUSTFLAGS="$RUSTFLAGS $ZC_NIGHTLY_RUSTFLAGS"
646+ echo "RUSTFLAGS=$RUSTFLAGS" >> $GITHUB_ENV
647+ echo "ZC_TOOLCHAIN=$ZC_TOOLCHAIN" >> $GITHUB_ENV
648+ - name : Rust Cache
649+ uses : Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
650+ with :
651+ key : avr-none
652+ - name : Install stable Rust for use in 'cargo.sh'
653+ uses : dtolnay/rust-toolchain@00b49be78f40fba4e87296b2ead62868750bdd83 # stable
654+ with :
655+ toolchain : stable
656+ - name : Install Rust with nightly toolchain (${{ env.ZC_TOOLCHAIN }})
657+ uses : dtolnay/rust-toolchain@00b49be78f40fba4e87296b2ead62868750bdd83 # stable
658+ with :
659+ toolchain : ${{ env.ZC_TOOLCHAIN }}
660+ components : clippy, rust-src
661+ # NOTE: We cannot check tests because of a number of different issues (at
662+ # the time of writing):
663+ # - No `alloc::sync`
664+ # - Values of type `[u8; 32768]` are too big
665+ #
666+ # To try for yourself, replace `-Zbuild-std=core` with `-Zbuild-std` and
667+ # add `--tests`.
668+ - name : Check avr-none target
669+ run : RUSTFLAGS='-C target-cpu=atmega328p' ./cargo.sh +nightly check --target=avr-none -Zbuild-std=core --features simd,simd-nightly,float-nightly,derive
670+ - name : Clippy check avr-none target
671+ run : RUSTFLAGS='-C target-cpu=atmega328p' ./cargo.sh +nightly clippy --target=avr-none -Zbuild-std=core --features simd,simd-nightly,float-nightly,derive
672+
634673 check_fmt :
635674 runs-on : ubuntu-latest
636675 name : Check Rust formatting
@@ -761,7 +800,7 @@ jobs:
761800 # 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
762801 if : failure()
763802 runs-on : ubuntu-latest
764- needs : [build_test, kani,check_be_aarch64 , check_fmt, check_readme, check_versions, generate_cache, check-all-toolchains-tested, check-job-dependencies, run-git-hooks]
803+ needs : [build_test, kani, check_be_aarch64, check_avr_artmega , check_fmt, check_readme, check_versions, generate_cache, check-all-toolchains-tested, check-job-dependencies, run-git-hooks]
765804 steps :
766805 - name : Mark the job as failed
767806 run : exit 1
0 commit comments