forked from syoyo/tinygltf
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.43 KB
/
c-cpp.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
name: C/C++ CI
on:
push:
branches:
- main
- 'release/*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
compiler: gcc
- os: ubuntu-latest
compiler: clang
- os: windows-latest
compiler: vs2019
- os: macos-latest
compiler: clang
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install build essentials
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
sudo apt-get update
sudo apt-get install -y build-essential
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then
choco install visualstudio2019buildtools --package-parameters "--includeRecommended --includeOptional"
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
xcode-select --install
fi
- name: Set up CMake ${{ matrix.compiler }}
uses: dawidd6/action-cmake@v1
with:
cmake-version: 3.21
- name: Build and Test
run: |
cd ${{ github.workspace }}/tinygltf
mkdir build
cd build
cmake ..
cmake --build .
ctest