Skip to content
Merged
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
12 changes: 8 additions & 4 deletions .github/workflows/nob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,39 @@ 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 -o nob nob.c
clang -x ${{ matrix.lang }} -o nob nob.c
./nob
- name: Build how_to-s
run: |
cd how_to/
clang -o nob nob.c
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 }} -o nob nob.c
${{ matrix.cc }} -x ${{ matrix.lang }} -o nob nob.c
./nob
- name: Build how_to-s
run: |
cd how_to/
${{ matrix.cc }} -o nob nob.c
${{ matrix.cc }} -x ${{ matrix.lang }} -o nob nob.c
./nob
windows:
runs-on: windows-latest
Expand Down
1 change: 0 additions & 1 deletion how_to/005_parallel_build/nob.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#define NOB_IMPLEMENTATION
#define NOB_STRIP_PREFIX
#define NOB_WARN_DEPRECATED
#include "nob.h"

Expand Down
3 changes: 1 addition & 2 deletions how_to/010_nob_two_stage/nob.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#define NOB_IMPLEMENTATION
#define NOB_STRIP_PREFIX
#define NOB_WARN_DEPRECATED
#include "nob.h"
#include "src_build/folders.h"
Expand Down Expand Up @@ -34,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(&cmd)) return 1;
Expand Down
1 change: 0 additions & 1 deletion how_to/010_nob_two_stage/src_build/nob_configed.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#define NOB_IMPLEMENTATION
#define NOB_STRIP_PREFIX
#define NOB_WARN_DEPRECATED
#include "nob.h"
#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion how_to/nob.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Makes sure the examples are buildable. Used usually on CI.
#include "../shared.h"
#define NOB_IMPLEMENTATION
#define NOB_STRIP_PREFIX
#define NOB_EXPERIMENTAL_DELETE_OLD
#define NOB_WARN_DEPRECATED
#include "../nob.h"
Expand All @@ -24,6 +23,7 @@ int main(int argc, char **argv)
size_t mark = temp_save();
if (!set_current_dir(temp_sprintf("./%s", example))) return 1;
nob_cc(&cmd);
nob_cc_flags(&cmd);
nob_cc_output(&cmd, "./nob");
nob_cc_inputs(&cmd, "nob.c");
if (!cmd_run(&cmd)) return 1;
Expand Down
1 change: 0 additions & 1 deletion nob.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "shared.h"
#define NOBDEF static inline
#define NOB_IMPLEMENTATION
#define NOB_STRIP_PREFIX
#define NOB_EXPERIMENTAL_DELETE_OLD
#define NOB_WARN_DEPRECATED
#include "nob.h"
Expand Down
Loading