-
Notifications
You must be signed in to change notification settings - Fork 1
133 lines (105 loc) · 4.01 KB
/
ci.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
121
122
123
124
125
126
127
128
129
130
131
name: C/C++ CI
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]
jobs:
linux_ubuntu_20_04:
name: (Ubuntu 20.04) GCC ${{ matrix.gcc-version }}.x
runs-on: ubuntu-20.04
strategy:
matrix:
gcc-version: [9, 10, 11, 13] # 12 doesn't work for some reason
steps:
- uses: actions/checkout@v4
- name: Install GCC ${{ matrix.gcc-version }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install -y gcc-${{ matrix.gcc-version }} g++-${{ matrix.gcc-version }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc-version }}
sudo update-alternatives --set gcc /usr/bin/gcc-${{ matrix.gcc-version }}
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev cmake ninja-build
# Build with ninja
- name: Build quaesar
run: mkdir temp && cd temp && cmake .. -G Ninja && ninja
linux_clang_ubuntu_20_04:
runs-on: ubuntu-20.04
name: (Ubuntu 20.04) Clang ${{ matrix.clang-version }}.x
strategy:
matrix:
clang-version: [8, 9, 10, 11]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Clang ${{ matrix.clang-version }}
run: |
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.clang-version }}
sudo apt-get install -y clang++-${{ matrix.clang-version }}
- name: Select Clang ${{ matrix.clang-version }}
run: |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ matrix.clang-version }} 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.clang-version }} 100
clang --version # Display the version of clang for debugging
clang++ --version # Display the version of clang for debugging
- name: Install dependencies
run: sudo apt-get install -y libsdl2-dev
- name: Build quaesar
env:
CC: clang-${{ matrix.clang-version }}
CXX: clang++-${{ matrix.clang-version }}
run: make -j$(nproc)
linux_clang_ubuntu_22_04:
runs-on: ubuntu-22.04
name: (Ubuntu 22.04) Clang ${{ matrix.clang-version }}.x
strategy:
matrix:
clang-version: [12, 13, 14, 15]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Clang ${{ matrix.clang-version }}
run: |
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.clang-version }}
sudo apt-get install -y clang++-${{ matrix.clang-version }}
- name: Select Clang ${{ matrix.clang-version }}
run: |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ matrix.clang-version }} 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.clang-version }} 100
clang --version # Display the version of clang for debugging
clang++ --version # Display the version of clang for debugging
- name: Install dependencies
run: sudo apt-get install -y libsdl2-dev
- name: Build quaesar
env:
CC: clang-${{ matrix.clang-version }}
CXX: clang++-${{ matrix.clang-version }}
run: make -j$(nproc)
macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12, macos-13, macos-14]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: brew install sdl2
- name: Build quaesar
run: make -j$(nproc)
windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-2022]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup MSBuild path
uses: microsoft/[email protected]
- name: Build Solution (Debug, x64)
run: msbuild build/quaesar.sln /p:Configuration=Debug /p:Platform="x64"