Skip to content

Commit 7fd870c

Browse files
committed
fixes
1 parent 5a70673 commit 7fd870c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/build.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
include:
2323
- name: x86_64-linux-gnu
24-
os: ubuntu-20.04 # for old glibc
24+
os: nscloud-ubuntu-20.04-amd64-4x8 # for old glibc
2525
# LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON normally set by llvm/CMakeLists.txt but doesn't propagate to our separate runtimes build
2626
more-opts: -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_INSTALL_RPATH='$ORIGIN/../lib' -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
2727
- name: aarch64-linux-gnu
@@ -78,8 +78,9 @@ jobs:
7878
with:
7979
msystem: clang64
8080
install: mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-ccache git mingw-w64-clang-x86_64-cmake make tar zstd
81-
- name: Cache
82-
uses: actions/cache@v2
81+
- name: Restore Cache
82+
id: restore-cache
83+
uses: actions/cache/restore@v4
8384
with:
8485
path: .ccache
8586
key: ${{ matrix.name }}-build-${{ github.sha }}
@@ -88,6 +89,7 @@ jobs:
8889
${{ matrix.name }}-build
8990
- name: Build
9091
run: |
92+
set -euxo pipefail
9193
git clone -q --depth 1 -b llvmorg-19.1.2 --recursive https://github.com/llvm/llvm-project
9294
cmake llvm-project/llvm -G Ninja -B build/llvm -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/lean-llvm -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++\
9395
-DLLVM_ENABLE_PROJECTS="llvm;clang;lld;compiler-rt;bolt" -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_CCACHE_BUILD=ON\
@@ -122,6 +124,12 @@ jobs:
122124
run: lean-llvm/bin/clang -v
123125
- name: CCache stats
124126
run: ccache -s
127+
- name: Save Cache
128+
if: always() && steps.restore-cache.outputs.cache-hit != 'true'
129+
uses: actions/cache/save@v4
130+
with:
131+
path: .ccache
132+
key: ${{ matrix.name }}-build-${{ github.sha }}
125133
- uses: actions/upload-artifact@v4
126134
with:
127135
name: lean-llvm-${{ matrix.name }}

0 commit comments

Comments
 (0)