-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (51 loc) · 1.67 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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'
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-12', os: 'darwin', arch: 'x86_64', name: 'macOS x86_64'},
{machine: 'macos-14', os: 'darwin', arch: 'arm64', name: 'macOS ARM64'},
{machine: 'debian-arm64-latest', os: 'linux', arch: 'aarch64', name: 'Linux ARM64'}
];
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 }}
steps:
- uses: actions/checkout@v4
- name: Build toolchain
id: build-toolchain
uses: './.github/actions/build-toolchain'
with:
machine: ${{ matrix.machine }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
- name: Make tarball
run: |
cmake -E tar cjvf ${ARTIFACT_NAME} arm-webos-linux-gnueabi_sdk-buildroot
working-directory: ${{steps.build-toolchain.outputs.install-prefix}}