Skip to content

Commit

Permalink
[LDC] CI: Migrate Linux AArch64 job from Cirrus CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Jan 18, 2025
1 parent f29d44d commit ff018e1
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 116 deletions.
107 changes: 0 additions & 107 deletions .cirrus.yml

This file was deleted.

15 changes: 10 additions & 5 deletions .github/actions/1-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ runs:
set -eux
export DEBIAN_FRONTEND=noninteractive
sudo apt-get -q update
sudo apt-get -yq install \
git-core cmake g++ binutils-dev libzstd-dev python p7zip-full unzip
sudo -E apt-get -yq install \
git-core curl xz-utils cmake ninja-build g++ python3 pkg-config binutils-dev libxml2-dev libzstd-dev zlib1g-dev p7zip-full unzip
- name: 'Linux: Download & extract clang' # into ../clang
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-x86_64-linux-gnu-ubuntu-18.04.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
Expand Down Expand Up @@ -64,7 +68,8 @@ runs:
echo "ASMFLAGS=-m32" >> $GITHUB_ENV
fi
- name: Install ninja
- name: 'Non-Linux: Install ninja'
if: runner.os != 'Linux'
uses: seanmiddleditch/gha-setup-ninja@v4

- name: 'Windows: Set LDC_VSDIR env variable'
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/3-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ runs:
echo "ARTIFACT_ID=$artifactID" >> $GITHUB_ENV
echo "ARTIFACT_NAME=$os-${{ inputs.arch }}$assertsSuffix" >> $GITHUB_ENV
- name: 'Linux: Pack source dir'
if: runner.os == 'Linux' && inputs.os == '' && inputs.with_asserts == 'false'
- name: 'Linux x86_64: Pack source dir'
if: runner.os == 'Linux' && inputs.os == '' && inputs.arch == 'x86_64' && inputs.with_asserts == 'false'
shell: bash
run: |
set -euxo pipefail
Expand Down
27 changes: 25 additions & 2 deletions .github/workflows/ldc-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,22 @@ 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
Expand All @@ -53,6 +57,18 @@ jobs:
os: ubuntu-20.04
arch: x86_64
with_asserts: true
- job_name: Linux aarch64
os: ubuntu-22.04-arm # Ubuntu 20 not natively supported
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
Expand All @@ -71,16 +87,23 @@ jobs:
with_asserts: true
name: ${{ matrix.job_name }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container_image }}
timeout-minutes: 240
env:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.arch == 'arm64' && '11.0' || '10.12' }}
steps:
- name: 'Container: Install git and sudo'
if: matrix.container_image
shell: bash
run: |
set -eux
apt-get -q update
DEBIAN_FRONTEND=noninteractive apt-get -yq install git-core sudo
- uses: actions/checkout@v4
- name: Install prerequisites
uses: ./.github/actions/1-setup
with:
# on Windows, the MSVC headers require clang 16+
clang_version: ${{ runner.os == 'Windows' && '19.1.3' || env.CLANG_VERSION }}
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' || '' }}
Expand Down

0 comments on commit ff018e1

Please sign in to comment.