Skip to content

Commit d6f3b7a

Browse files
committed
Try building with c++ compilers (ideally with old standards)
1 parent 84b452f commit d6f3b7a

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/nob.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ on: [push, pull_request]
44
jobs:
55
macos:
66
runs-on: macos-latest
7+
strategy:
8+
matrix:
9+
cc: [clang, clang++]
710
steps:
811
- name: Clone GIT repo
912
uses: actions/checkout@v4
1013
- name: Run tests
1114
run: |
12-
clang -o nob nob.c
15+
${{ matrix.cc }} -o nob nob.c
1316
./nob
1417
- name: Build how_to-s
1518
run: |
1619
cd how_to/
17-
clang -o nob nob.c
20+
${{ matrix.cc }} -o nob nob.c
1821
./nob
1922
ubuntu:
2023
strategy:
2124
matrix:
22-
cc: [gcc, clang]
25+
cc: [gcc, clang, g++, clang++]
2326
runs-on: ubuntu-latest
2427
steps:
2528
- name: Clone GIT repo
@@ -35,6 +38,9 @@ jobs:
3538
./nob
3639
windows:
3740
runs-on: windows-latest
41+
strategy:
42+
matrix:
43+
standard: [c++14, c11]
3844
steps:
3945
- name: Clone GIT repo
4046
uses: actions/checkout@v4
@@ -46,12 +52,12 @@ jobs:
4652
# https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut
4753
run: |
4854
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
49-
cl.exe ${{ matrix.hotreload }} /Fe:nob nob.c
55+
cl.exe /std:${{ matrix.standard }} /Fe:nob nob.c
5056
nob.exe
5157
- name: Build how_to-s
5258
shell: cmd
5359
run: |
5460
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
5561
cd how_to/
56-
cl.exe ${{ matrix.hotreload }} /Fe:nob nob.c
62+
cl.exe /std:${{ matrix.standard }} /Fe:nob nob.c
5763
nob.exe

0 commit comments

Comments
 (0)