-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (49 loc) · 1.37 KB
/
cmake-multi-platform.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
name: CMake on multiple platforms
on:
push:
branches: ["dev"]
pull_request:
branches: ["dev"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
steps:
- uses: actions/checkout@v3
- name: Install libxrandr (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install xorg-dev
- name: Git Submodule Update
run: |
git submodule update --init --recursive
git submodule foreach 'git fetch origin main:main || true'
git submodule foreach 'git checkout main || true'
- name: Build (Windows)
if: startsWith(matrix.os, 'windows')
run: cmake -G "Unix Makefiles" .
- name: Build
run: cmake .
- name: Test
run: make