Skip to content

Commit fa09b02

Browse files
authored
Merge pull request #4893 from kinke/ci_ubu20_ubu22
GHA: Bump ubuntu-20 jobs to ubuntu-22
2 parents a745a72 + fef9ca5 commit fa09b02

File tree

6 files changed

+61
-17
lines changed

6 files changed

+61
-17
lines changed

.github/actions/1-setup/action.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ runs:
3737
# Make sure to link libzstd statically
3838
sudo rm /usr/lib/$arch-linux-gnu/libzstd.so
3939
40-
# Install a more recent CMake version in the AArch64 container (for mimalloc...)
41-
if [[ $arch == aarch64 ]]; then
42-
curl -fL --retry 3 --max-time 300 -o cmake.tar.gz \
43-
https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$arch.tar.gz
44-
mkdir cmake
45-
tar -xf cmake.tar.gz --strip 1 -C cmake
46-
rm cmake.tar.gz
47-
sudo ln -sf $PWD/cmake/bin/cmake /usr/bin/cmake
48-
fi
49-
5040
- name: 'Linux: Install clang 19 from apt.llvm.org'
5141
if: runner.os == 'Linux'
5242
shell: bash

.github/actions/4b-test-lit/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ runs:
1515
if [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then
1616
# FIXME: the following tests fail
1717
rm tests/debuginfo/nested_gdb.d
18-
rm tests/debuginfo/print_gdb.d # works for Cirrus CI though
1918
rm tests/sanitizers/fuzz_basic.d
2019
fi
2120

.github/actions/4d-test-libs/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ runs:
1919
fi
2020
2121
excludes="dmd-testsuite|lit-tests|ldc2-unittest"
22-
if [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then
22+
if [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-x86_64 ]]; then
23+
# sporadically hanging since Ubuntu 22
24+
excludes+='|^core.thread-shared_32$'
25+
elif [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then
2326
# FIXME: failing unittest(s)
2427
excludes+='|^std.internal.math.gammafunction'
2528
# FIXME: failing unittest(s) with enabled optimizations
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build gdb from source
2+
inputs:
3+
arch:
4+
required: true
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Pre-create user-owned directory /usr/local/share/gdb, required for cache restore
9+
shell: bash
10+
run: |
11+
set -eux
12+
sudo mkdir /usr/local/share/gdb
13+
sudo chown $(id -u):$(id -g) /usr/local/share/gdb
14+
15+
- name: Try to restore from cache
16+
uses: actions/cache@v4
17+
with:
18+
path: |
19+
/usr/local/bin/gdb
20+
/usr/local/share/gdb
21+
key: gdb-${{ inputs.arch }}
22+
23+
- shell: bash
24+
run: |
25+
set -eux
26+
27+
if [[ -f /usr/local/bin/gdb ]]; then
28+
echo "Already cached"
29+
exit 0
30+
fi
31+
32+
sudo apt-get -yq install libmpfr-dev
33+
34+
cd ..
35+
curl -fL --retry 3 --max-time 60 -O https://mirrors.ocf.berkeley.edu/gnu/gdb/gdb-16.2.tar.xz
36+
tar xf gdb-16.2.tar.xz
37+
38+
cd gdb-16.2
39+
./configure
40+
make -j$(nproc)
41+
sudo make install
42+
cd ..
43+
44+
rm -rf gdb-16.2 gdb-16.2.tar.xz
45+
46+
- shell: bash
47+
run: gdb --version

.github/workflows/main.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
include:
2121

2222
- job_name: Linux x86_64 multilib
23-
os: ubuntu-20.04
23+
os: ubuntu-22.04
2424
arch: x86_64
2525
# To improve portability of the generated binaries, link the C++ standard library statically.
2626
extra_cmake_flags: >-
@@ -34,8 +34,7 @@ jobs:
3434
with_pgo: true
3535

3636
- job_name: Linux aarch64
37-
os: ubuntu-22.04-arm # Ubuntu 20 not natively supported
38-
container_image: ubuntu:20.04
37+
os: ubuntu-22.04-arm
3938
arch: aarch64
4039
base_cmake_flags: >-
4140
-DCOMPILER_RT_LIBDIR_OS=aarch64-unknown-linux-gnu
@@ -152,6 +151,11 @@ jobs:
152151
with:
153152
llvm_version: ${{ matrix.llvm_version || env.LLVM_VERSION }}
154153
arch: ${{ matrix.arch }}
154+
- name: 'Ubuntu 22: Build recent gdb from source' # see https://github.com/ldc-developers/ldc/issues/4389
155+
if: startsWith(matrix.os, 'ubuntu-22.04')
156+
uses: ./.github/actions/helper-build-gdb
157+
with:
158+
arch: ${{ matrix.arch }}
155159
- name: Build bootstrap LDC
156160
if: runner.os != 'macOS'
157161
uses: ./.github/actions/2-build-bootstrap
@@ -239,13 +243,13 @@ jobs:
239243
include:
240244

241245
- job_name: Android armv7a
242-
host_os: ubuntu-20.04
246+
host_os: ubuntu-22.04
243247
os: android
244248
arch: armv7a
245249
android_x86_arch: i686
246250

247251
- job_name: Android aarch64
248-
host_os: ubuntu-20.04
252+
host_os: ubuntu-22.04
249253
os: android
250254
arch: aarch64
251255
android_x86_arch: x86_64

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# LDC master
22

33
#### Big news
4+
- The prebuilt (non-musl) Linux packages are now generated on Ubuntu 22.04; the minimum glibc version has accordingly been raised from v2.31 to v2.35. (#4893)
45
- ldc2.conf: Arrays can now be appended to via the `~=` operator. (#4848, #4856)
56
- New `--installWithSuffix` command-line option for the `ldc-build-runtime` tool, to simplify copying the libraries to an existing LDC installation. (#4870)
67

0 commit comments

Comments
 (0)