Skip to content

Commit ea4e84c

Browse files
committed
[LDC] CI: Migrate Linux AArch64 job from Cirrus CI to GitHub Actions
1 parent f29d44d commit ea4e84c

File tree

4 files changed

+47
-116
lines changed

4 files changed

+47
-116
lines changed

.cirrus.yml

-107
This file was deleted.

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

+19-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@ runs:
1313
shell: bash
1414
run: |
1515
set -eux
16+
cd ..
1617
export DEBIAN_FRONTEND=noninteractive
1718
sudo apt-get -q update
18-
sudo apt-get -yq install \
19-
git-core cmake g++ binutils-dev libzstd-dev python p7zip-full unzip
19+
sudo -E apt-get -yq install \
20+
git-core curl xz-utils ninja-build g++ python3 pkgconf binutils-dev libxml2-dev libzstd-dev zlib1g-dev p7zip-full unzip
21+
22+
# install a recent CMake version (Ubuntu 20's too old)
23+
curl -fL --retry 3 --max-time 300 -o cmake.tar.gz \
24+
https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-${{ inputs.arch }}.tar.gz
25+
mkdir cmake
26+
tar -xf cmake.tar.gz --strip 1 -C cmake
27+
rm cmake.tar.gz
28+
sudo ln -sf $PWD/cmake/bin/cmake /usr/bin/cmake
2029
2130
- name: 'Linux: Download & extract clang' # into ../clang
2231
if: runner.os == 'Linux'
@@ -25,8 +34,13 @@ runs:
2534
set -eux
2635
cd ..
2736
version='${{ inputs.clang_version }}'
37+
arch='${{ inputs.arch }}'
38+
extraSuffix=''
39+
if [[ $arch == x86_64 ]]; then
40+
extraSuffix='-ubuntu-18.04'
41+
fi
2842
curl -fL --retry 3 --max-time 300 -o clang.tar.xz \
29-
https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang+llvm-$version-x86_64-linux-gnu-ubuntu-18.04.tar.xz
43+
https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang+llvm-$version-$arch-linux-gnu$extraSuffix.tar.xz
3044
mkdir clang
3145
tar -xf clang.tar.xz --strip 1 -C clang
3246
rm clang.tar.xz
@@ -64,7 +78,8 @@ runs:
6478
echo "ASMFLAGS=-m32" >> $GITHUB_ENV
6579
fi
6680
67-
- name: Install ninja
81+
- name: 'Non-Linux: Install ninja'
82+
if: runner.os != 'Linux'
6883
uses: seanmiddleditch/gha-setup-ninja@v4
6984

7085
- name: 'Windows: Set LDC_VSDIR env variable'

.github/actions/3-package/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ runs:
6868
echo "ARTIFACT_ID=$artifactID" >> $GITHUB_ENV
6969
echo "ARTIFACT_NAME=$os-${{ inputs.arch }}$assertsSuffix" >> $GITHUB_ENV
7070
71-
- name: 'Linux: Pack source dir'
72-
if: runner.os == 'Linux' && inputs.os == '' && inputs.with_asserts == 'false'
71+
- name: 'Linux x86_64: Pack source dir'
72+
if: runner.os == 'Linux' && inputs.os == '' && inputs.arch == 'x86_64' && inputs.with_asserts == 'false'
7373
shell: bash
7474
run: |
7575
set -euxo pipefail

.github/workflows/ldc-release.yml

+26-3
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,22 @@ jobs:
3333
os: windows-2022
3434
arch: x64
3535
with_asserts: false
36+
clang_version: 19.1.3 # the MSVC headers require clang 16+
3637
- job_name: Windows x64 withAsserts
3738
os: windows-2022
3839
arch: x64
3940
with_asserts: true
41+
clang_version: 19.1.3 # the MSVC headers require clang 16+
4042
- job_name: Windows x86
4143
os: windows-2022
4244
arch: x86
4345
with_asserts: false
46+
clang_version: 19.1.3 # the MSVC headers require clang 16+
4447
- job_name: Windows x86 withAsserts
4548
os: windows-2022
4649
arch: x86
4750
with_asserts: true
51+
clang_version: 19.1.3 # the MSVC headers require clang 16+
4852
- job_name: Linux x86_64
4953
os: ubuntu-20.04
5054
arch: x86_64
@@ -53,6 +57,18 @@ jobs:
5357
os: ubuntu-20.04
5458
arch: x86_64
5559
with_asserts: true
60+
- job_name: Linux aarch64
61+
os: ubuntu-22.04-arm # Ubuntu 20 not natively supported
62+
container_image: ubuntu:20.04
63+
arch: aarch64
64+
with_asserts: false
65+
clang_version: 15.0.3 # 15.0.6 requires a more recent libstdc++.so.6 than shipped with Ubuntu 20
66+
- job_name: Linux aarch64 withAsserts
67+
os: ubuntu-22.04-arm # Ubuntu 20 not natively supported
68+
container_image: ubuntu:20.04
69+
arch: aarch64
70+
with_asserts: true
71+
clang_version: 15.0.3 # 15.0.6 requires a more recent libstdc++.so.6 than shipped with Ubuntu 20
5672
- job_name: macOS arm64
5773
os: macos-15
5874
arch: arm64
@@ -71,16 +87,23 @@ jobs:
7187
with_asserts: true
7288
name: ${{ matrix.job_name }}
7389
runs-on: ${{ matrix.os }}
90+
container: ${{ matrix.container_image }}
7491
timeout-minutes: 240
7592
env:
7693
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.arch == 'arm64' && '11.0' || '10.12' }}
7794
steps:
95+
- name: 'Container: Install git and sudo'
96+
if: matrix.container_image
97+
shell: bash
98+
run: |
99+
set -eux
100+
apt-get -q update
101+
DEBIAN_FRONTEND=noninteractive apt-get -yq install git-core sudo
78102
- uses: actions/checkout@v4
79103
- name: Install prerequisites
80104
uses: ./.github/actions/1-setup
81105
with:
82-
# on Windows, the MSVC headers require clang 16+
83-
clang_version: ${{ runner.os == 'Windows' && '19.1.3' || env.CLANG_VERSION }}
106+
clang_version: ${{ matrix.clang_version || env.CLANG_VERSION }}
84107
arch: ${{ matrix.arch }}
85108
# BOLT supports ELF binaries only, so include it for Linux packages only
86109
- name: Build & install LLVM incl. LLD, compiler-rt${{ runner.os == 'Linux' && ', BOLT' || '' }}
@@ -134,7 +157,7 @@ jobs:
134157
uses: ./.github/actions/1-setup
135158
with:
136159
clang_version: ${{ env.CLANG_VERSION }}
137-
arch: ${{ matrix.arch }}
160+
arch: x86_64
138161
- name: Build native llvm-tblgen
139162
shell: bash
140163
run: |

0 commit comments

Comments
 (0)