Windows and Darwin slang-llvm builds #6
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: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Set up system dependencies | ||
shell: bash | ||
run: | | ||
Check failure on line 18 in .github/workflows/build-llvm-test.yml GitHub Actions / Build slang-llvmInvalid workflow file
|
||
case "${{matrix.os}}" in | ||
ubuntu*) sudo apt-get install -y ninja-build;; | ||
macos*) brew install ninja;; | ||
windows*) choco install ninja;; | ||
esac | ||
# If we're on an old ubuntu, make sure that we set CC and CXX to GCC-10 | ||
[ "${{matrix-os}}" != "ubuntu-20.04" ] || printf "CC=gcc-10\nCXX=g++-10\n" >> "$GITHUB_ENV" | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
fetch-depth: '0' | ||
- name: ccache | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
- name: configure | ||
shell: bash | ||
run: | | ||
mkdir -p build | ||
cmake -S . -B build \ | ||
-G "Ninja Multi-Config" \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DSLANG_USE_BINARY_SLANG_LLVM=0 -DSLANG_USE_SYSTEM_LLVM=0 | ||
- name: build | ||
shell: bash | ||
run: | | ||
cmake --build build -j $(nproc) --target slang-llvm --config Release | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: slang-llvm-${{matrix.os}} | ||
path: | | ||
build/Release/lib/libslang-llvm.so | ||
build/Release/lib/libslang-llvm.dylib | ||
build/Release/bin/slang-llvm.dll |