Skip to content

NES Clang builder

NES Clang builder #90

Workflow file for this run

name: NES Clang builder
on:
push:
tags:
- 'v*'
jobs:
build-linux:
timeout-minutes: 360

Check failure on line 10 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 10
runs-on: [self-hosted, linux, ${{ matrix.arch }}, dep-builder]
container:
image: nebulastream/nes-development-base:latest
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
stdlib: [libc++, stdlibc++]
sanitizer: [null, 'Address', 'Thread', 'Undefined']
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Build Clang
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
if [ ! -z "${CXX_FLAGS}" ]; then
ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -DCMAKE_CXX_FLAGS=\"${CXX_FLAGS}\""
fi
if [ ! -z "${LINKER_FLAGS}" ]; then
ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -DCMAKE_EXE_LINKER_FLAGS=\"${LINKER_FLAGS}\""
fi
cmake -G Ninja -S 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