-
Notifications
You must be signed in to change notification settings - Fork 188
61 lines (60 loc) · 1.8 KB
/
nob.yaml
File metadata and controls
61 lines (60 loc) · 1.8 KB
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
60
61
name: no-build build
on: [push, pull_request]
jobs:
macos:
strategy:
matrix:
lang: [c, c++]
runs-on: macos-latest
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
- name: Run tests
run: |
clang -x ${{ matrix.lang }} -o nob nob.c
./nob
- name: Build how_to-s
run: |
cd how_to/
clang -x ${{ matrix.lang }} -o nob nob.c
./nob
ubuntu:
strategy:
matrix:
cc: [gcc, clang]
lang: [c, c++]
runs-on: ubuntu-latest
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
- name: Build tests
run: |
${{ matrix.cc }} -x ${{ matrix.lang }} -o nob nob.c
./nob
- name: Build how_to-s
run: |
cd how_to/
${{ matrix.cc }} -x ${{ matrix.lang }} -o nob nob.c
./nob
windows:
runs-on: windows-latest
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
- name: Build tests
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 /Fe:nob nob.c
nob.exe
- name: Build how_to-s
shell: cmd
run: |
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
cd how_to/
cl.exe /Fe:nob nob.c
nob.exe