diff --git a/.github/actions/1-setup/action.yml b/.github/actions/1-setup/action.yml index 6b98463e3664112..26e92a4023a00f3 100644 --- a/.github/actions/1-setup/action.yml +++ b/.github/actions/1-setup/action.yml @@ -1,7 +1,5 @@ name: Install prerequisites inputs: - clang_version: - required: true arch: required: true runs: @@ -17,50 +15,43 @@ runs: export DEBIAN_FRONTEND=noninteractive sudo apt-get -q update sudo -E apt-get -yq install \ - git-core curl xz-utils ninja-build g++ python3 pkgconf binutils-dev libxml2-dev libzstd-dev zlib1g-dev p7zip-full unzip + git-core curl xz-utils g++ python3 pkgconf binutils-dev libxml2-dev libzstd-dev zlib1g-dev p7zip-full unzip - # install a recent CMake version (Ubuntu 20's too old) - 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-${{ inputs.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 + # install a more recent CMake version in the AArch64 container (Ubuntu 20's too old) + 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-${{ inputs.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: Download & extract clang' # into ../clang + - name: 'Linux: Install clang 19 from apt.llvm.org' if: runner.os == 'Linux' shell: bash run: | set -eux cd .. - version='${{ inputs.clang_version }}' - arch='${{ inputs.arch }}' - extraSuffix='' - if [[ $arch == x86_64 ]]; then - extraSuffix='-ubuntu-18.04' - fi - curl -fL --retry 3 --max-time 300 -o clang.tar.xz \ - https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang+llvm-$version-$arch-linux-gnu$extraSuffix.tar.xz - mkdir clang - tar -xf clang.tar.xz --strip 1 -C clang - rm clang.tar.xz - clang/bin/clang --version + curl -fL --retry 3 --max-time 30 -O https://apt.llvm.org/llvm.sh + sudo bash llvm.sh 19 # use it as C(++) compiler for future steps - echo "CC=$PWD/clang/bin/clang" >> $GITHUB_ENV - echo "CXX=$PWD/clang/bin/clang++" >> $GITHUB_ENV + echo "CC=clang-19" >> $GITHUB_ENV + echo "CXX=clang++-19" >> $GITHUB_ENV # make bundled lld the default linker - sudo ln -sf "$PWD/clang/bin/ld.lld" /usr/bin/ld + sudo ln -sf ld.lld-19 /usr/bin/ld ld --version - - name: 'Windows: Install clang' + + - name: 'Windows: Install clang v19.1.3 from GitHub' if: runner.os == 'Windows' shell: bash run: | set -eux cd .. curl -fL --retry 3 --max-time 300 -o clang.exe \ - https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ inputs.clang_version }}/LLVM-${{ inputs.clang_version }}-win64.exe + https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.3/LLVM-19.1.3-win64.exe ./clang.exe //S # double-slash for bash rm clang.exe @@ -78,9 +69,8 @@ runs: echo "ASMFLAGS=-m32" >> $GITHUB_ENV fi - - name: 'Non-Linux: Install ninja' - if: runner.os != 'Linux' - uses: seanmiddleditch/gha-setup-ninja@v4 + - name: Install ninja v1.12.1 + uses: Ahajha/gha-setup-ninja@69595b0cf872acdad8ce599142fbdc88724b9a2b - name: 'Windows: Set LDC_VSDIR env variable' if: runner.os == 'Windows' diff --git a/.github/workflows/ldc-release.yml b/.github/workflows/ldc-release.yml index 1c62f8a0ebed5d3..1e508f7352bf7c2 100644 --- a/.github/workflows/ldc-release.yml +++ b/.github/workflows/ldc-release.yml @@ -11,8 +11,6 @@ concurrency: cancel-in-progress: true env: - # no recent official clang packages for Ubuntu 20 - CLANG_VERSION: 15.0.6 # Prevent dependencies on some purely optional libraries, and a dependency on clang # for compiler-rt tests. BASE_CMAKE_FLAGS: >- @@ -33,22 +31,18 @@ jobs: os: windows-2022 arch: x64 with_asserts: false - clang_version: 19.1.3 # the MSVC headers require clang 16+ - job_name: Windows x64 withAsserts os: windows-2022 arch: x64 with_asserts: true - clang_version: 19.1.3 # the MSVC headers require clang 16+ - job_name: Windows x86 os: windows-2022 arch: x86 with_asserts: false - clang_version: 19.1.3 # the MSVC headers require clang 16+ - job_name: Windows x86 withAsserts os: windows-2022 arch: x86 with_asserts: true - clang_version: 19.1.3 # the MSVC headers require clang 16+ - job_name: Linux x86_64 os: ubuntu-20.04 arch: x86_64 @@ -62,13 +56,11 @@ jobs: container_image: ubuntu:20.04 arch: aarch64 with_asserts: false - clang_version: 15.0.3 # 15.0.6 requires a more recent libstdc++.so.6 than shipped with Ubuntu 20 - job_name: Linux aarch64 withAsserts os: ubuntu-22.04-arm # Ubuntu 20 not natively supported container_image: ubuntu:20.04 arch: aarch64 with_asserts: true - clang_version: 15.0.3 # 15.0.6 requires a more recent libstdc++.so.6 than shipped with Ubuntu 20 - job_name: macOS arm64 os: macos-15 arch: arm64 @@ -103,7 +95,6 @@ jobs: - name: Install prerequisites uses: ./.github/actions/1-setup with: - clang_version: ${{ matrix.clang_version || env.CLANG_VERSION }} arch: ${{ matrix.arch }} # BOLT supports ELF binaries only, so include it for Linux packages only - name: Build & install LLVM incl. LLD, compiler-rt${{ runner.os == 'Linux' && ', BOLT' || '' }} @@ -156,7 +147,6 @@ jobs: - name: Install prerequisites uses: ./.github/actions/1-setup with: - clang_version: ${{ env.CLANG_VERSION }} arch: x86_64 - name: Build native llvm-tblgen shell: bash