-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.34 KB
/
cpp.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
name: C/C++ CI
on: [push]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install_dependencies
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get update && sudo apt-get install xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libsdl2-dev
fi
if [ "$RUNNER_OS" == "macOS" ]; then
brew install SDL2
brew install SDL2_image
fi
if [ "$RUNNER_OS" == "Windows" ]; then
mkdir SDL2
curl -L -O https://www.libsdl.org/release/SDL2-devel-2.0.14-mingw.tar.gz
tar xzf SDL2-devel-2.0.14-mingw.tar.gz -C SDL2
ls SDL2/SDL2-2.0.14/
fi
- name: build
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
export SDL2_DIR=${{ github.workspace }}/SDL2/SDL2-2.0.14/x86_64-w64-mingw32
fi
mkdir build
cd build
cmake ..
cmake --build . -j 8