Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add arm32 build test #954

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
34 changes: 26 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
run: |
sudo apt install -yq jq libreadline-dev
${{ matrix.command }} sudo apt install -yq $COMPILER
pip3 install meson ninja
pip3 install --prefer-binary meson ninja
- name: Build GNU/Linux ${{ matrix.command }}
run: |
make linux-exe ${{ matrix.command }}
Expand All @@ -126,7 +126,7 @@ jobs:
- uses: hendrikmuhs/[email protected]
- name: install dependencies
run : |
sudo apt install -y jq gcc-mingw-w64 g++-mingw-w64
sudo apt install -y jq gcc-mingw-w64
- name: Build x86_64 windows .exe
run: |
make win-exe CCACHE=1
Expand All @@ -147,7 +147,7 @@ jobs:
python-version: '3.13'
- name: Install dependencies
run: |
pip3 install meson ninja
pip3 install --prefer-binary meson ninja
- uses: hendrikmuhs/[email protected]
- run: |
make osx-exe CCACHE=1
Expand All @@ -156,6 +156,24 @@ jobs:
otool -hv libzenroom.dylib
make check-osx

arm32-test:
name: 🦾 ARM32 build test
needs: [reuse, c-lint, lua-lint]
if: "github.event_name == 'pull_request'"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pguyot/arm-runner-action@v2
with:
commands: |
sudo apt-get update -yq
sudo apt-get install -yq --no-install-recommends make cmake gcc jq libreadline-dev xxd git python3-venv
make linux-exe
# Testing on ARM32 in Qemu takes too long. This should be tested on-site
# python3 -m venv .venv
# . .venv/bin/activate && pip install --prefer-binary meson ninja
# make check

go-build-check:
name: 🐹 go build & checks
needs: [reuse, c-lint, lua-lint]
Expand All @@ -178,7 +196,7 @@ jobs:
python-version: '3.13'
- name: Install dependencies
run: |
pip3 install meson ninja
pip3 install --prefer-binary meson ninja
sudo apt-get install -qy libreadline-dev
- run: |
make linux-exe CCACHE=1
Expand Down Expand Up @@ -210,7 +228,7 @@ jobs:
python-version: '3.13'
- name: Install dependencies
run: |
pip3 install meson ninja
pip3 install --prefer-binary meson ninja
sudo apt-get install -qy libreadline-dev
- run: |
make linux-exe CCACHE=1
Expand Down Expand Up @@ -246,7 +264,7 @@ jobs:
version: ${{ env.EM_VERSION }}
- name: Install dependencies
run: |
pip3 install meson ninja
pip3 install --prefer-binary meson ninja
- name: Build Zenroom Wasm
run: |
make node-wasm CCACHE=1
Expand Down Expand Up @@ -378,7 +396,7 @@ jobs:
build/release-intro.md
- name: Install build deps
run: |
sudo apt install -qy tree jq cmake make gcc g++ musl-tools musl-dev meson clang gcc-mingw-w64 g++-mingw-w64 libreadline-dev ccache
sudo apt install -qy tree jq cmake make gcc musl-tools musl-dev gcc-mingw-w64 libreadline-dev ccache
- name: Build x86_64 with musl-system
run: |
make musl RELEASE=1 CCACHE=1
Expand Down Expand Up @@ -448,7 +466,7 @@ jobs:
ref: master
fetch-depth: 0
- run: |
pip install ninja twine
pip install --prefer-binary ninja twine
./prepare.sh
- run: pipx run build --sdist
- run: twine check dist/*.tar.gz
Expand Down
6 changes: 6 additions & 0 deletions src/lua/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ end
-- ZEN = { assert = assert } -- zencode shim when not loaded
require('zenroom_common')
MACHINE = require('statemachine')

-- Stamp the VM with version (set externally at build)
-- every official Dyne.org release should have this
SEMVER = require('semver')
-- returns nil and a warning if no VERSION found
_G['ZENROOM_VERSION'] = SEMVER(VERSION)

-- Cap the limit of iterations in branches
_G['MAXITER'] = tonumber(STR_MAXITER)

OCTET = require('zenroom_octet')
Expand Down
6 changes: 5 additions & 1 deletion src/lua/semver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ function mt:__pow(other)
end

local function new(major, minor, patch, prerelease, build)
assert(major, "At least one parameter is needed")
if not major then
warn("Zenroom build misses version information")
warn("Running VM is not an official release by Dyne.org")
return nil
end
local result = { }
if type(major) == 'string' then
result.original = major
Expand Down
Loading