From db69f441c35d8038b38905b2af16fda9a783f61d Mon Sep 17 00:00:00 2001 From: Jaromil Date: Tue, 24 Sep 2024 10:29:06 +0200 Subject: [PATCH] more fixes in build and breakout zencode-exec target for python, rust and golang only the zencode-exec binary is needed --- .github/workflows/main.yml | 21 ++++++++++++++++----- build/apple-osx.mk | 4 +++- build/deps.mk | 3 +-- build/linux.mk | 5 +++-- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d75d0cc33..1996e2f19 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -190,7 +190,7 @@ jobs: pip3 install meson ninja sudo apt-get install -qy zsh libreadline-dev - run: | - make -f build/linux.mk CCACHE=1 + make -f build/linux.mk deps zencode-exec CCACHE=1 cp zencode-exec /usr/local/bin/ - name: 🧪 test bindings go-${{ matrix.go }} working-directory: bindings/golang/zenroom @@ -309,16 +309,27 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - run: | + - name: Install dependencies on Linux + run: | sudo apt update sudo apt install -yq zsh cmake libreadline-dev if: runner.os == 'Linux' - - run: brew install zsh + - name: Install dependencies on Apple/OSX + run: | + brew install zsh if: runner.os == 'macOS' - - run: | + - name: Build zencode-exec on Linux + run: | cd ../.. - make -f build/linux.mk COMPILER=clang + make -f build/linux.mk deps zencode-exec cp zencode-exec /usr/local/bin/ + if: runner.os == 'Linux' + - name: Build zencode-exec on Apple/OSX + run: | + cd ../.. + make -f build/apple-osx.mk deps zencode-exec.command + cp zencode-exec.command /usr/local/bin/zencode-exec + if: runner.os == 'macOS' - run: | ./prepare.sh pipx install meson diff --git a/build/apple-osx.mk b/build/apple-osx.mk index be8cceaf2..37825d8d8 100644 --- a/build/apple-osx.mk +++ b/build/apple-osx.mk @@ -10,7 +10,9 @@ endif # activate CCACHE etc. include build/plugins.mk -all: ${BUILD_DEPS} zenroom.command zencode-exec.command +all: deps zenroom.command zencode-exec.command + +deps: ${BUILD_DEPS} cli_sources := src/cli-zenroom.o src/repl.o zenroom.command: ${ZEN_SOURCES} ${cli_sources} diff --git a/build/deps.mk b/build/deps.mk index cd415a2de..231d546e6 100644 --- a/build/deps.mk +++ b/build/deps.mk @@ -5,10 +5,9 @@ -c $< -o $@ \ -DVERSION=\"${VERSION}\" \ -DCURRENT_YEAR=\"${CURRENT_YEAR}\" \ - -DMAKETARGET=\"${MAKECMDGOALS}\" \ -DCOMMIT=\"${COMMIT}\" \ -DBRANCH=\"${BRANCH}\" \ - -DCFLAGS="${CFLAGS}" + -DCFLAGS="${cflags}" embed-lua: lua_embed_opts := $(if ${COMPILE_LUA}, compile) embed-lua: diff --git a/build/linux.mk b/build/linux.mk index 8a6ad963f..a80bd6797 100644 --- a/build/linux.mk +++ b/build/linux.mk @@ -22,8 +22,9 @@ endif # activate CCACHE etc. include build/plugins.mk -all: ${BUILD_DEPS} zenroom zencode-exec zencc - $(call update_compilers,${COMPILER}) +all: deps zenroom zencode-exec zencc + +deps: ${BUILD_DEPS} cli_sources := src/cli-zenroom.o src/repl.o zenroom: ${ZEN_SOURCES} ${cli_sources}