Skip to content

Commit

Permalink
FPGA CI: Always use latest GHA runner version. (#973)
Browse files Browse the repository at this point in the history
And rebuild the FPGA image twice a week.
  • Loading branch information
korran authored Oct 18, 2023
1 parent 93a2b9e commit 9e5e655
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/fpga-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
paths:
- "ci-tools/fpga-image/**"

schedule:
# 5:13 AM PST tuesday, thursday
- cron: '13 13 * * 2,4'

workflow_call:
workflow_dispatch:

Expand Down
8 changes: 6 additions & 2 deletions ci-tools/fpga-image/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ if [[ -z "${SKIP_DEBOOTSTRAP}" ]]; then
# Comment this line out if you don't trust folks with physical access to the
# uart
# chroot out/rootfs bash -c 'echo root:password | chpasswd'
#

echo Retrieving latest GHA runner version
RUNNER_VERSION="$(curl https://api.github.com/repos/actions/runner/releases/latest | jq -r '.tag_name[1:]')"
echo Using runner version ${RUNNER_VERSION}
trap - EXIT
(cd out/rootfs/home/runner && curl -O -L https://github.com/actions/runner/releases/download/v2.308.0/actions-runner-linux-arm64-2.308.0.tar.gz)
chroot out/rootfs bash -c 'su runner -c "cd /home/runner && tar xvzf actions-runner-linux-arm64-2.308.0.tar.gz && rm -f actions-runner-linux-arm64-2.308.0.tar.gz"'
(cd out/rootfs/home/runner && curl -O -L "https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz")
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

chroot out/rootfs bash -c 'echo ::1 caliptra-fpga >> /etc/hosts'
Expand Down

0 comments on commit 9e5e655

Please sign in to comment.