Merge pull request #17 from ttdennis/socat-ppc
Socat powerpc and powerpc64 builds
This commit is contained in:
commit
ab7a02f0dd
4 changed files with 90 additions and 2 deletions
66
.github/workflows/build-socat.yml
vendored
66
.github/workflows/build-socat.yml
vendored
|
@ -116,10 +116,74 @@ jobs:
|
|||
name: ${{ steps.build_socat.outputs.PACKAGED_NAME }}
|
||||
path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }}
|
||||
|
||||
build-ppc32:
|
||||
name: Build socat powerpc32
|
||||
runs-on: ubuntu-latest
|
||||
container: muslcc/x86_64:powerpc-linux-musl
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apk update && sudo apk add bash && sudo bash build/install_deps_alpine.sh
|
||||
|
||||
- name: Install testing dependencies
|
||||
run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl
|
||||
|
||||
- name: Install build compiler
|
||||
run: /bin/sh -c "apk update && apk upgrade && apk add --no-cache curl rsync sudo util-linux && cd / && curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz && tar -xf ${ARCH}-cross.tgz && rm ${ARCH}-cross.tgz && cd ${ARCH}-cross"
|
||||
env:
|
||||
ARCH: x86_64-linux-musl
|
||||
HOST: http://musl.cc/
|
||||
TEMP: /tmp
|
||||
USER: 0
|
||||
|
||||
- name: Build socat
|
||||
id: build_socat
|
||||
run: $GITHUB_WORKSPACE/build/targets/build_socat.sh ppc32
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.build_socat.outputs.PACKAGED_NAME }}
|
||||
path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }}
|
||||
|
||||
build-ppc64:
|
||||
name: Build socat powerpc64
|
||||
runs-on: ubuntu-latest
|
||||
container: muslcc/x86_64:powerpc64-linux-musl
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apk update && sudo apk add bash && sudo bash build/install_deps_alpine.sh
|
||||
|
||||
- name: Install testing dependencies
|
||||
run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl
|
||||
|
||||
- name: Install build compiler
|
||||
run: /bin/sh -c "apk update && apk upgrade && apk add --no-cache curl rsync sudo util-linux && cd / && curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz && tar -xf ${ARCH}-cross.tgz && rm ${ARCH}-cross.tgz && cd ${ARCH}-cross"
|
||||
env:
|
||||
ARCH: x86_64-linux-musl
|
||||
HOST: http://musl.cc/
|
||||
TEMP: /tmp
|
||||
USER: 0
|
||||
|
||||
- name: Build socat
|
||||
id: build_socat
|
||||
run: $GITHUB_WORKSPACE/build/targets/build_socat.sh ppc64
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.build_socat.outputs.PACKAGED_NAME }}
|
||||
path: ${{ steps.build_socat.outputs.PACKAGED_NAME_PATH }}
|
||||
|
||||
create-release:
|
||||
name: Create socat Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-x86, build-x86_64, build-armhf, build-aarch64]
|
||||
needs: [build-x86, build-x86_64, build-armhf, build-aarch64, build-ppc32, build-ppc64]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
|
|
@ -13,6 +13,8 @@ apk add \
|
|||
libtool \
|
||||
qemu-arm \
|
||||
qemu-aarch64 \
|
||||
qemu-ppc \
|
||||
qemu-ppc64 \
|
||||
file \
|
||||
texinfo \
|
||||
zip \
|
||||
|
|
22
build/lib.sh
22
build/lib.sh
|
@ -47,6 +47,10 @@ get_host_triple(){
|
|||
host="arm-linux-musleabihf"
|
||||
elif [ "$CURRENT_ARCH" == "aarch64" ];then
|
||||
host="aarch64-linux-musl"
|
||||
elif [ "$CURRENT_ARCH" == "ppc32" ];then
|
||||
host="powerpc-linux-musl"
|
||||
elif [ "$CURRENT_ARCH" == "ppc64" ];then
|
||||
host="powerpc64-linux-musl"
|
||||
fi
|
||||
echo $host
|
||||
}
|
||||
|
@ -145,6 +149,20 @@ get_version(){
|
|||
else
|
||||
echo "qemu-aarch64 not found, skipping AARCH64 version checks." >&2
|
||||
fi
|
||||
elif [ "$CURRENT_ARCH" == "ppc32" ];then
|
||||
if which qemu-ppc 1>&2 2>/dev/null;then
|
||||
cmd="qemu-ppc ${cmd}"
|
||||
version+=$(eval "$cmd")
|
||||
else
|
||||
echo "qemu-ppc not found, skipping ppc32 version checks." >&2
|
||||
fi
|
||||
elif [ "$CURRENT_ARCH" == "ppc64" ];then
|
||||
if which qemu-ppc64 1>&2 2>/dev/null;then
|
||||
cmd="qemu-ppc64 ${cmd}"
|
||||
version+=$(eval "$cmd")
|
||||
else
|
||||
echo "qemu-ppc64 not found, skipping ppc64 version checks." >&2
|
||||
fi
|
||||
else
|
||||
version+=$(eval "$cmd")
|
||||
fi
|
||||
|
@ -214,6 +232,10 @@ lib_build_openssl(){
|
|||
openssl_arch="linux-x86_64"
|
||||
elif [ "${CURRENT_ARCH}" == "aarch64" ];then
|
||||
openssl_arch="linux-generic64"
|
||||
elif [ "${CURRENT_ARCH}" == "ppc32" ];then
|
||||
openssl_arch="linux-ppc"
|
||||
elif [ "${CURRENT_ARCH}" == "ppc64" ];then
|
||||
openssl_arch="linux-ppc"
|
||||
fi
|
||||
CFLAGS="${GCC_OPTS}" \
|
||||
./Configure \
|
||||
|
|
|
@ -4,7 +4,7 @@ if [ -z "$GITHUB_WORKSPACE" ];then
|
|||
exit 1
|
||||
fi
|
||||
if [ "$#" -ne 1 ];then
|
||||
echo "Usage: ${0} [x86|x86_64|armhf|aarch64]"
|
||||
echo "Usage: ${0} [x86|x86_64|armhf|aarch64|ppc32|ppc64]"
|
||||
echo "Example: ${0} x86_64"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue