-
Notifications
You must be signed in to change notification settings - Fork 13
120 lines (102 loc) · 3.96 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
115
116
117
118
119
120
name: CMake
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-ubuntu-latest:
runs-on: ubuntu-latest
strategy:
matrix:
ubuntu-version: [ubuntu-latest]
build-type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up GCC 11
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- run: sudo apt-get update
- run: sudo apt-get install gcc-11 g++-11
- run:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11
999
- run:
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11
999
- name: Install Grail dependencies
run:
sudo apt install libglfw3-dev libfreetype-dev mpv libmpv-dev
liblzma-dev
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run:
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build-type
}}
- name: Build
# Build your program with the given configuration
run: cmake --build build --config ${{ matrix.build-type }}
build-ubuntu-prev:
# keeping this separate from latest for now despite having same steps as dependencies occasionally change
runs-on: ubuntu-20.04
strategy:
matrix:
build-type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up GCC 11
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- run: sudo apt-get update
- run: sudo apt-get install gcc-11 g++-11
- run:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11
999
- run:
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11
999
- name: Install Grail dependencies
run:
sudo apt install libglfw3-dev libfreetype-dev mpv libmpv-dev
liblzma-dev
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run:
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build-type
}}
- name: Build
# Build your program with the given configuration
run: cmake --build build --config ${{ matrix.build-type }}
build-windows:
runs-on: windows-latest
strategy:
matrix:
build-type: [Debug, Release]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
path-type: inherit
update: true
install: >-
git flex bison make mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake mingw-w64-x86_64-zlib
mingw-w64-x86_64-freetype mingw-w64-x86_64-glfw mingw-w64-x86_64-mpv
mingw-w64-x86_64-youtube-dl mingw-w64-x86_64-intel-tbb
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run:
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build-type
}}
- name: Build
# Build your program with the given configuration
run: cmake --build build --config ${{ matrix.build-type }}