Skip to content

Commit b24ef70

Browse files
committed
fixup: Switch to using an action
1 parent 916f3bc commit b24ef70

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This action installs dependencies missing from the default
2+
# focal image used by arm64 github workers.
3+
#
4+
# TODO(marun): Find an image with the required dependencies already installed.
5+
6+
name: 'Install focal arm64 dependencies'
7+
description: 'Installs the dependencies required to build avalanchego on an arm64 github worker running Ubuntu 20.04 (focal)'
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Install build-essential
13+
run: |
14+
sudo apt update
15+
sudo apt -y install build-essential
16+
shell: bash

.github/workflows/build-linux-binaries.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ jobs:
7474
runs-on: custom-arm64-focal
7575

7676
steps:
77-
- name: Install build dependencies not available by default on custom-arm64-focal runners
78-
shell: bash
79-
run: |
80-
sudo apt update
81-
sudo apt -y install build-essential
77+
- uses: ./.github/actions/install-focal-deps
8278

8379
- uses: actions/checkout@v4
8480

.github/workflows/build-ubuntu-arm64-release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,7 @@ jobs:
7272
runs-on: custom-arm64-focal
7373

7474
steps:
75-
- name: Install build dependencies not available by default on custom-arm64-focal runners
76-
shell: bash
77-
run: |
78-
sudo apt update
79-
sudo apt -y install build-essential
75+
- uses: ./.github/actions/install-focal-deps
8076
- uses: actions/checkout@v4
8177
- uses: ./.github/actions/setup-go-for-project-v3
8278
- run: go version

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,14 @@ jobs:
3030
matrix:
3131
os: [macos-12, ubuntu-20.04, ubuntu-22.04, windows-2022, custom-arm64-focal, custom-arm64-jammy]
3232
steps:
33+
- uses: ./.github/actions/install-focal-deps
34+
if: matrix.os == 'custom-arm64-focal'
3335
- uses: actions/checkout@v4
3436
- uses: ./.github/actions/setup-go-for-project-v3
3537
- name: Set timeout on Windows # Windows UT run slower and need a longer timeout
3638
shell: bash
3739
if: matrix.os == 'windows-2022'
3840
run: echo "TIMEOUT=240s" >> $GITHUB_ENV
39-
- name: Install build dependencies not available by default on custom-arm64-focal runners
40-
shell: bash
41-
if: matrix.os == 'custom-arm64-focal'
42-
run: |
43-
sudo apt update
44-
sudo apt -y install build-essential
4541
- name: build_test
4642
shell: bash
4743
run: ./scripts/build_test.sh

0 commit comments

Comments
 (0)