From 434213e1777490a9a7a7c71e5f9716982a8efa64 Mon Sep 17 00:00:00 2001 From: Niklas Sombert Date: Fri, 7 Jun 2024 17:42:54 +0200 Subject: [PATCH] Switch the CI to Ubuntu 20.04 This is currently the oldest supported version of Ubuntu according to . This is because applications linked against glibc only work on that version of glibc (or newer ones). --- .github/workflows/build.yml | 8 ++++++-- .github/workflows/release.yml | 12 ++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d23ca48..ef6bcd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,11 @@ on: [push] jobs: build: - runs-on: ubuntu-latest + # This is the oldest supported version of Ubuntu according to + # . This is + # because applications linked against glibc only work on that version of + # glibc (or newer ones). + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - name: Cache Cargo @@ -56,7 +60,7 @@ jobs: name: towbootctl-debug-x86_64-linux path: target/x86_64-unknown-linux-gnu/debug/towbootctl - name: Install compiler for x86_64-windows - run: sudo apt-get update && sudo apt-get install gcc-mingw-w64-x86-64-win32 + run: sudo apt-get update && sudo apt-get install gcc-mingw-w64-x86-64 - name: Install Rust for x86_64-windows uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 196ac76..70bf5ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,11 @@ on: tags: 'v*' jobs: release: - runs-on: ubuntu-latest + # This is the oldest supported version of Ubuntu according to + # . This is + # because applications linked against glibc only work on that version of + # glibc (or newer ones). + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - name: Cache Cargo @@ -44,7 +48,7 @@ jobs: command: build args: --package towbootctl --target x86_64-unknown-linux-gnu --features=binary --release - name: Install compiler for x86_64-windows - run: sudo apt-get update && sudo apt-get install gcc-mingw-w64-x86-64-win32 + run: sudo apt-get update && sudo apt-get install gcc-mingw-w64-x86-64 - name: Install Rust for x86_64-windows uses: actions-rs/toolchain@v1 with: @@ -86,6 +90,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release-macos: + # We could cross-compile from Linux instead, + # but we'd still need the Xcode Command Line Tools. + # Downloading them requires logging in with an Apple ID, + # which is not possible in the CI. The macOS runners include it. runs-on: macos-latest needs: release steps: