-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (70 loc) · 2.21 KB
/
compile.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
name: compile
on:
pull_request:
push:
branches:
- main
jobs:
ubuntu_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies(Ubuntu)
run: |
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" -y
sudo apt-get install libsdl2-dev -y
sudo apt-get install gcc cmake -y
- name: Build & Install(Ubuntu)
run: |
sudo mkdir cmake-build-release
cd cmake-build-release
sudo cmake -DCMAKE_BUILD_TYPE=Release ..
sudo cmake --install .
- name: Build all examples(Ubuntu)
run: |
cd cmake-build-release
sudo cmake -DCMAKE_BUILD_TYPE=Release ..
sudo cmake --build .
windows_build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies(Windows)
shell: powershell
run: |
vcpkg install sdl2:x64-windows
vcpkg integrate install
- name: Build & Install(Windows)
shell: powershell
run: |
mkdir cmake-build-release
cd cmake-build-release
cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --install .
- name: Build all examples(Windows)
shell: powershell
run: |
cd cmake-build-release
cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build .
macos_build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies(MacOS)
run: |
brew install cmake sdl2
- name: Build & Install(MacOS)
run: |
sudo mkdir cmake-build-release
cd cmake-build-release
sudo cmake -DCMAKE_BUILD_TYPE=Release ..
sudo cmake --install .
- name: Build all examples(MacOS)
run: |
cd cmake-build-release
sudo cmake -DCMAKE_BUILD_TYPE=Release ..
sudo cmake --build .