From d43c666b9ec8a0bbaca6d5dc67b35119a2d3e988 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 20 Dec 2023 15:57:15 -0700 Subject: [PATCH] Create release task, disable Windows arm64 --- .github/workflows/build.yml | 27 +++++++++++---------------- Dockerfile | 6 +++++- README.md | 1 + build-macos.sh | 2 +- build-windows.sh | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d01799..1c0af34 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,8 +59,8 @@ jobs: include: - name: x86_64 sys: clang64 - - name: arm64 - sys: clangarm64 + # - name: arm64 + # sys: clangarm64 fail-fast: false runs-on: windows-latest steps: @@ -82,9 +82,9 @@ jobs: release: name: Release - # if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest - needs: [ build-linux ] + needs: [ build-linux, build-macos, build-windows ] steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -92,15 +92,10 @@ jobs: 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/* + - name: Create archives + working-directory: artifacts + run: for f in *; do zip -jr $f.zip $f; done + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: artifacts/*.zip diff --git a/Dockerfile b/Dockerfile index 0382f8f..47d8fa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,15 @@ 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 \ +RUN ./configure --target=powerpc-eabi --prefix=/target --disable-nls --disable-shared \ && make -j$(nproc) configure-host \ && make -j$(nproc) LDFLAGS=-all-static \ && make install-strip +# Rename binaries +RUN cd /target/bin \ + && for f in *; do mv $f powerpc-eabi-$f; done + # Export binary (usage: docker build --target export --output build .) FROM scratch AS export COPY --from=build /target/* . diff --git a/README.md b/README.md new file mode 100644 index 0000000..5213051 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Cross-platform builds of `powerpc-eabi` binutils. diff --git a/build-macos.sh b/build-macos.sh index 1acd5f7..ba1b481 100755 --- a/build-macos.sh +++ b/build-macos.sh @@ -3,7 +3,7 @@ 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 --disable-shared --without-zstd +./configure --target=powerpc-eabi --prefix="$PREFIX" --disable-nls --disable-shared --without-zstd make -j$(nproc) configure-host make -j$(nproc) make install-strip diff --git a/build-windows.sh b/build-windows.sh index ae19aa7..1cbcee6 100644 --- a/build-windows.sh +++ b/build-windows.sh @@ -2,7 +2,7 @@ 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 +./configure --target=powerpc-eabi --prefix="$PREFIX" --disable-nls --disable-shared make -j$(nproc) configure-host make -j$(nproc) make install-strip