Add macOS universal build

This commit is contained in:
Luke Street
2023-12-20 11:50:19 -07:00
parent 1a5cfdde1e
commit 2b7cd46c64
3 changed files with 38 additions and 9 deletions
+27 -9
View File
@@ -9,14 +9,18 @@ on:
jobs:
build-linux:
name: Build
name: Build Linux
strategy:
matrix:
platform:
- linux/amd64
- linux/386
- linux/arm/v7
- linux/arm64/v8
include:
- name: x86_64
platform: linux/amd64
- name: i686
platform: linux/386
- name: armv7l
platform: linux/arm/v7
- name: aarch64
platform: linux/arm64/v8
fail-fast: false
runs-on: ubuntu-latest
steps:
@@ -29,9 +33,23 @@ jobs:
- name: Build
run: docker build --target export --output build . --platform ${{ matrix.platform }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: artifacts
name: linux-${{ matrix.name }}
path: build
build-macos:
name: Build macOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: ./build-macos.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-universal
path: build
release:
@@ -41,7 +59,7 @@ jobs:
needs: [ build-linux ]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
- name: List artifacts
+2
View File
@@ -0,0 +1,2 @@
binutils-*
build
Executable
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash -ex
PREFIX="$(pwd)/build"
wget -qO- https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz | tar -xJ
cd binutils-2.41
export CFLAGS="-arch arm64 -arch x86_64 -mmacosx-version-min=10.11"
./configure --target=powerpc-unknown-eabi --prefix="$PREFIX" --disable-nls --without-zstd
make -j$(nproc) configure-host
make -j$(nproc)
make install-strip