Files
gc-wii-binutils/.github/workflows/build.yml
T
2023-12-20 11:50:19 -07:00

79 lines
2.0 KiB
YAML

name: Build
on:
push:
paths-ignore:
- '*.md'
- 'LICENSE*'
pull_request:
jobs:
build-linux:
name: Build Linux
strategy:
matrix:
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:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
run: docker build --target export --output build . --platform ${{ matrix.platform }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
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:
name: Release
# if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [ build-linux ]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: List artifacts
run: ls -R artifacts
# - name: Rename artifacts
# working-directory: artifacts
# run: |
# mkdir ../out
# for i in */*/$BUILD_PROFILE/$CARGO_BIN_NAME*; do
# mv "$i" "../out/$(sed -E "s/([^/]+)\/[^/]+\/$BUILD_PROFILE\/($CARGO_BIN_NAME)/\2-\1/" <<< "$i")"
# done
# ls -R ../out
# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# files: out/*