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: jobs:
build-linux: build-linux:
name: Build name: Build Linux
strategy: strategy:
matrix: matrix:
platform: include:
- linux/amd64 - name: x86_64
- linux/386 platform: linux/amd64
- linux/arm/v7 - name: i686
- linux/arm64/v8 platform: linux/386
- name: armv7l
platform: linux/arm/v7
- name: aarch64
platform: linux/arm64/v8
fail-fast: false fail-fast: false
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -29,9 +33,23 @@ jobs:
- name: Build - name: Build
run: docker build --target export --output build . --platform ${{ matrix.platform }} run: docker build --target export --output build . --platform ${{ matrix.platform }}
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
with: 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 path: build
release: release:
@@ -41,7 +59,7 @@ jobs:
needs: [ build-linux ] needs: [ build-linux ]
steps: steps:
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
path: artifacts path: artifacts
- name: List 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