mirror of
https://github.com/encounter/gc-wii-binutils.git
synced 2026-07-10 03:18:49 -07:00
Initial commit
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- 'LICENSE*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: Build
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/386
|
||||
- linux/armv7
|
||||
- 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@v2
|
||||
with:
|
||||
name: artifacts
|
||||
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@v3
|
||||
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/*
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# Build stage
|
||||
FROM alpine:3.19.0 AS build
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --no-cache gcc musl-dev make
|
||||
|
||||
# Download and extract source
|
||||
RUN wget -qO- https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz | tar -xJ
|
||||
|
||||
# Build binutils
|
||||
WORKDIR /binutils-2.41
|
||||
RUN ./configure --target=powerpc-unknown-eabi --prefix=/target --disable-nls --disable-shared \
|
||||
&& make -j$(nproc) configure-host \
|
||||
&& make -j$(nproc) LDFLAGS=-all-static \
|
||||
&& make install-strip
|
||||
|
||||
# Export binary (usage: docker build --target export --output build .)
|
||||
FROM scratch AS export
|
||||
COPY --from=build /target/bin/* .
|
||||
Reference in New Issue
Block a user