diff --git a/.github/actionlint.yml b/.github/actionlint.yml index 62bee747e6f0..9ffc000795d3 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -1,4 +1,4 @@ self-hosted-runner: labels: - - custom-arm64-focal - custom-arm64-jammy + - custom-arm64-noble diff --git a/.github/actions/install-focal-deps/action.yml b/.github/actions/install-focal-deps/action.yml deleted file mode 100644 index 0770ca11a6d6..000000000000 --- a/.github/actions/install-focal-deps/action.yml +++ /dev/null @@ -1,16 +0,0 @@ -# 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 diff --git a/.github/workflows/build-linux-binaries.yml b/.github/workflows/build-linux-binaries.yml index c59192883c0a..f4f69104b1ef 100644 --- a/.github/workflows/build-linux-binaries.yml +++ b/.github/workflows/build-linux-binaries.yml @@ -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 @@ -74,7 +72,7 @@ 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 @@ -82,8 +80,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/install-focal-deps - - uses: ./.github/actions/setup-go-for-project - run: go version @@ -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 @@ -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 diff --git a/.github/workflows/build-ubuntu-amd64-release.yml b/.github/workflows/build-ubuntu-amd64-release.yml index 6d6514584f01..e38fee1d8aa9 100644 --- a/.github/workflows/build-ubuntu-amd64-release.yml +++ b/.github/workflows/build-ubuntu-amd64-release.yml @@ -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: @@ -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 @@ -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 @@ -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 == '' }}" @@ -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 diff --git a/.github/workflows/build-ubuntu-arm64-release.yml b/.github/workflows/build-ubuntu-arm64-release.yml index 0443487b55e4..de9382be6f13 100644 --- a/.github/workflows/build-ubuntu-arm64-release.yml +++ b/.github/workflows/build-ubuntu-arm64-release.yml @@ -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 @@ -71,15 +69,14 @@ 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 @@ -87,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 @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7c6145e2a61..39550d4259f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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