From fd4bfd4eb53008444f9ae071afeb260839d7954d Mon Sep 17 00:00:00 2001 From: Jose Quintana <1700322+joseluisq@users.noreply.github.com> Date: Wed, 25 Oct 2023 01:34:48 +0200 Subject: [PATCH] feat: linux powerpc (ppc64le) and s390x targets (#159) - linux/ppc64le (powerpc64le-unknown-linux-gnu) - linux/s390x (s390x-unknown-linux-gnu) --- .github/workflows/devel.docker.yml | 4 ++++ .github/workflows/devel.yml | 14 ++++++++++++-- .github/workflows/release.docker.yml | 6 +++--- .github/workflows/release.yml | 10 ++++++++++ docker/alpine/Dockerfile | 2 ++ docker/debian/Dockerfile | 2 ++ 6 files changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/devel.docker.yml b/.github/workflows/devel.docker.yml index e2a6e49..755ac63 100644 --- a/.github/workflows/devel.docker.yml +++ b/.github/workflows/devel.docker.yml @@ -23,6 +23,8 @@ jobs: - linux/arm64 - linux/arm/v7 - linux/arm/v6 + - linux/ppc64le + - linux/s390x runs-on: ubuntu-22.04 services: registry: @@ -136,6 +138,8 @@ jobs: - linux/arm64 - linux/arm/v7 - linux/arm/v6 + - linux/ppc64le + - linux/s390x runs-on: ubuntu-22.04 services: registry: diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml index ada860a..3f815e0 100644 --- a/.github/workflows/devel.yml +++ b/.github/workflows/devel.yml @@ -45,6 +45,8 @@ jobs: - linux-arm-gnueabihf - linux-musl-armv6 - linux-musl-armv7 + - linux-ppc64le + - linux-s390x # NOTE: looks like not supported by `listenfd` crate # - linux-android-armv7 - linux-android-arm64 @@ -105,6 +107,14 @@ jobs: os: ubuntu-22.04 rust: stable target: armv7-unknown-linux-musleabihf + - build: linux-ppc64le + os: ubuntu-22.04 + rust: stable + target: powerpc64le-unknown-linux-gnu + - build: linux-s390x + os: ubuntu-22.04 + rust: stable + target: s390x-unknown-linux-gnu # NOTE: looks like not supported by `listenfd` crate # - build: linux-android-armv7 # os: ubuntu-22.04 @@ -206,8 +216,8 @@ jobs: shell: bash run: | case "${{ matrix.build }}" in - *-arm*|*bsd*|*illumos*) - echo "arm(64)s or BSDs are unable to execute on CI for now!" + *-arm*|*bsd*|*illumos*|*ppc64*|*s390x*) + echo "arm,bsd,illumos,ppc64,s390x are unable to execute on CI for now!" ;; *) if [[ "${{ matrix.os }}" == "windows-2022" ]]; then diff --git a/.github/workflows/release.docker.yml b/.github/workflows/release.docker.yml index fdf609f..9d0a778 100644 --- a/.github/workflows/release.docker.yml +++ b/.github/workflows/release.docker.yml @@ -59,7 +59,7 @@ jobs: with: push: true context: . - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x file: ./docker/alpine/Dockerfile tags: ${{ steps.meta_alpine.outputs.tags }} build-args: | @@ -120,7 +120,7 @@ jobs: with: push: true context: . - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x file: ./docker/debian/Dockerfile tags: ${{ steps.meta_debian.outputs.tags }} build-args: | @@ -177,7 +177,7 @@ jobs: with: push: true context: . - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x file: ./docker/scratch/Dockerfile tags: ${{ steps.meta_scratch.outputs.tags }} build-args: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b90751..8399cc3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,8 @@ jobs: - linux-arm-gnueabihf - linux-musl-armv6 - linux-musl-armv7 + - linux-ppc64le + - linux-s390x # - linux-android-armv7 - linux-android-arm64 - netbsd @@ -105,6 +107,14 @@ jobs: os: ubuntu-22.04 rust: stable target: armv7-unknown-linux-musleabihf + - build: linux-ppc64le + os: ubuntu-22.04 + rust: stable + target: powerpc64le-unknown-linux-gnu + - build: linux-s390x + os: ubuntu-22.04 + rust: stable + target: s390x-unknown-linux-gnu # - build: linux-android-armv7 # os: ubuntu-22.04 # rust: stable diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index be660ec..e441fc7 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -12,6 +12,8 @@ RUN set -ex; \ "linux/386") target='i686-unknown-linux-musl' ;; \ "linux/arm/v7") target='armv7-unknown-linux-musleabihf' ;; \ "linux/arm/v6") target='arm-unknown-linux-musleabihf' ;; \ + "linux/ppc64le") target='powerpc64le-unknown-linux-gnu' ;; \ + "linux/s390x") target='s390x-unknown-linux-gnu' ;; \ *) echo >&2 "error: unsupported $TARGETPLATFORM architecture"; exit 1 ;; \ esac; \ wget --quiet -O /tmp/static-web-server.tar.gz "https://github.com/static-web-server/static-web-server/releases/download/v${SERVER_VERSION}/static-web-server-v${SERVER_VERSION}-${target}.tar.gz"; \ diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile index 2088cd7..9f0656a 100644 --- a/docker/debian/Dockerfile +++ b/docker/debian/Dockerfile @@ -20,6 +20,8 @@ RUN set -ex \ "linux/386") target='i686-unknown-linux-musl' ;; \ "linux/arm/v7") target='armv7-unknown-linux-musleabihf' ;; \ "linux/arm/v6") target='arm-unknown-linux-musleabihf' ;; \ + "linux/ppc64le") target='powerpc64le-unknown-linux-gnu' ;; \ + "linux/s390x") target='s390x-unknown-linux-gnu' ;; \ *) echo >&2 "error: unsupported $TARGETPLATFORM architecture"; exit 1 ;; \ esac \ && curl -Lo /tmp/static-web-server.tar.gz \ -- libgit2 1.7.2