Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/nob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,55 @@ on: [push, pull_request]
jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
compiler:
- exec: clang
std: c99
- exec: clang++
std: c++20
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
- name: Run tests
run: |
clang -o nob nob.c
${{ matrix.compiler.exec }} -o nob nob.c -std=${{ matrix.compiler.std }}
./nob
- name: Build how_to-s
run: |
cd how_to/
clang -o nob nob.c
${{ matrix.compiler.exec }} -o nob nob.c -std=${{ matrix.compiler.std }}
./nob
ubuntu:
strategy:
matrix:
cc: [gcc, clang]
compiler:
- exec: clang
std: c99
- exec: clang++
std: c++20
- exec: gcc
std: c99
- exec: g++
std: c++20
runs-on: ubuntu-latest
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
- name: Build tests
run: |
${{ matrix.cc }} -o nob nob.c
${{ matrix.compiler.exec }} -o nob nob.c -std=${{ matrix.compiler.std }}
./nob
- name: Build how_to-s
run: |
cd how_to/
${{ matrix.cc }} -o nob nob.c
${{ matrix.compiler.exec }} -o nob nob.c -std=${{ matrix.compiler.std }}
./nob
windows:
runs-on: windows-latest
strategy:
matrix:
standard: [c++14, c11]
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
Expand All @@ -46,12 +64,12 @@ jobs:
# 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 ${{ matrix.hotreload }} /Fe:nob nob.c
cl.exe /std:${{ matrix.standard }} /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 ${{ matrix.hotreload }} /Fe:nob nob.c
cl.exe /std:${{ matrix.standard }} /Fe:nob nob.c
nob.exe
2 changes: 1 addition & 1 deletion how_to/010_nob_two_stage/nob.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main(int argc, char **argv)
const char *input_path = SRC_BUILD_FOLDER"nob_configed.c";
nob_cc(&cmd);
nob_cc_flags(&cmd);
nob_cmd_append(&cmd, "-I.", "-I"BUILD_FOLDER, "-I"SRC_BUILD_FOLDER); // -I is usually the same across all compilers
nob_cmd_append(&cmd, "-I.", "-I" BUILD_FOLDER, "-I" SRC_BUILD_FOLDER); // -I is usually the same across all compilers
nob_cc_output(&cmd, output_path);
nob_cc_inputs(&cmd, input_path);
if (!cmd_run_sync_and_reset(&cmd)) return 1;
Expand Down