Skip to content

Commit

Permalink
[ci] Ensure focal arm64 builds all have their required dependencies (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
marun authored Jun 6, 2024
1 parent 6caa655 commit c28af7d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .github/actions/install-focal-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This action installs dependencies missing from the default
# focal image used by arm64 github workers.
#
# TODO(marun): Find an image with the required dependencies already installed.

name: 'Install focal arm64 dependencies'
description: 'Installs the dependencies required to build avalanchego on an arm64 github worker running Ubuntu 20.04 (focal)'

runs:
using: composite
steps:
- name: Install build-essential
run: |
sudo apt update
sudo apt -y install build-essential
shell: bash
2 changes: 2 additions & 0 deletions .github/workflows/build-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/install-focal-deps

- uses: ./.github/actions/setup-go-for-project-v3

- run: go version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-ubuntu-arm64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-focal-deps
- uses: ./.github/actions/setup-go-for-project-v3
- run: go version

Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,13 @@ jobs:
os: [macos-12, ubuntu-20.04, ubuntu-22.04, windows-2022, custom-arm64-focal, custom-arm64-jammy]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-focal-deps
if: matrix.os == 'custom-arm64-focal'
- uses: ./.github/actions/setup-go-for-project-v3
- name: Set timeout on Windows # Windows UT run slower and need a longer timeout
shell: bash
if: matrix.os == 'windows-2022'
run: echo "TIMEOUT=240s" >> $GITHUB_ENV
- name: Install build dependencies not available by default on custom-arm64-focal runners
shell: bash
if: matrix.os == 'custom-arm64-focal'
run: |
sudo apt update
sudo apt -y install build-essential
- name: build_test
shell: bash
run: ./scripts/build_test.sh
Expand Down

0 comments on commit c28af7d

Please sign in to comment.