Skip to content

Commit

Permalink
Merge branch 'master' into remove-aws-ami
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Sep 20, 2024
2 parents 030d4a4 + 7784c2a commit 171fb73
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
self-hosted-runner:
labels:
- custom-arm64-focal
- custom-arm64-jammy
- custom-arm64-noble
16 changes: 0 additions & 16 deletions .github/actions/install-focal-deps/action.yml

This file was deleted.

14 changes: 4 additions & 10 deletions .github/workflows/build-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
run: ./scripts/build.sh

- name: Install aws cli
run: |
sudo apt update
sudo apt -y install awscli
run: sudo snap install aws-cli --classic

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -74,16 +72,14 @@ jobs:
rm -rf /tmp/avalanchego
build-arm64-binaries-tarball:
runs-on: custom-arm64-focal
runs-on: custom-arm64-jammy
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v4

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

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

- run: go version
Expand All @@ -92,9 +88,7 @@ jobs:
run: ./scripts/build.sh

- name: Install aws cli
run: |
sudo apt update
sudo apt -y install awscli
run: sudo snap install aws-cli --classic

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -124,7 +118,7 @@ jobs:
TAG: ${{ env.TAG }}
BUCKET: ${{ secrets.BUCKET }}
ARCH: "arm64"
RELEASE: "focal"
RELEASE: "jammy"

- name: Save as Github artifact
uses: actions/upload-artifact@v4
Expand Down
74 changes: 64 additions & 10 deletions .github/workflows/build-ubuntu-amd64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,64 @@ on:
- "*"

jobs:
build-focal-amd64-package:
runs-on: ubuntu-20.04
permissions:
id-token: write
contents: read

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

- name: Build the avalanchego binaries
run: ./scripts/build.sh

- name: Install aws cli
run: sudo snap install aws-cli --classic

- name: Try to get tag from git
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_DEPLOY_SA_ROLE_ARN }}
role-session-name: githubrolesession
aws-region: us-east-1

- name: Create debian package
run: ./.github/workflows/build-deb-pkg.sh
env:
PKG_ROOT: /tmp/avalanchego
TAG: ${{ env.TAG }}
BUCKET: ${{ secrets.BUCKET }}
ARCH: "amd64"
RELEASE: "focal"

- name: Save as Github artifact
uses: actions/upload-artifact@v4
with:
name: focal
path: /tmp/avalanchego/avalanchego-${{ env.TAG }}-amd64.deb

- name: Cleanup
run: |
rm -rf ./build
rm -rf /tmp/avalanchego
build-jammy-amd64-package:
runs-on: ubuntu-22.04
permissions:
Expand All @@ -26,9 +84,7 @@ jobs:
run: ./scripts/build.sh

- name: Install aws cli
run: |
sudo apt update
sudo apt -y install awscli
run: sudo snap install aws-cli --classic

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -71,8 +127,8 @@ jobs:
rm -rf ./build
rm -rf /tmp/avalanchego
build-focal-amd64-package:
runs-on: ubuntu-20.04
build-noble-amd64-package:
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: read
Expand All @@ -86,9 +142,7 @@ jobs:
run: ./scripts/build.sh

- name: Install aws cli
run: |
sudo apt update
sudo apt -y install awscli
run: sudo snap install aws-cli --classic

- name: Try to get tag from git
if: "${{ github.event.inputs.tag == '' }}"
Expand Down Expand Up @@ -118,12 +172,12 @@ jobs:
TAG: ${{ env.TAG }}
BUCKET: ${{ secrets.BUCKET }}
ARCH: "amd64"
RELEASE: "focal"
RELEASE: "noble"

- name: Save as Github artifact
uses: actions/upload-artifact@v4
with:
name: focal
name: noble
path: /tmp/avalanchego/avalanchego-${{ env.TAG }}-amd64.deb

- name: Cleanup
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/build-ubuntu-arm64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ jobs:
run: ./scripts/build.sh

- name: Install aws cli
run: |
sudo apt update
sudo apt -y install awscli
run: sudo snap install aws-cli --classic

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -71,25 +69,22 @@ jobs:
rm -rf ./build
rm -rf /tmp/avalanchego
build-focal-arm64-package:
runs-on: custom-arm64-focal
build-noble-arm64-package:
runs-on: custom-arm64-noble
permissions:
id-token: write
contents: read

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

- name: Build the avalanchego binaries
run: ./scripts/build.sh

- name: Install aws cli
run: |
sudo apt update
sudo apt -y install awscli
run: sudo snap install aws-cli --classic

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -119,12 +114,12 @@ jobs:
TAG: ${{ env.TAG }}
BUCKET: ${{ secrets.BUCKET }}
ARCH: "arm64"
RELEASE: "focal"
RELEASE: "noble"

- name: Save as Github artifact
uses: actions/upload-artifact@v4
with:
name: focal
name: noble
path: /tmp/avalanchego/avalanchego-${{ env.TAG }}-arm64.deb

- name: Cleanup
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-20.04, ubuntu-22.04, windows-2022, custom-arm64-focal, custom-arm64-jammy]
os: [macos-12, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2022, custom-arm64-jammy, custom-arm64-noble]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-focal-deps
if: matrix.os == 'custom-arm64-focal'
- uses: ./.github/actions/setup-go-for-project
- name: Set timeout on Windows # Windows UT run slower and need a longer timeout
shell: bash
Expand All @@ -41,7 +39,7 @@ jobs:
env:
TIMEOUT: ${{ env.TIMEOUT }}
Fuzz:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go-for-project
Expand Down

0 comments on commit 171fb73

Please sign in to comment.