Skip to content

Commit e047cfc

Browse files
authored
ci: update libtinfo5 installation for Ubuntu 24.04 (#401)
As per actions/runner-images#10636 `ubuntu-latest` is now Ubuntu 24.04 instead of 22.04 which [does not] have `libtinfo5` in the default PPAs. [does not]: https://packages.ubuntu.com/search?keywords=libtinfo Unfortunately all of the LLVM binary releases for Ubuntu still target 18.04 and contain binaries linked against `libtinfo5` — until LLVM 19 where the `libtinfo` dep was dropped. Pinning CI to use Ubuntu 22.04 is an option; however this commit installs `libtinfo5` on the Ubuntu 24.04 runners manually instead.
1 parent 4f3101e commit e047cfc

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ jobs:
3232
bzlmod: [true, false]
3333
runs-on: ${{ matrix.os }}
3434
steps:
35-
- if: startsWith(matrix.os, 'ubuntu')
36-
name: Install APT packages
37-
run: sudo apt-get -y install libtinfo5
3835
- uses: actions/checkout@v4
36+
- if: startsWith(matrix.os, 'ubuntu')
37+
run: tests/scripts/ubuntu_install_libtinfo.sh
3938
- name: Test
4039
env:
4140
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
@@ -51,10 +50,9 @@ jobs:
5150
bzlmod: [true, false]
5251
runs-on: ${{ matrix.os }}
5352
steps:
54-
- if: startsWith(matrix.os, 'ubuntu')
55-
name: Install APT packages
56-
run: sudo apt-get -y install libtinfo5
5753
- uses: actions/checkout@v4
54+
- if: startsWith(matrix.os, 'ubuntu')
55+
run: tests/scripts/ubuntu_install_libtinfo.sh
5856
- name: Test
5957
env:
6058
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
@@ -102,9 +100,8 @@ jobs:
102100
bzlmod: [true, false]
103101
runs-on: ubuntu-latest
104102
steps:
105-
- name: Install APT packages
106-
run: sudo apt-get -y install libtinfo5
107103
- uses: actions/checkout@v4
104+
- run: tests/scripts/ubuntu_install_libtinfo.sh
108105
- name: Test
109106
env:
110107
USE_BZLMOD: ${{ matrix.bzlmod }}
@@ -116,9 +113,8 @@ jobs:
116113
bzlmod: [true, false]
117114
runs-on: ubuntu-latest
118115
steps:
119-
- name: Install APT packages
120-
run: sudo apt-get -y install libtinfo5
121116
- uses: actions/checkout@v4
117+
- run: tests/scripts/ubuntu_install_libtinfo.sh
122118
- name: Download and Extract LLVM distribution
123119
env:
124120
release: llvmorg-16.0.0
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
# Ubuntu 24.04 does not have libtinfo5 in its PPAs:
4+
#
5+
# However, the LLVM binary releases hosted up upstream still target Ubuntu 18.04
6+
# as of this writing and contain binaries linked against `libtinfo5`.
7+
#
8+
# This script installs `libtinfo5` using the `.deb` from Ubuntu 22.04's PPAs:
9+
# https://packages.ubuntu.com/jammy-updates/amd64/libtinfo5/download
10+
11+
set -euo pipefail
12+
13+
pkg="$(mktemp --suffix=.deb)"
14+
trap 'rm -f "${pkg}"' EXIT
15+
16+
curl -L https://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb -o "${pkg}"
17+
sudo dpkg -i "${pkg}"

0 commit comments

Comments
 (0)