mirror of
https://github.com/encounter/gc-wii-binutils.git
synced 2026-07-10 03:18:49 -07:00
105 lines
2.6 KiB
YAML
105 lines
2.6 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '*.md'
|
|
- 'LICENSE*'
|
|
pull_request:
|
|
|
|
jobs:
|
|
build-linux:
|
|
name: Build Linux
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: x86_64
|
|
gnu: x86_64-linux-musl
|
|
zig: x86_64-linux-musl
|
|
- name: i686
|
|
gnu: i686-linux-musl
|
|
zig: x86-linux-musl
|
|
- name: armv7l
|
|
gnu: arm-linux-musleabihf
|
|
zig: arm-linux-musleabihf
|
|
- name: aarch64
|
|
gnu: aarch64-linux-musl
|
|
zig: aarch64-linux-musl
|
|
fail-fast: false
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Build
|
|
run: >
|
|
docker build --target export --output build .
|
|
--build-arg GNU_TRIPLE=${{ matrix.gnu }}
|
|
--build-arg ZIG_TRIPLE=${{ matrix.zig }}
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-${{ matrix.name }}
|
|
path: build/bin
|
|
|
|
build-macos:
|
|
name: Build macOS
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Build
|
|
run: ./build-macos.sh
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
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@v4
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: ${{ matrix.sys }}
|
|
install: make texinfo patch
|
|
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/')
|
|
runs-on: ubuntu-latest
|
|
needs: [ build-linux, build-macos, build-windows ]
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: artifacts
|
|
- name: List artifacts
|
|
run: ls -R artifacts
|
|
- name: Create archives
|
|
working-directory: artifacts
|
|
run: for f in *; do zip -jr $f.zip $f; done
|
|
- name: Release
|
|
uses: softprops/action-gh-release@4634c16
|
|
with:
|
|
files: artifacts/*.zip
|