-
Notifications
You must be signed in to change notification settings - Fork 2
99 lines (82 loc) · 2.58 KB
/
build.yaml
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
name: build
on:
push:
pull_request:
env:
BUILD_TYPE: Release
jobs:
linux:
runs-on: ubuntu-20.04
name: 🐧 Ubuntu 20.04
steps:
- name: 🧰 Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: ⬇️ Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
gcc-10 \
g++-10 \
libsdl2-dev \
libsdl2-mixer-dev
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
env:
CC: gcc-10
CXX: g++-10
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
env:
CC: gcc-10
CXX: g++-10
run: cmake --build . --config $BUILD_TYPE
win:
runs-on: windows-latest
name: 🟦 Windows x64
steps:
- name: 🧰 Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake Windows
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_BIN_DIR="c:/vcpkg/installed/x64-windows/bin"
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
# macos-build:
# runs-on: macos-10.15
# name: 🍎 macOS 10.15
# steps:
# - name: 🧰 Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# submodules: true
# - name: ⬇️ Install dependencies
# run: brew install sdl2 sdl2_mixer
# - name: Create Build Environment
# run: cmake -E make_directory ${{runner.workspace}}/build
# - name: Configure CMake
# shell: bash
# working-directory: ${{runner.workspace}}/build
# run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
# - name: Build
# working-directory: ${{runner.workspace}}/build
# shell: bash
# run: |
# cmake --build . --config $BUILD_TYPE