From de8fc4ae08331f9cdfd7f48aa90fe47d0c63c943 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Mon, 15 Jul 2024 19:53:53 +0200 Subject: [PATCH] Run arm64 builders on arm64 worker (#972) Signed-off-by: Itxaka --- .github/workflows/build-arm64.yaml | 34 +------------- .github/workflows/one.yaml | 72 ------------------------------ .github/workflows/pr.yaml | 12 +---- 3 files changed, 2 insertions(+), 116 deletions(-) delete mode 100644 .github/workflows/one.yaml diff --git a/.github/workflows/build-arm64.yaml b/.github/workflows/build-arm64.yaml index 2edd4e346..75ba32376 100644 --- a/.github/workflows/build-arm64.yaml +++ b/.github/workflows/build-arm64.yaml @@ -9,42 +9,10 @@ on: jobs: build: - runs-on: fast + runs-on: github-arm64-2c-8gb env: ARCH: amd64 steps: - - name: Release space from worker - run: | - echo "Listing top largest packages" - pkgs=$(dpkg-query -Wf '${Installed-Size}\t${Package}\t${Status}\n' | awk '$NF == "installed"{print $1 "\t" $2}' | sort -nr) - head -n 30 <<< "${pkgs}" - echo - df -h - echo - sudo apt-get remove -y '^llvm-.*|^libllvm.*' || true - sudo apt-get remove --auto-remove android-sdk-platform-tools || true - sudo apt-get purge --auto-remove android-sdk-platform-tools || true - sudo rm -rf /usr/local/lib/android - sudo apt-get remove -y '^dotnet-.*|^aspnetcore-.*' || true - sudo rm -rf /usr/share/dotnet - sudo apt-get remove -y '^mono-.*' || true - sudo apt-get remove -y '^ghc-.*' || true - sudo apt-get remove -y '.*jdk.*|.*jre.*' || true - sudo apt-get remove -y 'php.*' || true - sudo apt-get remove -y hhvm powershell firefox monodoc-manual msbuild || true - sudo apt-get remove -y '^google-.*' || true - sudo apt-get remove -y azure-cli || true - sudo apt-get remove -y '^mongo.*-.*|^postgresql-.*|^mysql-.*|^mssql-.*' || true - sudo apt-get remove -y '^gfortran-.*' || true - sudo apt-get autoremove -y - sudo apt-get clean - echo - echo "Listing top largest packages" - pkgs=$(dpkg-query -Wf '${Installed-Size}\t${Package}\t${Status}\n' | awk '$NF == "installed"{print $1 "\t" $2}' | sort -nr) - head -n 30 <<< "${pkgs}" - echo - sudo rm -rfv build || true - df -h - uses: actions/checkout@v4 - run: | git fetch --prune --unshallow diff --git a/.github/workflows/one.yaml b/.github/workflows/one.yaml deleted file mode 100644 index dc6c1d53d..000000000 --- a/.github/workflows/one.yaml +++ /dev/null @@ -1,72 +0,0 @@ -name: Build just one package and push it to repo -concurrency: - group: "one-build" - #cancel-in-progress: true - -on: - workflow_dispatch: - inputs: - package: - description: 'Package to build' - required: true - arch: - required: false - default: "amd64" - description: 'Arch to build for' -jobs: - build: - runs-on: ubuntu-latest - env: - ARCH: ${{ github.event.inputs.arch }} - steps: - - name: Set final repo - run: | - FINAL_REPO=quay.io/kairos/packages - if [[ "${{ github.event.inputs.arch }}" == "arm64" ]]; then - FINAL_REPO=quay.io/kairos/packages-arm64 - fi - - echo "FINAL_REPO=$FINAL_REPO" >> "$GITHUB_ENV" - echo "Setting final repo to $FINAL_REPO" - - uses: actions/checkout@v4 - - run: | - git fetch --prune --unshallow - mkdir build - - name: Download meta 🔧 - uses: luet-lab/luet-github-action@master - with: - FINAL_REPO: ${{ env.action_state }} - REPOSITORY_TYPE: docker - downloadAllMeta: true - downloadFromList: true - downloadMeta: true - - name: Release space from worker - run: | - sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android - sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET - - name: Build packages 🔧 - uses: luet-lab/luet-github-action@master - with: - build: true - fromIndex: false - onlyMissing: false - CURRENT_PACKAGE: ${{ github.event.inputs.package }} - FINAL_REPO: ${{ env.action_state }} - DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - DOCKER_ENDPOINT: quay.io - REPOSITORY_TYPE: docker - pushFinalImages: true - pushCache: true - values: values/${{ github.event.inputs.arch }}.yaml - - name: Create repo 🔧 - uses: luet-lab/luet-github-action@master - with: - FINAL_REPO: ${{ env.action_state }} - DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - DOCKER_ENDPOINT: quay.io - REPOSITORY_TYPE: docker - createRepo: true - pushCache: true - revisionSHA: true diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 6601480b6..e2e92d9ea 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -30,7 +30,7 @@ jobs: go run main.go $PKG_ALL_CHANGED_FILES build-arm64: - runs-on: fast + runs-on: github-arm64-2c-8gb env: ARCH: amd64 steps: @@ -40,19 +40,9 @@ jobs: mkdir build - name: Set up QEMU uses: docker/setup-qemu-action@v3.1.0 - with: - platforms: all - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3.4.0 - - name: Download meta 🔧 - uses: luet-lab/luet-github-action@v0.2.1 - with: - FINAL_REPO: quay.io/kairos/packages-arm64 - REPOSITORY_TYPE: docker - downloadAllMeta: false - downloadFromList: true - downloadMeta: true - name: Build packages 🔧 uses: luet-lab/luet-github-action@v0.2.1 with: