]> git.lizzy.rs Git - nothing.git/blob - .github/workflows/ci.yml
8498f2b58fad19ce347283715e75ad71e1b97d84
[nothing.git] / .github / workflows / ci.yml
1 name: CI
2 on: [push, pull_request]
3
4 jobs:
5   # TODO: no clang on linux build on GitHub actions
6   build-linux:
7     runs-on: ubuntu-18.04
8     steps:
9       - uses: actions/checkout@v1
10       - name: install dependencies
11         run: |
12           sudo apt-get update
13           sudo apt-get install -qq libsdl2-dev 
14       - name: build nothing
15         run: |
16           ./build-posix.sh 
17         env: 
18           CC: gcc
19           NOTHING_CI: on
20
21   build-macos:
22     runs-on: macOS-10.14
23     steps:
24       - uses: actions/checkout@v1
25       - name: install dependencies
26         run: brew install sdl2 pkg-config
27       - name: build nothing
28         run: |
29           ./build-posix.sh
30         env: 
31           CC: clang
32           NOTHING_CI: on
33
34   # TODO: build-windows-msvc on GitHub Actions does not support SCU
35   build-windows-msvc:
36     runs-on: windows-2019
37     steps:
38       - uses: actions/checkout@v1
39         # this runs vcvarsall for us, so we get the MSVC toolchain in PATH.
40       - uses: seanmiddleditch/gha-setup-vsdevenv@master
41       - name: download sdl2
42         run: |
43           curl -fsSL -o SDL2-devel-2.0.9-VC.zip https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip
44           7z x SDL2-devel-2.0.9-VC.zip
45           mv SDL2-2.0.9 SDL2
46       - name: build nothing
47         run: |
48           mkdir build
49           cd build
50           cmake .. -DNOTHING_CI=ON
51           cmake --build .
52           
53   build-windows-mingw:
54     runs-on: windows-2019
55     steps:
56       - uses: actions/checkout@v1
57         # this gives us msys.
58       - uses: numworks/setup-msys2@v1
59       - name: install dependencies
60         run: msys2do pacman -S --noconfirm mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-SDL2 make mingw-w64-x86_64-pkg-config
61       - name: build nothing
62         run: |
63           msys2do ./build-posix.sh
64         env: 
65           CC: gcc
66           NOTHING_CI: on