-
Notifications
You must be signed in to change notification settings - Fork 101
60 lines (58 loc) · 1.76 KB
/
nob.yaml
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
name: no-build build
on: [push, pull_request]
jobs:
macos:
runs-on: macos-latest
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
- name: Build nob
run: clang -o nob nob.c
- name: Run nob
run: ./nob
- name: Upload build folder
uses: actions/upload-artifact@v3
with:
name: macos-build-folder
path: build/
ubuntu:
strategy:
matrix:
cc: [gcc, clang]
runs-on: ubuntu-latest
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
- name: Pull Deps
run: sudo apt install xorg-dev
- name: Build nob
run: ${{ matrix.cc }} -o nob nob.c
- name: Run nob
run: ./nob
- name: Upload build folder
uses: actions/upload-artifact@v3
with:
name: ubuntu-${{ matrix.cc }}-build-folder
path: build/
windows:
runs-on: windows-latest
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
- name: Build nob
shell: cmd
# cl.exe isn't available as-is in Github images because they don't want
# to, so we need to pull env vars ourselves. Refs:
# https://github.com/actions/runner-images/issues/6205#issuecomment-1241573412
# https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut
run: |
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
cl.exe -o nob.exe nob.c
- name: Run nob
shell: cmd
run: nob.exe
- name: Upload build folder
uses: actions/upload-artifact@v3
with:
name: windows-build-folder
path: build/