Skip to content

Build oyster-tcp-proxy #2

Build oyster-tcp-proxy

Build oyster-tcp-proxy #2

name: Build proxies
on:
workflow_dispatch:
inputs:
iptv-version:
description: 'ip to vsock binary version'
required: false
default: 'X.Y.Z-beta.U'
vtip-version:
description: 'vsock to ip binary version'
required: false
default: 'X.Y.Z-beta.U'
iptvt-version:
description: 'ip to vsock transparent binary version'
required: false
default: 'X.Y.Z-beta.U'
vtipt-version:
description: 'vsock to ip transparent binary version'
required: false
default: 'X.Y.Z-beta.U'
ptvt-version:
description: 'port to vsock transparent binary version'
required: false
default: 'X.Y.Z-beta.U'
version-description:
description: 'description for new version'
required: false
default: 'automated'
jobs:
build_proxies_linux:
name: Build proxies linux
strategy:
matrix:
include:
- os: 'ubuntu-22.04'
runs-on: 'ubuntu-22.04'
build_type: Release
GOOS: linux
GOARCH: amd64
target: x86_64-unknown-linux-musl
- os: 'ubuntu-22.04'
runs-on: self-hosted
build_type: Release
GOOS: linux
GOARCH: arm64
target: aarch64-unknown-linux-musl
runs-on: ${{ matrix.runs-on }}
outputs:
iptv-checksum: ${{steps.iptv.outputs.checksum}}
vtip-checksum: ${{steps.vtip.outputs.checksum}}
iptvt-checksum: ${{steps.iptvt.outputs.checksum}}
vtipt-checksum: ${{steps.vtipt.outputs.checksum}}
ptvt-checksum: ${{steps.ptvt.outputs.checksum}}
steps:
- name: echo
run: |
echo iptv-version ${{github.event.inputs.iptv-version}}
echo vtip-version ${{github.event.inputs.vtip-version}}
echo iptvt-version ${{github.event.inputs.iptvt-version}}
echo vtipt-version ${{github.event.inputs.vtipt-version}}
echo ptvt-version ${{github.event.inputs.ptvt-version}}
echo version-description ${{github.event.inputs.version-description}}
- name: update rust
run: rustup update && rustup target add ${{matrix.target}}
- name: clone
run: rm -rf oyster-tcp-proxy && git clone https://github.com/marlinprotocol/oyster-tcp-proxy oyster-tcp-proxy
- name: checkout
run: cd oyster-tcp-proxy && git checkout master
- name: build
run: cd oyster-tcp-proxy && cargo build --release --target ${{matrix.target}}
- 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: upload iptv
id: iptv
if: ${{github.event.inputs.iptv-version != 'X.Y.Z-beta.U'}}
run: |
echo "::set-output name=checksum::$(md5sum oyster-tcp-proxy/target/${{matrix.target}}/release/ip-to-vsock | awk '{print $1;}')"
upx oyster-tcp-proxy/target/${{matrix.target}}/release/ip-to-vsock
aws s3 cp oyster-tcp-proxy/target/${{matrix.target}}/release/ip-to-vsock s3://public.artifacts.marlin.pro/projects/enclaves/ip-to-vsock_${{github.event.inputs.iptv-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}
- name: upload vtip
id: vtip
if: ${{github.event.inputs.vtip-version != 'X.Y.Z-beta.U'}}
run: |
echo "::set-output name=checksum::$(md5sum oyster-tcp-proxy/target/${{matrix.target}}/release/vsock-to-ip | awk '{print $1;}')"
upx oyster-tcp-proxy/target/${{matrix.target}}/release/vsock-to-ip
aws s3 cp oyster-tcp-proxy/target/${{matrix.target}}/release/vsock-to-ip s3://public.artifacts.marlin.pro/projects/enclaves/vsock-to-ip_${{github.event.inputs.vtip-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}
- name: upload iptvt
id: iptvt
if: ${{github.event.inputs.iptvt-version != 'X.Y.Z-beta.U'}}
run: |
echo "::set-output name=checksum::$(md5sum oyster-tcp-proxy/target/${{matrix.target}}/release/ip-to-vsock-transparent | awk '{print $1;}')"
upx oyster-tcp-proxy/target/${{matrix.target}}/release/ip-to-vsock-transparent
aws s3 cp oyster-tcp-proxy/target/${{matrix.target}}/release/ip-to-vsock-transparent s3://public.artifacts.marlin.pro/projects/enclaves/ip-to-vsock-transparent_${{github.event.inputs.iptvt-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}
- name: upload vtipt
id: vtipt
if: ${{github.event.inputs.vtipt-version != 'X.Y.Z-beta.U'}}
run: |
echo "::set-output name=checksum::$(md5sum oyster-tcp-proxy/target/${{matrix.target}}/release/vsock-to-ip-transparent | awk '{print $1;}')"
upx oyster-tcp-proxy/target/${{matrix.target}}/release/vsock-to-ip-transparent
aws s3 cp oyster-tcp-proxy/target/${{matrix.target}}/release/vsock-to-ip-transparent s3://public.artifacts.marlin.pro/projects/enclaves/vsock-to-ip-transparent_${{github.event.inputs.vtipt-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}
- name: upload ptvt
id: ptvt
if: ${{github.event.inputs.ptvt-version != 'X.Y.Z-beta.U'}}
run: |
echo "::set-output name=checksum::$(md5sum oyster-tcp-proxy/target/${{matrix.target}}/release/port-to-vsock-transparent | awk '{print $1;}')"
upx oyster-tcp-proxy/target/${{matrix.target}}/release/port-to-vsock-transparent
aws s3 cp oyster-tcp-proxy/target/${{matrix.target}}/release/port-to-vsock-transparent s3://public.artifacts.marlin.pro/projects/enclaves/port-to-vsock-transparent_${{github.event.inputs.ptvt-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}