From d8fdc94774ab9a0561f0d3053e85809d9a00bf5a Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Thu, 23 Jan 2025 16:33:51 +0100 Subject: [PATCH 1/4] CI: Use ubuntu-24.04 explicitly Using ubuntu-latest might break any time GitHub switches the runner image to a different base. --- .github/workflows/patch-test.yaml | 6 +++--- .github/workflows/prepare-release.yaml | 2 +- .github/workflows/publish.yaml | 2 +- .github/workflows/update-ghc.yaml | 2 +- .github/workflows/workflow.yaml | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/patch-test.yaml b/.github/workflows/patch-test.yaml index a5b7abdb1..7f10e0929 100644 --- a/.github/workflows/patch-test.yaml +++ b/.github/workflows/patch-test.yaml @@ -13,7 +13,7 @@ env: jobs: find-ghc-version: name: Find GHC versions for which a bindist is provided - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: ghc-matrix: ${{ steps.set-ghc-versions.outputs.ghc-matrix }} steps: @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13, windows-latest] + os: [ubuntu-24.04, macos-13, windows-latest] ghc-version: ${{ fromJSON(needs.find-ghc-version.outputs.ghc-matrix) }} runs-on: ${{ matrix.os }} steps: @@ -39,7 +39,7 @@ jobs: sudo apt-get update sudo apt-get install --no-install-recommends -yy libtinfo5 sudo apt-get clean - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.os == 'ubuntu-24.04' }} - uses: actions/checkout@v4 - name: Mount Bazel cache uses: actions/cache@v4 diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index d308ddffa..82d92b709 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -15,7 +15,7 @@ permissions: jobs: release: name: Prepare Release - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check version run: | diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index d48991e1e..d8cf96237 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -8,7 +8,7 @@ on: jobs: webpage: name: Update webpage - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/update-ghc.yaml b/.github/workflows/update-ghc.yaml index f050e192b..78bb29578 100644 --- a/.github/workflows/update-ghc.yaml +++ b/.github/workflows/update-ghc.yaml @@ -7,7 +7,7 @@ on: jobs: update_ghc: name: GHC ${{ matrix.ghc }} Update - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index b6eb9942b..9fbe80244 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -18,7 +18,7 @@ concurrency: jobs: lint: name: Format & Lint - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: tweag/configure-bazel-remote-cache-auth@v0 @@ -43,7 +43,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13] + os: [ubuntu-24.04, macos-13] module: [rules_haskell, rules_haskell_nix, rules_haskell_tests] bzlmod: [true, false] ghc: @@ -139,7 +139,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13, windows-latest] + os: [ubuntu-24.04, macos-13, windows-latest] module: [rules_haskell, rules_haskell_tests] bzlmod: [true, false] ghc: @@ -253,7 +253,7 @@ jobs: path: logs all_ci_tests: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: - lint - test-nixpkgs From a136dd8b2a88968524b6063b61ae80dca924a813 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Thu, 23 Jan 2025 16:58:54 +0100 Subject: [PATCH 2/4] CI: Fix error when list of docker images is empty --- .github/actions/free_disk_space_on_linux/action.yaml | 2 +- foo.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 foo.cc diff --git a/.github/actions/free_disk_space_on_linux/action.yaml b/.github/actions/free_disk_space_on_linux/action.yaml index b73c048d6..44505c26c 100644 --- a/.github/actions/free_disk_space_on_linux/action.yaml +++ b/.github/actions/free_disk_space_on_linux/action.yaml @@ -9,4 +9,4 @@ runs: run: |- sudo swapoff -a sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc "$ANDROID_HOME" /usr/local/.ghcup /usr/local/share/powershell /opt/az /opt/microsoft /etc/skel - docker rmi $(docker images -q) -f + docker images -q | xargs -r docker rmi -f diff --git a/foo.cc b/foo.cc new file mode 100644 index 000000000..67f5189af --- /dev/null +++ b/foo.cc @@ -0,0 +1,3 @@ + +#include + From 804bdccd4c71b97d89302eef21792b3e779a3f3d Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Thu, 23 Jan 2025 17:16:58 +0100 Subject: [PATCH 3/4] CI: Use windows-2022 explicitly instead of windows-latest --- .github/workflows/patch-test.yaml | 2 +- .github/workflows/workflow.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/patch-test.yaml b/.github/workflows/patch-test.yaml index 7f10e0929..da43b99e0 100644 --- a/.github/workflows/patch-test.yaml +++ b/.github/workflows/patch-test.yaml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04, macos-13, windows-latest] + os: [ubuntu-24.04, macos-13, windows-2022] ghc-version: ${{ fromJSON(needs.find-ghc-version.outputs.ghc-matrix) }} runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 9fbe80244..64bdd0f9c 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -139,7 +139,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04, macos-13, windows-latest] + os: [ubuntu-24.04, macos-13, windows-2022] module: [rules_haskell, rules_haskell_tests] bzlmod: [true, false] ghc: @@ -155,9 +155,9 @@ jobs: bzlmod: true # currently proto-lens-protoc (read: protoc-gen-haskell) fails with an access violation on Windows - ghc: 9.6.5 - os: windows-latest + os: windows-2022 - ghc: 9.8.2 - os: windows-latest + os: windows-2022 env: GHC_VERSION: ${{ matrix.ghc }} runs-on: ${{ matrix.os }} From cb23349bebad51dd9822660eb41c1e3bed6c7488 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 24 Jan 2025 09:53:41 +0100 Subject: [PATCH 4/4] CI: Skip installing libtinfo5 This package is no longer available on ubuntu-24.04. --- .github/workflows/workflow.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 64bdd0f9c..7db98d703 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -164,9 +164,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/free_disk_space_on_linux - - uses: ./.github/actions/install_apt_pkgs - with: - packages: libtinfo5 - name: Mount Bazel cache uses: actions/cache@v4 with: