-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (67 loc) · 2.47 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: NES Clang builder
on:
push:
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-linux:
timeout-minutes: 360
container:
image: nebulastream/nes-development-base:latest
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
stdlib: [libc++, stdlibc++]
sanitizer: [null, 'Address', 'Thread', 'Undefined']
exclude:
arch: arm64
stdlib: stdlibc++
runs-on: [self-hosted, linux, "${{ matrix.arch }}", dep-builder]
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build Clang
shell: bash
id: installdeps
run: |
if [[ "${{ matrix.stdlib }}" == "libc++" ]]; then
CXX_FLAGS="-stdlib=libc++ -std=c++20"
LINKER_FLAGS="-lc++"
elif [[ "${{ matrix.stdlib }}" == "stdlibc++" ]]; then
CXX_FLAGS="-std=c++20"
LINKER_FLAGS=""
fi
if [[ ! -z "${{ matrix.sanitizer || '' }}" ]]; then
ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -DLLVM_USE_SANITIZER=${ENABLE_SANITIZER}"
fi
export CXXFLAGS=${CXX_FLAGS}
export LDFLAGS="${LINKER_FLAGS} -fuse-ld=mold"
cmake -G Ninja -S llvm-project/llvm -B build -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="mlir" \
-DBOOTSTRAP_LLVM_ENABLE_LTO=ON \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DCMAKE_INSTALL_PREFIX="/build_dir/clang" \
-DLLVM_TARGETS_TO_BUILD="X86;AArch64" \
-DLLVM_BUILD_TOOLS=ON \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_Z3_SOLVER=OFF \
${ADDITIONAL_FLAGS}
cmake --build build --target install -j$(nproc)
7z a nes-clang-18-${{ matrix.stdlib }}-X64-${{ matrix.sanitizer || 'None' }}.7z /build_dir/clang -mx9 -aoa
- name: Release
uses: softprops/action-gh-release@v1
id: createrelease
with:
files: |
nes-clang-18-${{ matrix.stdlib }}-X64-${{ matrix.sanitizer || 'None' }}.7z