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