From fc0bc328143e1173ca78192040e0cb820d8fd9c6 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 26 Oct 2023 21:13:40 +0200 Subject: [PATCH] ci: use self-hosted to build container images (#1206) ci: use self-hosted Signed-off-by: Ettore Di Giacinto Signed-off-by: Ettore Di Giacinto --- .github/workflows/image.yml | 42 ++++------------------------------ .github/workflows/test-gpu.yml | 4 ++-- 2 files changed, 7 insertions(+), 39 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index abc0304f..2b1a7b62 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -58,44 +58,8 @@ jobs: tag-suffix: '-cublas-cuda12-ffmpeg' ffmpeg: 'true' - runs-on: ubuntu-latest + runs-on: docker-build 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 remove -y microsoft-edge-stable || true - sudo apt-get remove -y firefox || true - sudo apt-get remove -y powershell || true - sudo apt-get remove -y r-base-core || 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 - name: Checkout uses: actions/checkout@v4 @@ -144,3 +108,7 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + - name: Release space from worker ♻ + if: always() + run: | + docker system prune -f -a --volumes || true diff --git a/.github/workflows/test-gpu.yml b/.github/workflows/test-gpu.yml index 34d3cafb..ea1de749 100644 --- a/.github/workflows/test-gpu.yml +++ b/.github/workflows/test-gpu.yml @@ -15,7 +15,7 @@ concurrency: jobs: ubuntu-latest: - runs-on: self-hosted + runs-on: gpu strategy: matrix: go-version: ['1.21.x'] @@ -59,5 +59,5 @@ jobs: make \ TEST_DIR="/host/tests/${{ github.head_ref || github.ref }}" \ teardown-e2e || true - sudo rm -rf /host/tests/${{ github.head_ref || github.ref }} + sudo rm -rf /host/tests/${{ github.head_ref || github.ref }} || true docker system prune -f -a --volumes || true