Compare commits

...

7 Commits

Author SHA1 Message Date
f5450232b4 fix: testing compilation does not correctly filter out main.o 2025-09-15 09:56:08 +02:00
9f7d1fb57c fix: fminf and other <math.h> from libm not found.
The `-lm` linker flag was applied preceding the libraries, but it
should've been succeding.
2025-09-15 09:55:48 +02:00
2186ec2942 forcibly recompile the libs, so if deps get updated, this will be carried through.
This sacrifices a bit of workflow performance, but won't be too
significant. The heaviest step (cmake) is still circumvented
2025-09-15 09:40:31 +02:00
1ac4592503 Aparrently, the act docker container does not have cmake installed.
Adding this should not make a significant impact on workflow
performance.
2025-09-15 09:35:59 +02:00
4da02373a5 disable fail fast, so feedback is provided for all matrix combinations 2025-09-15 09:25:18 +02:00
c724ff0449 remove explicit definition for repository, since it messes with act
`act` allows to debug github workflows before sending them to the
server, allowing to test some behaviour, before pushing.
2025-09-15 09:20:07 +02:00
348c4e484c fix: clean-libs can fail when it shouldn't 2025-09-13 21:44:46 +02:00
2 changed files with 6 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ on:
jobs:
compile-and-test:
strategy:
fail-fast: false # disable fail fast, so feedback is provided for all matrix combinations
matrix:
os:
- ubuntu-latest
@@ -17,7 +18,6 @@ jobs:
steps:
- uses: actions/checkout@v5
with:
repository: ${{github.repository}}
submodules: true
fetch-depth: 1
@@ -25,13 +25,13 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y libwayland-dev libxkbcommon-dev xorg-dev
sudo apt install -y libwayland-dev libxkbcommon-dev xorg-dev cmake
- uses: actions/cache@v4
with:
path: lib/obj/
key: ${{runner.os}}-lib/obj-${{github.sha}}
restore-keys: ${{runner.os}}-lib/obj-
- run: make -j libs
- run: make -j libs -B
- run: make -j all
- run: make -j test

View File

@@ -24,7 +24,7 @@ LDFLAGS += -fsanitize=address -ftrapv
endif
CPPFLAGS += -Iinclude -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/libarchive
LDFLAGS += -Llib/obj/glfw/src -Llib/obj/libarchive/libarchive
LDLIBS += -lm -lglfw3 -larchive
LDLIBS += -lglfw3 -larchive -lm
# detect if we're compiling on Windows, meaning
# a lot of things considered "standard" are unavailable.
@@ -52,7 +52,7 @@ clean:
@[ -d bin/ ] && rm -vr bin/ || true
@[ -d obj/ ] && rm -vr obj/ || true
clean-libs:
@[ -d lib/obj/ ] && rm -vr lib/obj/
@[ -d lib/obj/ ] && rm -vr lib/obj/ || true
# compiles the libraries using cmake
@@ -67,7 +67,7 @@ bin/$(NAME): $(OBJ)
@$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
# link together a testing binary
bin/TEST_$(NAME): $(TOBJ) $(filter-out main.o,$(OBJ))
bin/TEST_$(NAME): $(TOBJ) $(filter-out obj/src/main.o,$(OBJ))
$(info [CC/LD] $@)
@mkdir -p $(@D)
@$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)