Skip to content

Build (macOS ARM64) #31

Build (macOS ARM64)

Build (macOS ARM64) #31

Workflow file for this run

name: Build
run-name: Build (${{ github.event.inputs.machine-name }})
on:
workflow_dispatch:
inputs:
machine-name:
description: 'Host to build for'
required: true
type: choice
options:
- 'macOS x86_64'
- 'macOS ARM64'
- 'Linux ARM64'
- 'Linux x86_64'
jobs:
machine-select:
name: Select build machine
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.result }}
steps:
- name: Set Output
id: set-matrix
uses: actions/github-script@v7
with:
script: |
const machines = [
{machine: 'macos-13', os: 'darwin', arch: 'x86_64', cc: 'gcc-14', cxx: 'g++-14', name: 'macOS x86_64'},
{machine: 'macos-14', os: 'darwin', arch: 'arm64', cc: 'gcc-14', cxx: 'g++-14', name: 'macOS ARM64'},
{machine: 'ubuntu-24.04-arm', os: 'linux', arch: 'aarch64', cc: 'gcc-12', cxx: 'g++-12', name: 'Linux ARM64'},
{machine: 'ubuntu-24.04', os: 'linux', arch: 'x86_64', cc: 'gcc-12', cxx: 'g++-12', name: 'Linux x86_64'}
];
return machines.filter(machine => machine.name === '${{ github.event.inputs.machine-name }}');
build:
name: Build for ${{ matrix.name }}
needs: machine-select
strategy:
matrix:
include: ${{ fromJson(needs.machine-select.outputs.matrix) }}
runs-on: ${{ matrix.machine }}
env:
ARTIFACT_NAME: arm-webos-linux-gnueabi_sdk-buildroot_${{matrix.os}}-${{matrix.arch}}-${{matrix.cc}}.tar.bz2
steps:
- uses: actions/checkout@v5
- name: Build toolchain
id: build-toolchain
uses: './.github/actions/build-toolchain'
with:
machine: ${{ matrix.machine }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
cc: ${{ matrix.cc }}
cxx: ${{ matrix.cxx }}
- name: Make tarball
run: |
cmake -E tar cjvf ${ARTIFACT_NAME} arm-webos-linux-gnueabi_sdk-buildroot
working-directory: ${{steps.build-toolchain.outputs.dist}}