From 31def10463713ef140df2c12ee175fa246be5fc7 Mon Sep 17 00:00:00 2001 From: Marie <31585250+MarieEckert@users.noreply.github.com> Date: Thu, 20 Mar 2025 23:32:20 +0100 Subject: [PATCH] Create c.yml --- .github/workflows/c.yml | 20 ++++++++++++++++++++ scripts/build.bash | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/c.yml diff --git a/.github/workflows/c.yml b/.github/workflows/c.yml new file mode 100644 index 0000000..bfd9b3d --- /dev/null +++ b/.github/workflows/c.yml @@ -0,0 +1,20 @@ +name: C CI + +on: + push: + branches: [ "main" ] + pull_request: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: setup + run: scripts/setup.bash + - name: compile + run: scripts/build.bash + - name: test + run: scripts/run-tests.bash diff --git a/scripts/build.bash b/scripts/build.bash index 0bbf90e..d95be58 100755 --- a/scripts/build.bash +++ b/scripts/build.bash @@ -19,7 +19,7 @@ function build_objs() { do OUTNAME="$OBJDIR$i.o" INNAME="$SRCDIR$i.c" - + echo " CC $INNAME" $CC $CFLAGS -c -o $OUTNAME $INNAME || exit @@ -29,7 +29,7 @@ function build_objs() { } function build_lib() { - OBJECTS=("mcfg mcfg_util parse shared mcfg_format") + OBJECTS=("mcfg mcfg_util parse serialize cptrlist shared mcfg_format") echo "==> Compiling sources for \"$LIBNAME\"" build_objs "${OBJECTS[@]}"