Skip to content

Commit

Permalink
Preinstall cargo-nextest into GCE and FPGA runner images.
Browse files Browse the repository at this point in the history
  • Loading branch information
korran committed Nov 17, 2023
1 parent a67ca88 commit 6085559
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/fpga-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ jobs:
- name: Install pre-requisites
run: |
sudo apt-get update
sudo apt-get -y install debootstrap binfmt-support qemu-user-static u-boot-tools
sudo apt-get -y install debootstrap binfmt-support qemu-user-static u-boot-tools gcc-aarch64-linux-gnu
rustup target add aarch64-unknown-linux-gnu
- name: Build SD image
run: |
Expand Down
12 changes: 12 additions & 0 deletions ci-tools/fpga-image/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ if [[ -z "${SKIP_DEBOOTSTRAP}" ]]; then
chroot out/rootfs bash -c "su runner -c \"cd /home/runner && tar xvzf actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz && rm -f actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\""
fi

su $SUDO_USER -c "
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=\"aarch64-linux-gnu-gcc\" \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS=\"-C link-arg=--sysroot=$PWD/out/rootfs\" \
~/.cargo/bin/cargo install [email protected] \
--locked \
--no-default-features \
--features=default-no-update \
--target=aarch64-unknown-linux-gnu \
--root /tmp/cargo-nextest"

cp /tmp/cargo-nextest/bin/cargo-nextest out/rootfs/usr/bin/

chroot out/rootfs bash -c 'echo ::1 caliptra-fpga >> /etc/hosts'
cp startup-script.sh out/rootfs/usr/bin/
chroot out/rootfs chmod 755 /usr/bin/startup-script.sh
Expand Down
2 changes: 2 additions & 0 deletions ci-tools/github-runner/scripts/tweak_runner_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ set -x
echo Installing Rust Toolchain
su runner -c "curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=1.70"
su runner -c "/home/runner/.cargo/bin/rustup target add riscv32imc-unknown-none-elf"
echo Installing cargo-nextest
su runner -c "/home/runner/.cargo/bin/cargo install [email protected] --locked --no-default-features --features=default-no-update"

mkdir sw
(
Expand Down

0 comments on commit 6085559

Please sign in to comment.