From eebc633fb0dfc76bb0c8553fff6b7d308db82fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sat, 16 Sep 2023 18:41:51 -0400 Subject: [PATCH 1/2] ci: make ubuntu versions consistent across workflow file jobs Make Ubuntu versions consistent across workflow file jobs: use `ubuntu-22.04`. --- .github/workflows/cypress.yml | 2 +- .github/workflows/examples.yml | 12 ++++++------ .github/workflows/javascript-typescript.yml | 1 + .github/workflows/pr-checks.yml | 2 +- .github/workflows/toolchains.yml | 5 +++-- .github/workflows/wasi.yml | 3 ++- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 640cbcc38..dae304d58 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -6,7 +6,7 @@ jobs: test-cypress: name: itk-wasm browser tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 7bb70eee7..b64a5f617 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -5,7 +5,7 @@ on: [push,pull_request] jobs: test-node-example: name: node-js - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: working-directory: ./examples/node-js @@ -116,7 +116,7 @@ jobs: build-test-hello-pipeline-example: name: hello-pipeline build test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: @@ -160,7 +160,7 @@ jobs: build-test-inputs-outputs-example: name: inputs-outputs - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: @@ -201,7 +201,7 @@ jobs: test-umd-example: name: umd - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -230,7 +230,7 @@ jobs: test-webpack-example: name: webpack - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -266,7 +266,7 @@ jobs: test-vite-example: name: vite - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/javascript-typescript.yml b/.github/workflows/javascript-typescript.yml index d21357905..48b0008ab 100644 --- a/.github/workflows/javascript-typescript.yml +++ b/.github/workflows/javascript-typescript.yml @@ -14,6 +14,7 @@ jobs: # Workaround for https://github.com/actions/virtual-environments/issues/709 df -h sudo apt-get update + sudo apt-get remove -y '^aspnet-.*' sudo apt-get remove -y '^dotnet-.*' sudo apt-get remove -y '^llvm-.*' sudo apt-get remove -y 'php.*' diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 86101ecb9..f45312db9 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -3,7 +3,7 @@ on: pull_request jobs: pr-checks: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Check and lint PR steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/toolchains.yml b/.github/workflows/toolchains.yml index e0d4c0eda..90ce987a8 100644 --- a/.github/workflows/toolchains.yml +++ b/.github/workflows/toolchains.yml @@ -5,7 +5,7 @@ on: [push,pull_request] jobs: build-itk-wasm-base: name: "Build itk-wasm-base" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -14,6 +14,7 @@ jobs: run: | # Workaround for https://github.com/actions/virtual-environments/issues/709 df -h + sudo apt-get update sudo apt-get remove -y '^dotnet-.*' sudo apt-get remove -y '^llvm-.*' sudo apt-get remove -y 'php.*' @@ -58,7 +59,7 @@ jobs: build-itk-wasm: name: "Build itk-wasm" needs: build-itk-wasm-base - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/wasi.yml b/.github/workflows/wasi.yml index 3b097f12a..3d34dadf1 100644 --- a/.github/workflows/wasi.yml +++ b/.github/workflows/wasi.yml @@ -4,7 +4,7 @@ on: [push,pull_request] jobs: build-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -13,6 +13,7 @@ jobs: run: | # Workaround for https://github.com/actions/virtual-environments/issues/709 df -h + sudo apt-get update sudo apt-get remove -y '^dotnet-.*' sudo apt-get remove -y '^llvm-.*' sudo apt-get remove -y 'php.*' From 55166f1eac4a4ac285c37092018c0722e0461439 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Fri, 29 Sep 2023 11:58:31 -0400 Subject: [PATCH 2/2] ci: use GitHub Action to free up disk space Community effort is more maintainable. --- .github/workflows/examples.yml | 179 +++++--------------- .github/workflows/javascript-typescript.yml | 17 +- .github/workflows/toolchains.yml | 31 +--- .github/workflows/wasi.yml | 16 +- 4 files changed, 48 insertions(+), 195 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index b64a5f617..b11870d57 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -13,20 +13,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - uses: actions/setup-node@v3 with: @@ -51,20 +41,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - uses: actions/setup-node@v3 with: @@ -125,20 +105,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - uses: actions/setup-node@v3 with: @@ -169,19 +139,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - uses: actions/setup-node@v3 with: @@ -206,20 +167,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - name: Test uses: cypress-io/github-action@v6 @@ -235,20 +186,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - name: Test Webpack Example on Chrome uses: cypress-io/github-action@v6 @@ -271,20 +212,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - name: Test Vite Example on Chrome uses: cypress-io/github-action@v6 @@ -310,20 +241,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - uses: actions/setup-node@v3 with: @@ -350,20 +271,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - uses: actions/setup-node@v3 with: @@ -391,20 +302,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + large-packages: false - uses: actions/setup-node@v3 with: diff --git a/.github/workflows/javascript-typescript.yml b/.github/workflows/javascript-typescript.yml index 48b0008ab..0cd934f7a 100644 --- a/.github/workflows/javascript-typescript.yml +++ b/.github/workflows/javascript-typescript.yml @@ -9,21 +9,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^aspnet-.*' - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main - name: Pull latest Docker images run: | diff --git a/.github/workflows/toolchains.yml b/.github/workflows/toolchains.yml index 90ce987a8..843149811 100644 --- a/.github/workflows/toolchains.yml +++ b/.github/workflows/toolchains.yml @@ -10,20 +10,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main - name: Pull latest Docker images run: | @@ -64,19 +52,8 @@ jobs: steps: - uses: actions/checkout@v2 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main - name: Pull latest Docker images run: | diff --git a/.github/workflows/wasi.yml b/.github/workflows/wasi.yml index 3d34dadf1..59dde52ac 100644 --- a/.github/workflows/wasi.yml +++ b/.github/workflows/wasi.yml @@ -9,20 +9,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: 'Free up disk space' - run: | - # Workaround for https://github.com/actions/virtual-environments/issues/709 - df -h - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf /usr/share/dotnet/ - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main - name: Pull latest Docker images run: |