From 1d9deadf3b1b932f8684e2592fe342336dceb1cc Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 20 Dec 2023 15:26:00 -0700 Subject: [PATCH] Add Windows builds (x86_64, arm64) --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ build-windows.sh | 8 ++++++++ 2 files changed, 36 insertions(+) create mode 100644 build-windows.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e553760..5d01799 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,34 @@ jobs: name: macos-universal path: build/bin + build-windows: + name: Build Windows + strategy: + matrix: + include: + - name: x86_64 + sys: clang64 + - name: arm64 + sys: clangarm64 + fail-fast: false + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.sys }} + install: make texinfo + pacboy: clang:p + - name: Build + shell: msys2 {0} + run: ./build-windows.sh + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: windows-${{ matrix.name }} + path: build/bin + release: name: Release # if: startsWith(github.ref, 'refs/tags/') diff --git a/build-windows.sh b/build-windows.sh new file mode 100644 index 0000000..ae19aa7 --- /dev/null +++ b/build-windows.sh @@ -0,0 +1,8 @@ +#!/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 +./configure --target=powerpc-unknown-eabi --prefix="$PREFIX" --disable-nls --disable-shared +make -j$(nproc) configure-host +make -j$(nproc) +make install-strip