use ninja for build #5
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: Build slang-llvm | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
configuration: ['release'] | |
platform: ['x64'] | |
steps: | |
- name: install Ninja | |
run: sudo apt-get install -y ninja-build | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
fetch-depth: '0' | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1.2 | |
- name: configure | |
run: | | |
mkdir -p build | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
cmake -S . -B build \ | |
-G "Ninja Multi-Config" \ | |
-DSLANG_USE_BINARY_SLANG_LLVM=0 -DSLANG_USE_SYSTEM_LLVM=0 \ | |
env: | |
CC: gcc-10 | |
CXX: g++-10 | |
CMAKE_C_COMPILER_LAUNCHER: ccache | |
CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
- name: build | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
cmake --build build -j $(nproc) --target slang-llvm --config Release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: slang-llvm-${{matrix.configuration}}-${{matrix.platform}} | |
path: | | |
build/Release/lib/libslang-llvm.so |