-
Notifications
You must be signed in to change notification settings - Fork 6
186 lines (160 loc) · 5.68 KB
/
ci.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: CI
on: [ push ]
jobs:
macos-latest-ci:
runs-on: macos-latest
if: contains(github.event.head_commit.message, '[skip-ci]') == false
env:
VCPKG_ROOT: ${{github.workspace}}/vcpkg
VCPKG_TARGET_TRIPLET: x64-osx
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install system dependencies
run: |
brew install cmake
brew install ninja
brew install llvm
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Restore Vcpkg artifacts
id: restore-vcpkg-artifacts
uses: actions/cache@v3
with:
path: |
${{env.VCPKG_ROOT}}
!${{env.VCPKG_ROOT}}\buildtrees
!${{env.VCPKG_ROOT}}\packages
!${{env.VCPKG_ROOT}}\downloads
!${{env.VCPKG_ROOT}}\installed
key: tactile-ci-macos-vcpkg-${{hashFiles('vcpkg.json')}}
- name: Install Vcpkg
if: steps.restore-vcpkg-artifacts.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Generate build files
run: |
mkdir build && cd build
cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang \
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++ \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} \
-DTACTILE_TREAT_WARNINGS_AS_ERRORS=ON \
-DTACTILE_USE_SANITIZERS=ON
- name: Build
run: ninja -C build
- name: Run tests
working-directory: ./build/test
run: ./TactileTests
ubuntu-latest-ci:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[skip-ci]') == false
env:
VCPKG_ROOT: ${{github.workspace}}/vcpkg
VCPKG_TARGET_TRIPLET: x64-linux
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install system dependencies
run: |
sudo apt install ninja-build \
libx11-dev \
libxft-dev \
libxext-dev \
libwayland-dev \
libxkbcommon-dev \
libegl1-mesa-dev \
libibus-1.0-dev \
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Restore Vcpkg artifacts
id: restore-vcpkg-artifacts
uses: actions/cache@v3
with:
path: |
${{env.VCPKG_ROOT}}
!${{env.VCPKG_ROOT}}\buildtrees
!${{env.VCPKG_ROOT}}\packages
!${{env.VCPKG_ROOT}}\downloads
!${{env.VCPKG_ROOT}}\installed
key: tactile-ci-ubuntu-vcpkg-${{hashFiles('vcpkg.json')}}
- name: Install Vcpkg
if: steps.restore-vcpkg-artifacts.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Generate build files
run: |
mkdir build && cd build
cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} \
-DTACTILE_TREAT_WARNINGS_AS_ERRORS=ON \
-DTACTILE_USE_SANITIZERS=ON
- name: Build
run: ninja -C build
#- name: Run tests
# working-directory: ./build/test
# run: ./TactileTests
windows-latest-ci:
runs-on: windows-latest
if: contains(github.event.head_commit.message, '[skip-ci]') == false
env:
VCPKG_ROOT: ${{github.workspace}}\vcpkg
VCPKG_TARGET_TRIPLET: x64-windows-static-md
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1.11.0
- name: Set up CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Restore Vcpkg artifacts
id: restore-vcpkg-artifacts
uses: actions/cache@v3
with:
path: |
${{env.VCPKG_ROOT}}
!${{env.VCPKG_ROOT}}\buildtrees
!${{env.VCPKG_ROOT}}\packages
!${{env.VCPKG_ROOT}}\downloads
!${{env.VCPKG_ROOT}}\installed
key: tactile-ci-windows-vcpkg-${{hashFiles('vcpkg.json')}}
- name: Install Vcpkg
if: steps.restore-vcpkg-artifacts.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics
- name: Generate build files
run: |
mkdir build
cd build
cmake .. -GNinja `
-DCMAKE_BUILD_TYPE=Debug `
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} `
-DTACTILE_TREAT_WARNINGS_AS_ERRORS=ON
- name: Build
run: ninja -C build
- name: Run tests
working-directory: ./build/test
shell: cmd
run: TactileTests.exe