Merge pull request #50 from dengwirda/dev #20
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: CMake Build Matrix | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
env: | |
BUILD_TYPE: Debug | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Windows Latest MSVC", artifact: "Windows-MSVC.tar.xz", | |
os: windows-latest, | |
cc: "cl", cxx: "cl" | |
} | |
- { | |
name: "Ubuntu Latest GCC", artifact: "Linux.tar.xz", | |
os: ubuntu-latest, | |
cc: "gcc", cxx: "g++" | |
} | |
- { | |
name: "macOS Latest Clang", artifact: "macOS.tar.xz", | |
os: macos-latest, | |
cc: "clang", cxx: "clang++" | |
} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Print environment | |
run: | | |
echo github.event.action: ${{ github.event.action }} | |
echo github.event_name: ${{ github.event_name }} | |
- name: Install dependencies on win | |
if: startsWith(matrix.config.os, 'windows') | |
run: | | |
choco install ninja cmake | |
ninja --version | |
cmake --version | |
- name: Install dependencies on unx | |
if: startsWith(matrix.config.name, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install ninja-build cmake | |
ninja --version | |
cmake --version | |
g++ --version | |
- name: Install dependencies on osx | |
if: startsWith(matrix.config.os, 'macos') | |
run: | | |
brew install ninja cmake llvm libomp | |
ninja --version | |
cmake --version | |
clang++ --version | |
- name: Configure jigsaw | |
run: | | |
mkdir ${{github.workspace}}/build | |
cd ${{github.workspace}}/build | |
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build jigsaw | |
run: | | |
cd ${{github.workspace}}/build | |
cmake --build . --config ${{env.BUILD_TYPE}} --target install | |
- name: Clean jigsaw | |
run: rm -r ${{github.workspace}}/build | |
- name: Configure tests for jigsaw | |
run: | | |
mkdir ${{github.workspace}}/uni/build | |
cd ${{github.workspace}}/uni/build | |
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build tests for jigsaw | |
run: | | |
cd ${{github.workspace}}/uni/build | |
cmake --build . --config ${{env.BUILD_TYPE}} --target install | |
- name: Prep. tests for jigsaw | |
if: startsWith(matrix.config.os, 'windows') | |
run: | | |
cd ${{github.workspace}}/uni | |
cp ../lib/jigsaw.dll . | |
- name: Eval. tests for jigsaw | |
run: | | |
cd ${{github.workspace}}/uni | |
./test_all | |
- name: Extra tests for jigsaw | |
run: | | |
cd ${{github.workspace}} | |
./bin/jigsaw example.jig | |
./bin/jigsaw geo/airfoil.jig | |
./bin/jigsaw geo/bunny.jig | |
./bin/jigsaw geo/parts.jig | |
./bin/jigsaw geo/earth.jig | |
./bin/jigsaw geo/lakes.jig | |
- name: Clean tests for jigsaw | |
run: rm -r ${{github.workspace}}/uni/build |