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