diff --git a/.github/actions/1-setup/action.yml b/.github/actions/1-setup/action.yml index 68ece5b0ee3..48726d0ae99 100644 --- a/.github/actions/1-setup/action.yml +++ b/.github/actions/1-setup/action.yml @@ -37,16 +37,6 @@ runs: # Make sure to link libzstd statically sudo rm /usr/lib/$arch-linux-gnu/libzstd.so - # Install a more recent CMake version in the AArch64 container (for mimalloc...) - if [[ $arch == aarch64 ]]; then - curl -fL --retry 3 --max-time 300 -o cmake.tar.gz \ - https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$arch.tar.gz - mkdir cmake - tar -xf cmake.tar.gz --strip 1 -C cmake - rm cmake.tar.gz - sudo ln -sf $PWD/cmake/bin/cmake /usr/bin/cmake - fi - - name: 'Linux: Install clang 19 from apt.llvm.org' if: runner.os == 'Linux' shell: bash diff --git a/.github/actions/4b-test-lit/action.yml b/.github/actions/4b-test-lit/action.yml index 0c7bfd106e9..7d4c58c7544 100644 --- a/.github/actions/4b-test-lit/action.yml +++ b/.github/actions/4b-test-lit/action.yml @@ -15,7 +15,6 @@ runs: if [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then # FIXME: the following tests fail rm tests/debuginfo/nested_gdb.d - rm tests/debuginfo/print_gdb.d # works for Cirrus CI though rm tests/sanitizers/fuzz_basic.d fi diff --git a/.github/actions/4d-test-libs/action.yml b/.github/actions/4d-test-libs/action.yml index fb83069b140..52257977a9d 100644 --- a/.github/actions/4d-test-libs/action.yml +++ b/.github/actions/4d-test-libs/action.yml @@ -19,7 +19,10 @@ runs: fi excludes="dmd-testsuite|lit-tests|ldc2-unittest" - if [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then + if [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-x86_64 ]]; then + # sporadically hanging since Ubuntu 22 + excludes+='|^core.thread-shared_32$' + elif [[ '${{ runner.os }}-${{ inputs.arch }}' == Linux-aarch64 ]]; then # FIXME: failing unittest(s) excludes+='|^std.internal.math.gammafunction' # FIXME: failing unittest(s) with enabled optimizations diff --git a/.github/actions/helper-build-gdb/action.yml b/.github/actions/helper-build-gdb/action.yml new file mode 100644 index 00000000000..8834231d5fa --- /dev/null +++ b/.github/actions/helper-build-gdb/action.yml @@ -0,0 +1,47 @@ +name: Build gdb from source +inputs: + arch: + required: true +runs: + using: composite + steps: + - name: Pre-create user-owned directory /usr/local/share/gdb, required for cache restore + shell: bash + run: | + set -eux + sudo mkdir /usr/local/share/gdb + sudo chown $(id -u):$(id -g) /usr/local/share/gdb + + - name: Try to restore from cache + uses: actions/cache@v4 + with: + path: | + /usr/local/bin/gdb + /usr/local/share/gdb + key: gdb-${{ inputs.arch }} + + - shell: bash + run: | + set -eux + + if [[ -f /usr/local/bin/gdb ]]; then + echo "Already cached" + exit 0 + fi + + sudo apt-get -yq install libmpfr-dev + + cd .. + curl -fL --retry 3 --max-time 60 -O https://mirrors.ocf.berkeley.edu/gnu/gdb/gdb-16.2.tar.xz + tar xf gdb-16.2.tar.xz + + cd gdb-16.2 + ./configure + make -j$(nproc) + sudo make install + cd .. + + rm -rf gdb-16.2 gdb-16.2.tar.xz + + - shell: bash + run: gdb --version diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ea649f5396b..05870b833f8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: include: - job_name: Linux x86_64 multilib - os: ubuntu-20.04 + os: ubuntu-22.04 arch: x86_64 # To improve portability of the generated binaries, link the C++ standard library statically. extra_cmake_flags: >- @@ -34,8 +34,7 @@ jobs: with_pgo: true - job_name: Linux aarch64 - os: ubuntu-22.04-arm # Ubuntu 20 not natively supported - container_image: ubuntu:20.04 + os: ubuntu-22.04-arm arch: aarch64 base_cmake_flags: >- -DCOMPILER_RT_LIBDIR_OS=aarch64-unknown-linux-gnu @@ -152,6 +151,11 @@ jobs: with: llvm_version: ${{ matrix.llvm_version || env.LLVM_VERSION }} arch: ${{ matrix.arch }} + - name: 'Ubuntu 22: Build recent gdb from source' # see https://github.com/ldc-developers/ldc/issues/4389 + if: startsWith(matrix.os, 'ubuntu-22.04') + uses: ./.github/actions/helper-build-gdb + with: + arch: ${{ matrix.arch }} - name: Build bootstrap LDC if: runner.os != 'macOS' uses: ./.github/actions/2-build-bootstrap @@ -239,13 +243,13 @@ jobs: include: - job_name: Android armv7a - host_os: ubuntu-20.04 + host_os: ubuntu-22.04 os: android arch: armv7a android_x86_arch: i686 - job_name: Android aarch64 - host_os: ubuntu-20.04 + host_os: ubuntu-22.04 os: android arch: aarch64 android_x86_arch: x86_64 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e88424f72e..ea3a1a2b34d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # LDC master #### Big news +- 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) - ldc2.conf: Arrays can now be appended to via the `~=` operator. (#4848, #4856) - New `--installWithSuffix` command-line option for the `ldc-build-runtime` tool, to simplify copying the libraries to an existing LDC installation. (#4870)