From 2861c287d7c6f42bc836f51694596ebb2e01cfa8 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 3 Nov 2025 23:23:19 +0100 Subject: [PATCH] ci: logging extended and docker image switched --- .github/workflows/ci.yml | 12 ++++++------ src/coparun/runmem.c | 11 ----------- src/coparun/runmem.h | 11 +++++++++++ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41a4f04..17727d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,14 +132,14 @@ jobs: platforms: linux/arm64 - name: Use ARM64 container run: | - docker run --rm -v $PWD:/app -w /app --platform linux/arm64 ubuntu:22.04 \ + docker run --rm -v $PWD:/app -w /app --platform linux/arm64 python:3.11-slim \ bash -lc "apt-get update && \ - apt-get install -y build-essential python3 python3-pip python3-dev && \ - python3 -m pip install --upgrade pip setuptools wheel && \ - python3 -m pip install .[dev] && \ + apt-get install -y build-essential && \ + pip install setuptools wheel pytest && \ + pip install . && \ mkdir -p bin && \ - gcc -O3 -DENABLE_BASIC_LOGGING -o bin/coparun src/coparun/runmem.c src/coparun/coparun.c src/coparun/mem_man.c && \ - python3 -m pytest" + gcc -O3 -DENABLE_LOGGING -o bin/coparun src/coparun/runmem.c src/coparun/coparun.c src/coparun/mem_man.c && \ + pytest" build-windows: needs: [build_stencils] diff --git a/src/coparun/runmem.c b/src/coparun/runmem.c index 6307c64..ed9bb4c 100644 --- a/src/coparun/runmem.c +++ b/src/coparun/runmem.c @@ -5,17 +5,6 @@ #include "runmem.h" #include "mem_man.h" -#ifdef ENABLE_LOGGING - #define LOG(...) printf(__VA_ARGS__) - #define BLOG(...) printf(__VA_ARGS__) -#elif ENABLE_BASIC_LOGGING - #define LOG(...) - #define BLOG(...) printf(__VA_ARGS__) -#else - #define LOG(...) - #define BLOG(...) -#endif - /* Globals declared extern in runmem.h */ uint8_t *data_memory = NULL; uint32_t data_memory_len = 0; diff --git a/src/coparun/runmem.h b/src/coparun/runmem.h index aab6dfa..c59a5d2 100644 --- a/src/coparun/runmem.h +++ b/src/coparun/runmem.h @@ -3,6 +3,17 @@ #include +#ifdef ENABLE_LOGGING + #define LOG(...) printf(__VA_ARGS__) + #define BLOG(...) printf(__VA_ARGS__) +#elif ENABLE_BASIC_LOGGING + #define LOG(...) + #define BLOG(...) printf(__VA_ARGS__) +#else + #define LOG(...) + #define BLOG(...) +#endif + /* Command opcodes used by the parser */ #define ALLOCATE_DATA 1 #define COPY_DATA 2