MAYO, a Post-Quantum digital signature scheme based on the hardness of the Multivariate Quadratic problem #2305
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: zenroom | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'examples/**' | |
| - '*.md' | |
| branches: | |
| - master | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'examples/**' | |
| - '*.md' | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write | |
| packages: write | |
| contents: write | |
| jobs: | |
| reuse: | |
| name: 🚨 REUSE Compliance | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: fsfe/reuse-action@v6 | |
| c-lint: | |
| name: 🚨 C lint | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: reviewdog/action-cpplint@master | |
| env: | |
| REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| reporter: github-pr-check | |
| targets: --recursive src | |
| level: warning | |
| flags: --linelength=120 # Optional | |
| filter: "-readability/braces\ | |
| ,-readability/casting\ | |
| ,-whitespace/comma\ | |
| ,-whitespace/braces\ | |
| ,-whitespace/comments\ | |
| ,-whitespace/indent\ | |
| ,-whitespace/newline\ | |
| ,-whitespace/operators\ | |
| ,-whitespace/parens\ | |
| ,-whitespace/tab\ | |
| " # Optional | |
| lua-lint: | |
| name: 🚨 Lua lint | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup luacheck | |
| run: | | |
| if ! hash luacheck &>/dev/null; then | |
| sudo apt-get install -yq luarocks 1>/dev/null || exit 1 | |
| sudo luarocks install luacheck 1>/dev/null || exit 1 | |
| sudo luarocks install lanes &>/dev/null || true | |
| fi | |
| luacheck --version | |
| shell: bash | |
| - name: 🚨 LUA lint | |
| continue-on-error: true | |
| working-directory: src/lua | |
| run: | | |
| luacheck --config .luacheckrc --std lua54 . | |
| linux-test: | |
| name: 🐧 Linux check tests (gcc and clang) | |
| needs: [reuse, c-lint, lua-lint] | |
| strategy: | |
| matrix: | |
| cc: [COMPILER=gcc COMPILER_CXX=g++,COMPILER=clang COMPILER_CXX=clang++] | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - uses: hendrikmuhs/[email protected] | |
| - name: install dependencies | |
| run: | | |
| sudo apt install -yq jq libreadline-dev | |
| ${{ matrix.cc }} sudo apt install -yq $COMPILER | |
| pip3 install --prefer-binary meson ninja | |
| - name: Build GNU/Linux ${{ matrix.cc }} | |
| run: | | |
| make debug-asan ${{ matrix.cc }} | |
| - name: Check all tests on ${{ matrix.cc }} | |
| run: | | |
| make check | |
| linux-aarch64-test: | |
| name: 🐧 Linux ARM64 check tests (gcc and clang) | |
| needs: [reuse, c-lint, lua-lint] | |
| strategy: | |
| matrix: | |
| cc: [COMPILER=gcc COMPILER_CXX=g++,COMPILER=clang COMPILER_CXX=clang++] | |
| fail-fast: false | |
| runs-on: ubuntu-24.04-arm | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - uses: hendrikmuhs/[email protected] | |
| - name: install dependencies | |
| run: | | |
| sudo apt install -yq jq libreadline-dev | |
| ${{ matrix.cc }} sudo apt install -yq $COMPILER | |
| pip3 install --prefer-binary meson ninja | |
| - name: Build GNU/Linux ${{ matrix.cc }} | |
| run: | | |
| make linux-exe ${{ matrix.cc }} CCACHE=1 | |
| make linux-lib ${{ matrix.cc }} CCACHE=1 | |
| - name: Check all tests on ${{ matrix.cc }} | |
| run: | | |
| make check | |
| musl-test: | |
| name: 💪 Musl test | |
| needs: [reuse, c-lint, lua-lint] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [x86_64, arm_64, arm_hf] | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'SKIP_MUSL') && github.event_name == 'pull_request' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup musl toolchain | |
| id: musl | |
| uses: dyne/musl-action@main | |
| with: | |
| target_arch: ${{ matrix.arch }} | |
| - uses: hendrikmuhs/[email protected] | |
| - name: install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -yq jq libreadline-dev | |
| # used to cross compile shared library | |
| case "${{ matrix.arch }}" in | |
| arm_64) sudo apt install -yq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu ;; | |
| arm_hf) sudo apt install -yq gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf ;; | |
| esac | |
| - name: Build with musl-system | |
| run: | | |
| arch="" | |
| lib_compilers="" | |
| case "${{ matrix.arch }}" in | |
| arm_64) | |
| arch="ARCH=aarch64" | |
| lib_compilers="COMPILER=aarch64-linux-gnu-gcc COMPILER_CXX=aarch64-linux-gnu-g++" | |
| ;; | |
| arm_hf) | |
| arch="ARCH=armv7l" | |
| lib_compilers="COMPILER=arm-linux-gnueabihf-gcc COMPILER_CXX=arm-linux-gnueabihf-g++" | |
| ;; | |
| esac | |
| make musl ${arch} COMPILER=${{ steps.musl.outputs.CC }} COMPILER_CXX=${{ steps.musl.outputs.CXX }} RELEASE=1 CCACHE=1 | |
| mkdir -p zenroom-${{ matrix.arch }}-linux | |
| cp zenroom zenroom-${{ matrix.arch }}-linux/ | |
| cp zencode-exec zenroom-${{ matrix.arch }}-linux/ | |
| cp lua-exec zenroom-${{ matrix.arch }}-linux/ | |
| make clean | |
| make linux-lib ${arch} ${lib_compilers} RELEASE=1 CCACHE=1 | |
| cp libzenroom.so zenroom-${{ matrix.arch }}-linux/ | |
| zip -r zenroom-${{ matrix.arch }}-linux.zip zenroom-${{ matrix.arch }}-linux | |
| - name: Upload artifact test-linux-${{ matrix.arch }} | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: test-linux-${{ matrix.arch }} | |
| path: | | |
| zenroom-${{ matrix.arch }}-linux.zip | |
| - uses: actions/setup-python@v6 | |
| if: matrix.arch == 'x86_64' | |
| with: | |
| python-version: '3.13' | |
| - name: run tests for x86_64 | |
| if: matrix.arch == 'x86_64' | |
| run: | | |
| pip3 install --prefer-binary meson ninja | |
| cp zenroom-${{ matrix.arch }}-linux/* . | |
| make check | |
| test-musl-arm_64: | |
| name: 💪 Test musl-arm_64 build | |
| needs: [musl-test] | |
| runs-on: ubuntu-24.04-arm | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'SKIP_MUSL') && github.event_name == 'pull_request' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: install dependencies | |
| run: | | |
| pip3 install --prefer-binary meson ninja | |
| - name: Download musl build artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: test-linux-arm_64 | |
| - run: | | |
| unzip zenroom-arm_64-linux.zip | |
| cp zenroom-arm_64-linux/zencode-exec ./zencode-exec | |
| cp zenroom-arm_64-linux/lua-exec ./lua-exec | |
| cp zenroom-arm_64-linux/zenroom ./zenroom | |
| cp zenroom-arm_64-linux/libzenroom.so ./libzenroom.so | |
| # api test need milagro library to be built | |
| make -f build/posix.mk deps BUILD_DEPS=milagro | |
| # run tests | |
| make check | |
| windows-build: | |
| name: 🪟 Windows build test | |
| needs: [reuse, c-lint, lua-lint] | |
| if: github.event_name == 'pull_request' | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: hendrikmuhs/[email protected] | |
| - name: install dependencies | |
| run : | | |
| sudo apt install -y jq gcc-mingw-w64 g++-mingw-w64 | |
| - name: Build x86_64 windows .exe | |
| run: | | |
| make win-exe CCACHE=1 | |
| make clean -C src | |
| make win-dll CCACHE=1 | |
| osx-test: | |
| name: 🍎 Apple OSX check tests | |
| needs: [reuse, c-lint, lua-lint] | |
| if: github.event_name == 'pull_request' | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| pip3 install --prefer-binary meson ninja | |
| brew install bash | |
| - uses: hendrikmuhs/[email protected] | |
| - name: Build ios-arm64 | |
| run: | | |
| make ios-arm64 RELEASE=1 CCACHE=1 | |
| make clean | |
| - name: Build ios-sim | |
| run: | | |
| make ios-sim RELEASE=1 CCACHE=1 | |
| make clean | |
| - run: | | |
| make osx-exe CCACHE=1 | |
| make -C src clean | |
| make osx-lib CCACHE=1 | |
| otool -hv libzenroom.dylib | |
| make check-osx | |
| linux-armv7l-test: | |
| name: 🦾 ARM32 build test | |
| needs: [reuse, c-lint, lua-lint] | |
| if: ${{ contains(github.event.pull_request.labels.*.name, 'TEST_ARM32') && github.event_name == 'pull_request' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pguyot/arm-runner-action@v2 | |
| with: | |
| cpu: cortex-a7 | |
| 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] | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'SKIP_GO') && github.event_name == 'pull_request' }} | |
| strategy: | |
| matrix: | |
| go: ['stable','oldstable'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: hendrikmuhs/[email protected] | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| cache: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| pip3 install --prefer-binary meson ninja | |
| sudo apt-get install -qy libreadline-dev | |
| - run: | | |
| make linux-exe CCACHE=1 | |
| cp zencode-exec /usr/local/bin/ | |
| cp lua-exec /usr/local/bin/ | |
| - name: 🧪 test bindings go-${{ matrix.go }} | |
| working-directory: bindings/golang/zenroom | |
| run: make test | |
| # - name: 🔐 check crypto with go-${{ matrix.go }} | |
| # run: make check-go | |
| rust-build-check: | |
| name: 🦀 rust build & checks | |
| needs: [reuse, c-lint, lua-lint] | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'SKIP_RUST') && github.event_name == 'pull_request' }} | |
| strategy: | |
| matrix: | |
| rust: ['stable', 'nightly'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: hendrikmuhs/[email protected] | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| pip3 install --prefer-binary meson ninja | |
| sudo apt-get install -qy libreadline-dev | |
| - run: | | |
| make linux-exe CCACHE=1 | |
| cp zencode-exec /usr/local/bin/ | |
| cp lua-exec /usr/local/bin/ | |
| - name: 🧪 test bindings rust-${{ matrix.rust }} | |
| working-directory: bindings/rust | |
| run: cargo test | |
| - name: 🔐 check crypto with rust-${{ matrix.rust }} | |
| run: make check-rs | |
| js-build-check: | |
| name: 🐯 NodeJS WASM check tests | |
| needs: [reuse, c-lint, lua-lint] | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'SKIP_JS') && github.event_name == 'pull_request' }} | |
| strategy: | |
| matrix: | |
| node-version: [22.16.0] | |
| env: | |
| EM_VERSION: 4.0.10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: ${{ env.EM_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| pip3 install --prefer-binary meson ninja | |
| - name: Build Zenroom Wasm | |
| run: | | |
| make node-wasm CCACHE=1 | |
| env: | |
| EMSCRIPTEN: ${{ env.EMSDK }}/upstream/emscripten | |
| - name: 🧪 test zencode with node-${{ matrix.node-version }} | |
| run: | | |
| make check-js | |
| python-check: | |
| name: 🐍 Python checks | |
| needs: [reuse, c-lint, lua-lint] | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'SKIP_PY') && github.event_name == 'pull_request' }} | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| working-directory: bindings/python3 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies on Linux | |
| run: | | |
| sudo apt update | |
| sudo apt install -yq cmake libreadline-dev | |
| if: runner.os == 'Linux' | |
| - name: Build zencode-exec on Linux | |
| run: | | |
| cd ../.. | |
| make linux-exe RELEASE=1 | |
| cp zencode-exec /usr/local/bin/ | |
| cp lua-exec /usr/local/bin/ | |
| if: runner.os == 'Linux' | |
| - name: Build zencode-exec on Apple/OSX | |
| run: | | |
| cd ../.. | |
| make osx-exe RELEASE=1 | |
| cp zencode-exec /usr/local/bin/zencode-exec | |
| cp lua-exec /usr/local/bin/lua-exec | |
| if: runner.os == 'macOS' | |
| - run: | | |
| ./prepare.sh | |
| pipx install meson | |
| pipx install ninja | |
| pip3 install .[test] | |
| - run: pytest -s tests | |
| semantic-release: | |
| name: 🤖 Semantic release | |
| runs-on: ubuntu-latest | |
| if: ${{ github.ref_name == 'master' && github.event_name == 'push' }} | |
| outputs: | |
| release: ${{ steps.tag_release.outputs.release }} | |
| version: ${{ steps.tag_release.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22.16.0 | |
| - run: yarn | |
| - name: Tag release | |
| id: tag_release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| npx semantic-release | tee semantic-release.log | |
| if [[ `git tag --points-at HEAD` == "" ]]; then | |
| echo "release=False" >> $GITHUB_OUTPUT | |
| else | |
| echo "release=True" >> $GITHUB_OUTPUT | |
| awk '/Published release/ { printf("version=v%s\n",$8) }' semantic-release.log >> $GITHUB_OUTPUT | |
| fi | |
| js-build-release: | |
| name: 🐯 js build release | |
| needs: [semantic-release] | |
| if: needs.semantic-release.outputs.release == 'True' | |
| runs-on: ubuntu-latest | |
| env: | |
| EM_VERSION: 4.0.10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22.16.0 | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: ${{ env.EM_VERSION }} | |
| - name: Build Zenroom Wasm | |
| run: | | |
| make node-wasm RELEASE=1 CCACHE=1 | |
| env: | |
| EMSCRIPTEN: ${{ env.EMSDK }}/upstream/emscripten | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: javascript-artifact | |
| path: | | |
| ./bindings/javascript/CHANGELOG.md | |
| ./bindings/javascript/LICENSE | |
| ./bindings/javascript/package.json | |
| ./bindings/javascript/README.md | |
| ./bindings/javascript/dist/ | |
| linux-release: | |
| name: 🐧 Binary builds on Ubuntu (x86_64, arm_64, arm_hf) | |
| runs-on: ubuntu-latest | |
| needs: [semantic-release] | |
| strategy: | |
| matrix: | |
| arch: [x86_64, arm_64, arm_hf] | |
| if: needs.semantic-release.outputs.release == 'True' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup musl toolchain | |
| id: musl | |
| uses: dyne/musl-action@main | |
| with: | |
| target_arch: ${{ matrix.arch }} | |
| - uses: hendrikmuhs/[email protected] | |
| - name: Install build deps | |
| run: | | |
| sudo apt update | |
| sudo apt install -qy jq libreadline-dev | |
| # used to cross compile shared library | |
| case "${{ matrix.arch }}" in | |
| arm_64) sudo apt install -yq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu ;; | |
| arm_hf) sudo apt install -yq gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf ;; | |
| esac | |
| - name: Build ${{ matrix.arch }} with musl-system | |
| run: | | |
| arch="" | |
| lib_compilers="" | |
| case "${{ matrix.arch }}" in | |
| arm_64) | |
| arch="ARCH=aarch64" | |
| lib_compilers="COMPILER=aarch64-linux-gnu-gcc COMPILER_CXX=aarch64-linux-gnu-g++" | |
| ;; | |
| arm_hf) | |
| arch="ARCH=armv7l" | |
| lib_compilers="COMPILER=arm-linux-gnueabihf-gcc COMPILER_CXX=arm-linux-gnueabihf-g++" | |
| ;; | |
| esac | |
| make musl ${arch} COMPILER=${{ steps.musl.outputs.CC }} COMPILER_CXX=${{ steps.musl.outputs.CXX }} RELEASE=1 CCACHE=1 | |
| mkdir -p zenroom-${{ matrix.arch }}-linux | |
| cp zenroom zenroom-${{ matrix.arch }}-linux/ | |
| cp zencode-exec zenroom-${{ matrix.arch }}-linux/ | |
| cp lua-exec zenroom-${{ matrix.arch }}-linux/ | |
| make clean | |
| make linux-lib ${arch} ${lib_compilers} RELEASE=1 CCACHE=1 | |
| cp libzenroom.so zenroom-${{ matrix.arch }}-linux/ | |
| zip -r zenroom-${{ matrix.arch }}-linux.zip zenroom-${{ matrix.arch }}-linux | |
| if [ "${{ matrix.arch }}" = "x86_64" ]; then | |
| cp zenroom-${{ matrix.arch }}-linux.zip zenroom-linux.zip | |
| cp zenroom-${{ matrix.arch }}-linux/* . | |
| fi | |
| - name: Upload artifact linux-${{ matrix.arch }} | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-linux-${{ matrix.arch }} | |
| path: | | |
| zenroom-${{ matrix.arch }}-linux.zip | |
| - name: Upload artifact linux-x86_64 | |
| if: matrix.arch == 'x86_64' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-bin-linux-${{ matrix.arch }} | |
| path: | | |
| zenroom | |
| zencode-exec | |
| lua-exec | |
| zenroom-linux.zip | |
| windows-android-release: | |
| name: 🪟 Windows and 🤖 Android binary builds on Ubuntu | |
| runs-on: ubuntu-latest | |
| needs: [semantic-release] | |
| if: needs.semantic-release.outputs.release == 'True' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Upload release docs artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: documentation | |
| path: | | |
| build/release-intro.md | |
| - uses: hendrikmuhs/[email protected] | |
| - name: install dependencies | |
| run : | | |
| sudo apt install -y jq gcc-mingw-w64 g++-mingw-w64 | |
| - name: Build x86_64 windows .exe | |
| run: | | |
| make win-exe RELEASE=1 CCACHE=1 | |
| make clean -C src | |
| make win-dll RELEASE=1 CCACHE=1 | |
| - name: Pack build results | |
| run: | | |
| mkdir -p zenroom-win64 | |
| cp zenroom.exe zenroom-win64/ | |
| cp zencode-exec.exe zenroom-win64/ | |
| mv libzenroom_dll.lib zenroom-win64/ | |
| mv zenroom.dll zenroom-win64/ | |
| zip -r zenroom-win64.zip zenroom-win64 | |
| - name: Upload artifact win x86_64 | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-win64 | |
| path: | | |
| zenroom-win64.zip | |
| zenroom.exe | |
| zencode-exec.exe | |
| - name: Install specific NDK version | |
| run: | | |
| export ANDROID_SDK_ROOT=/usr/local/lib/android/sdk | |
| yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager "ndk;27.2.12479018" | |
| - name: Set up Android NDK environment | |
| run: | | |
| export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/27.2.12479018 | |
| export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH | |
| echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV | |
| echo "PATH=$PATH" >> $GITHUB_ENV | |
| - name: Build C source code with Makefile | |
| run: | | |
| ./build/android.sh | |
| - name: Upload artifacts for Android | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-android | |
| path: | | |
| zenroom-android.aar | |
| file-changes: | |
| name: "🗃️ Check file changes" | |
| runs-on: ubuntu-latest | |
| needs: [semantic-release] | |
| if: needs.semantic-release.outputs.release == 'True' | |
| outputs: | |
| python3: ${{ steps.filter.outputs.python3 }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| python3: | |
| - 'bindings/python3/**' | |
| python-sdist: | |
| name: 🐍 Python create source distribution | |
| runs-on: ubuntu-latest | |
| needs: [semantic-release, file-changes] | |
| if: ${{ needs.semantic-release.outputs.release == 'True' && needs.file-changes.outputs.python3 == 'true' }} | |
| defaults: | |
| run: | |
| working-directory: bindings/python3 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: master | |
| fetch-depth: 0 | |
| - run: | | |
| pip install --prefer-binary ninja twine | |
| ./prepare.sh | |
| - run: pipx run build --sdist | |
| - run: twine check dist/*.tar.gz | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| path: ./bindings/python3/dist/*.tar.gz | |
| apple-release: | |
| name: 🍎 apple osx and ios release build | |
| needs: [semantic-release] | |
| runs-on: macos-latest | |
| if: needs.semantic-release.outputs.release == 'True' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: hendrikmuhs/[email protected] | |
| - run: | | |
| make osx-exe RELEASE=1 CCACHE=1 | |
| make -C src clean | |
| make osx-lib RELEASE=1 CCACHE=1 | |
| - name: Pack build results | |
| run: | | |
| mkdir -p zenroom-osx | |
| cp zenroom zenroom-osx/ | |
| cp zencode-exec zenroom-osx/ | |
| cp lua-exec zenroom-osx/ | |
| mv libzenroom.dylib zenroom-osx/ | |
| zip -r zenroom-osx.zip zenroom-osx | |
| - name: Upload artifacts for Apple OSX | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-apple-osx | |
| path: | | |
| zenroom-osx.zip | |
| - name: Build ios libs | |
| run: | | |
| make ios-arm64 RELEASE=1 CCACHE=1 | |
| make clean | |
| make ios-sim RELEASE=1 CCACHE=1 | |
| - name: Pack build results | |
| run: | | |
| mkdir -p zenroom-ios | |
| mv zenroom-ios-arm64.a zenroom-ios/ | |
| mv zenroom-ios-sim.a zenroom-ios/ | |
| zip -r zenroom-ios.zip zenroom-ios | |
| - name: Upload artifacts for Apple iOS | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-apple-ios | |
| path: | | |
| zenroom-ios.zip | |
| npm-release: | |
| name: 📦 npm release | |
| runs-on: ubuntu-latest | |
| needs: [js-build-release, apple-release, linux-release, windows-android-release] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: master | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22.x | |
| registry-url: 'https://registry.npmjs.org' | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: javascript-artifact | |
| path: . | |
| - run: | | |
| version=$(git describe --tags --abbrev=0) | |
| yarn version --new-version ${version:1} --no-git-tag-version | |
| - run: | | |
| npm install -g npm@latest | |
| npm publish . --tag latest | |
| pypi-release: | |
| name: 📦 PyPI release | |
| needs: [js-build-release, python-sdist, apple-release, linux-release, windows-android-release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: artifact | |
| path: dist | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| draft-binary-release: | |
| name: 📦 Pack release | |
| needs: [semantic-release, js-build-release, apple-release, linux-release, windows-android-release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: download binary artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: | | |
| zenroom-bin | |
| - name: show directory structure | |
| run: tree -dL 3 | |
| - name: relase all binary artifacts | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| zenroom-bin/release*/* | |
| tag_name: ${{ needs.semantic-release.outputs.version }} | |
| body_path: zenroom-bin/documentation/release-intro.md | |
| append_body: true | |
| draft: false | |
| prerelease: false | |
| fail_on_unmatched_files: true | |
| generate_release_notes: true | |
| publish_docker_image: | |
| name: 🐳 Publish Docker image | |
| needs: [semantic-release, js-build-release, apple-release, linux-release, windows-android-release] | |
| uses: ForkbombEu/workflows/.github/workflows/publish-ghcr.yml@main | |
| secrets: inherit | |
| remove-tag-on-fail: | |
| name: 🧻 Remove tag on fail | |
| needs: [semantic-release, js-build-release, apple-release, linux-release, windows-android-release] | |
| runs-on: ubuntu-latest | |
| if: ${{ (failure() || cancelled()) && needs.semantic-release.outputs.release == 'True' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Remove tag | |
| uses: dev-drprasad/[email protected] | |
| with: | |
| tag_name: ${{ needs.semantic-release.outputs.version }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| delete_release: false | |
| repo: dyne/zenroom |