-
Notifications
You must be signed in to change notification settings - Fork 35
114 lines (97 loc) · 3.13 KB
/
cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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