NES Clang builder #101
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |