Skip to content

Build QEMU

Build QEMU #3

Workflow file for this run

name: Build QEMU
on:
workflow_dispatch:
inputs:
node:
description: 'Node major version'
required: true
default: '16'
arch:
description: 'Arch'
required: true
default: 'arm32v7'
os:
description: 'OS'
required: true
default: 'linux'
jobs:
apk:
runs-on: ubuntu-latest
timeout-minutes: 9999
if: github.actor == 'robertsLando'
steps:
- uses: actions/checkout@v3
- name: "Build ${{ github.event.inputs.arch }} node${{ github.event.inputs.node }} ${{ github.event.inputs.os }}"
uses: uraimo/run-on-arch-action@v2
with:
arch: none
distro: none
# githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/app"
--volume "${PWD}/out:/out"
base_image: ${{ github.event.inputs.arch }}/node:${{ github.event.inputs.node }}-${{ github.event.inputs.os == 'linux' && 'bullseye' || 'alpine3.16' }}
install: |
case "${{ github.event.inputs.os }}" in
linux*)
apt-get update
apt-get install -y --no-install-recommends wget build-essential git
;;
alpine*)
apk update
apk --no-cache add git wget build-base python paxctl linux-headers
;;
esac
# Rebuild .node modules for armv7
run: |
CACHE=/out # custom cache folder
rm -rf $CACHE/built-*
mkdir -p $CACHE
export PKG_CACHE_PATH=$CACHE
export PKG_IGNORE_TAG=true # prevents pkg-fetch to add a tag folder
npx @yao-pkg/pkg-fetch -n node${{ github.event.inputs.node }}
- name: Upload node binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
file: out/built-*
file_glob: true
tag: node${{ github.event.inputs.node }}
overwrite: true