Tweaked CI

This commit is contained in:
2026-04-07 22:00:54 +10:00
parent 842f041a50
commit 3a24fbf6e1
3 changed files with 16 additions and 20 deletions

View File

@@ -14,26 +14,16 @@ on:
- v2 - v2
workflow_dispatch: workflow_dispatch:
#CI workflows using the matrix strategy, skipping GDB if it's not supported for the platform #CI workflows, limited coverage atm
jobs: jobs:
run-tests: units:
continue-on-error: true continue-on-error: true
strategy: runs-on: ubuntu-latest
matrix:
platforms:
- { os: ubuntu-latest, preinstall: sudo apt update && sudo apt install gdb, gdb_enabled: true }
- { os: windows-latest, preinstall: , gdb_enabled: true }
- { os: macos-latest, preinstall: , gdb_enabled: false }
commands:
- { exec: make tests, gdb: false }
- { exec: make tests, gdb: true }
runs-on: ${{ matrix.platforms.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Preinstall dependencies - name: Preinstall dependencies
if: (matrix.commands.gdb == true && matrix.platforms.gdb_enabled == false) != true run: sudo apt update && sudo apt install gdb
run: ${{ matrix.platforms.preinstall }} - name: Run the tests
- name: run the tests run: make tests
if: (matrix.commands.gdb == true && matrix.platforms.gdb_enabled == false) != true - name: Run the tests under gdb
run: ${{ matrix.commands.exec }} run: make tests-gdb

View File

@@ -23,10 +23,13 @@ source:
repl: source repl: source
$(MAKE) -C repl -k $(MAKE) -C repl -k
.PHONY: tests .PHONY: tests tests-ci
tests: clean tests: clean
$(MAKE) -C tests -k $(MAKE) -C tests -k
tests-gdb: clean
$(MAKE) -C tests -k gdb
#util targets #util targets
$(TOY_OUTDIR): $(TOY_OUTDIR):
mkdir $(TOY_OUTDIR) mkdir $(TOY_OUTDIR)

View File

@@ -4,3 +4,6 @@ export CFLAGS+=-DTOY_CC_ENABLED
all: all:
$(MAKE) -C units -k $(MAKE) -C units -k
gdb:
$(MAKE) -C units -k gdb