Skip to content

Commit

Permalink
[CI] fix LLVM installation on Linux CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthapz committed Nov 2, 2024
1 parent 1a49a42 commit 73cd4cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:

jobs:
build:
name: Linux-${{ matrix.arch }} ( ${{ matrix.kind }}-${{ matrix.mode }} )
name: Linux-${{ matrix.arch }} (${{ matrix.kind }}-${{ matrix.mode }})

strategy:
fail-fast: false
Expand Down Expand Up @@ -75,16 +75,21 @@ jobs:
# path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
# key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-${{ steps.cache_key.outputs.key }}

- name: Add LLVM apt repository
run: |
sudo 'echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main
deb-src http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main" >> /etc/apt/source.list'
sudo apt update
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
uses: awalsh128/cache-apt-pkgs-action@latest
with:
version: "19.1.3"
directory: ${{ runner.temp }}/llvm
packages: clang libc++-dev libc++1 libc++abi-dev libc++abi1 mold llvm-runtime llvm

- name: Configure & Build
id: build
run: |
xmake f -v -a ${{ (matrix.arch == "x64") && "x86_64" || (matrix.arch == "arm64") && "aarch64" || matrix.arch }} --yes -m ${{ (matrix.mode == 'release' || matrix.mode == 'debug') && matrix.mode || 'releasedbg' }} -k ${{ matrix.kind }} --sanitizers=${{ matrix.mode == 'debug' && 'y' || 'n' }} --examples=y --tests=y --toolchain=llvm --mold=y --runtimes="c++_shared" --sdk="${{ runner.temp }}/llvm"
xmake f -v -a ${{ (matrix.arch == 'x64') && 'x86_64' || (matrix.arch == 'arm64') && 'aarch64' || matrix.arch }} --yes -m ${{ (matrix.mode == 'release' || matrix.mode == 'debug') && matrix.mode || 'releasedbg' }} -k ${{ matrix.kind }} --sanitizers=${{ matrix.mode == 'debug' && 'y' || 'n' }} --examples=y --tests=y --toolchain=llvm --mold=y --runtimes="c++_shared" --sdk="${{ runner.temp }}/llvm"
xmake b -v
- name: Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:

jobs:
build:
name: ${{ matrix.os }}-${{ matrix.arch }} ( ${{ matrix.kind }}-${{ matrix.mode }} )
name: ${{ matrix.os }}-${{ matrix.arch }} (${{ matrix.kind }}-${{ matrix.mode }})
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit 73cd4cf

Please sign in to comment.