-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (83 loc) · 2.21 KB
/
c-cpp.yml
File metadata and controls
94 lines (83 loc) · 2.21 KB
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
name: Build-CSC2549-Assignment-Four
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
# Linux / macOS
Unix:
name: ${{ matrix.name }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
config: [Release]
include:
- os: macos-latest
name: macOS
- os: ubuntu-latest
name: Linux
env:
OMP_NUM_THREADS: 1
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install \
build-essential \
cmake \
mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev \
xorg-dev \
libx11-dev \
libxinerama1 libxinerama-dev \
libxcursor-dev libxrandr-dev libxi-dev libxmu-dev \
- name: Dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew info git || brew install git
brew info cmake || brew install cmake
- name: Configure
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.config }}
- name: Build
run: |
cd build
make
# Windows
Windows:
runs-on: windows-latest
env:
CC: cl.exe
CXX: cl.exe
strategy:
fail-fast: false
matrix:
config: [Release]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Configure and build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cmake -G Ninja ^
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
-B build ^
-S .
cmake --build build