ci: run on older ubuntu

From guythatsits:

> Not sure if this is helpful but the reason it isn't installing in any
of the debian based is the libc6 dependency(requires 2.39, these are
both on 2.35). Looks like popos alpha apparently includes the updated
library. Had the same issue on just a barebone debian system as well.

By default, GitHub Actions uses the latest Ubuntu runner (e.g.,
ubuntu-latest), which has glibc 2.39+. Instead, we can explicitly use
ubuntu-20.04, which has glibc 2.31.

Reported-by: guythatsits
Fixes: https://github.com/damus-io/notedeck/issues/706
Changelog-Fixed: Fixed issue running binary on older debian distros
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-02-04 06:24:42 -08:00
parent 9dd33d5c5b
commit 35dbe812b2

View File

@@ -12,7 +12,7 @@ on:
jobs: jobs:
lint: lint:
name: Rustfmt + Clippy name: Rustfmt + Clippy
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable - uses: dtolnay/rust-toolchain@stable
@@ -26,7 +26,7 @@ jobs:
name: Test (Linux) name: Test (Linux)
uses: ./.github/workflows/build-and-test.yml uses: ./.github/workflows/build-and-test.yml
with: with:
os: ubuntu-latest os: ubuntu-20.04
additional-setup: | additional-setup: |
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
@@ -44,7 +44,7 @@ jobs:
packaging: packaging:
name: rpm/deb name: rpm/deb
runs-on: ubuntu-latest runs-on: ubuntu-20.04
needs: linux-test needs: linux-test
if: github.ref_name == 'master' || github.ref_name == 'ci' if: github.ref_name == 'master' || github.ref_name == 'ci'
@@ -71,6 +71,9 @@ jobs:
- name: Rust cache - name: Rust cache
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Cargo Fetch
run: cargo fetch
- name: Build Cross (${{ matrix.arch }}) - name: Build Cross (${{ matrix.arch }})
if: matrix.arch != runner.arch if: matrix.arch != runner.arch
run: cargo build --release --target=${{ matrix.arch }}-unknown-linux-gnu run: cargo build --release --target=${{ matrix.arch }}-unknown-linux-gnu