Skip to content

Build dev Linux-static aarch64 binary #5

Build dev Linux-static aarch64 binary

Build dev Linux-static aarch64 binary #5

name: Build dev Linux-static aarch64 binary
on:
workflow_dispatch:
jobs:
build-dev-linux-static-aarch64:
name: Build dev aarch64 Linux static binary
runs-on: ubuntu-22.04
env:
BUILD_ARCH: arm64
BUILD_LOGLEVEL: verbose
BUILD_STATIC: '--fully-static'
BUILD_NO_LTO: 1 # the MUSL setup doesn't support linker plugins
steps:
- uses: actions/checkout@v3
- name: Setup musl
run: |
curl http://musl.cc/aarch64-linux-musl-cross.tgz | tar zxf -
echo "CC=`pwd`/aarch64-linux-musl-cross/bin/aarch64-linux-musl-cc" >> $GITHUB_ENV
echo "CXX=`pwd`/aarch64-linux-musl-cross/bin/aarch64-linux-musl-c++" >> $GITHUB_ENV
- uses: actions/setup-python@v4
id: py
with:
python-version: '3.9' # workaround "cannot import name 'Mapping' from 'collections'" error
- run: npm install --production --ignore-scripts
- run: npm install --production
working-directory: nexe
# diagnose weird failure between initial message and download message
- run: sed -i '/return tryInvokeMiddleware/i try{console.log("Invoke middleware", mw.name);}catch(x){}' node_modules/app-builder/lib/compose.js
working-directory: nexe
continue-on-error: true
- run: node build
working-directory: nexe
env:
CC_host: cc
CXX_host: c++
- run: xz -9e --lzma2 nexe/parpar -c > parpar.xz
- uses: actions/upload-artifact@v3
with:
path: ./parpar.xz
name: parpar-${{ github.ref_name }}-linux-static-aarch64.xz
retention-days: 5