Build oyster-raw-proxy #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build oyster-raw-proxy | |
on: | |
workflow_dispatch: | |
inputs: | |
iptvo-version: | |
description: 'ip to vsock outgoing binary version' | |
required: false | |
default: 'vX.Y.Z-beta.U' | |
vtipo-version: | |
description: 'vsock to ip outgoing binary version' | |
required: false | |
default: 'vX.Y.Z-beta.U' | |
iptvi-version: | |
description: 'ip to vsock incoming binary version' | |
required: false | |
default: 'vX.Y.Z-beta.U' | |
vtipi-version: | |
description: 'vsock to ip incoming binary version' | |
required: false | |
default: 'vX.Y.Z-beta.U' | |
version-description: | |
description: 'description for new version' | |
required: false | |
default: 'automated' | |
jobs: | |
build_raw_proxies_linux: | |
name: Build raw proxies linux | |
strategy: | |
matrix: | |
include: | |
- os: 'ubuntu-24.04' | |
runs-on: 'ubicloud' | |
build_type: Release | |
GOOS: linux | |
GOARCH: amd64 | |
rust-image: 'ed7795c6eaccae53be35939e883e8c3de0197b21e8eddbd9f04b0c4bc757c094' | |
target: x86_64-unknown-linux-musl | |
- os: 'ubuntu-24.04' | |
runs-on: 'ubicloud-standard-2-arm' | |
build_type: Release | |
GOOS: linux | |
GOARCH: arm64 | |
rust-image: 'c428882ff081342a9661fb13a1d059ecdc0b6e979ffec64b80371cf20a2088b0' | |
target: aarch64-unknown-linux-musl | |
runs-on: ${{ matrix.runs-on }} | |
outputs: | |
iptvo-checksum: ${{steps.iptvo.outputs.checksum}} | |
vtipo-checksum: ${{steps.vtipo.outputs.checksum}} | |
iptvi-checksum: ${{steps.iptvi.outputs.checksum}} | |
vtipi-checksum: ${{steps.vtipi.outputs.checksum}} | |
steps: | |
- name: echo | |
run: | | |
echo iptvo-version ${{github.event.inputs.iptvo-version}} | |
echo vtipo-version ${{github.event.inputs.vtipo-version}} | |
echo iptvi-version ${{github.event.inputs.iptvi-version}} | |
echo vtipi-version ${{github.event.inputs.vtipi-version}} | |
echo version-description ${{github.event.inputs.version-description}} | |
- name: clone | |
run: rm -rf oyster-raw-proxy && git clone https://github.com/marlinprotocol/oyster-raw-proxy oyster-raw-proxy | |
- name: checkout | |
run: cd oyster-raw-proxy && git checkout master | |
- name: build | |
run: cd oyster-raw-proxy && sudo docker run --rm -v `pwd`:/code rust@sha256:${{matrix.rust-image}} /code/build-${{matrix.GOARCH}}.sh | |
- name: aws credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-southeast-1 | |
- name: upx | |
run: | | |
wget https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-${{matrix.GOARCH}}_linux.tar.xz -O upx.txz | |
mkdir -p upx && tar -xvf upx.txz --strip-components=1 -C upx | |
sudo mv upx/upx /usr/local/bin/ | |
- name: upload iptvo | |
id: iptvo | |
if: ${{github.event.inputs.iptvo-version != 'vX.Y.Z-beta.U'}} | |
run: | | |
sudo upx oyster-raw-proxy/target/${{matrix.target}}/release/ip-to-vsock-raw-outgoing | |
echo "::set-output name=checksum::$(sha256sum oyster-raw-proxy/target/${{matrix.target}}/release/ip-to-vsock-raw-outgoing | awk '{print $1;}')" | |
aws s3 cp oyster-raw-proxy/target/${{matrix.target}}/release/ip-to-vsock-raw-outgoing s3://public.artifacts.marlin.pro/projects/enclaves/ip-to-vsock-raw-outgoing_${{github.event.inputs.iptvo-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}} | |
- name: upload vtipo | |
id: vtipo | |
if: ${{github.event.inputs.vtipo-version != 'vX.Y.Z-beta.U'}} | |
run: | | |
sudo upx oyster-raw-proxy/target/${{matrix.target}}/release/vsock-to-ip-raw-outgoing | |
echo "::set-output name=checksum::$(sha256sum oyster-raw-proxy/target/${{matrix.target}}/release/vsock-to-ip-raw-outgoing | awk '{print $1;}')" | |
aws s3 cp oyster-raw-proxy/target/${{matrix.target}}/release/vsock-to-ip-raw-outgoing s3://public.artifacts.marlin.pro/projects/enclaves/vsock-to-ip-raw-outgoing_${{github.event.inputs.vtipo-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}} | |
- name: upload iptvi | |
id: iptvi | |
if: ${{github.event.inputs.iptvi-version != 'vX.Y.Z-beta.U'}} | |
run: | | |
sudo upx oyster-raw-proxy/target/${{matrix.target}}/release/ip-to-vsock-raw-incoming | |
echo "::set-output name=checksum::$(sha256sum oyster-raw-proxy/target/${{matrix.target}}/release/ip-to-vsock-raw-incoming | awk '{print $1;}')" | |
aws s3 cp oyster-raw-proxy/target/${{matrix.target}}/release/ip-to-vsock-raw-incoming s3://public.artifacts.marlin.pro/projects/enclaves/ip-to-vsock-raw-incoming_${{github.event.inputs.iptvi-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}} | |
- name: upload vtipi | |
id: vtipi | |
if: ${{github.event.inputs.vtipi-version != 'vX.Y.Z-beta.U'}} | |
run: | | |
sudo upx oyster-raw-proxy/target/${{matrix.target}}/release/vsock-to-ip-raw-incoming | |
echo "::set-output name=checksum::$(sha256sum oyster-raw-proxy/target/${{matrix.target}}/release/vsock-to-ip-raw-incoming | awk '{print $1;}')" | |
aws s3 cp oyster-raw-proxy/target/${{matrix.target}}/release/vsock-to-ip-raw-incoming s3://public.artifacts.marlin.pro/projects/enclaves/vsock-to-ip-raw-incoming_${{github.event.inputs.vtipi-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}} |