Build oyster-keygen #3
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-keygen | |
on: | |
workflow_dispatch: | |
inputs: | |
keygen-ed25519-version: | |
description: 'keygen ed25519 binary version' | |
required: false | |
default: 'vX.Y.Z-beta.U' | |
keygen-secp256k1-version: | |
description: 'keygen secp256k1 binary version' | |
required: false | |
default: 'vX.Y.Z-beta.U' | |
version-description: | |
description: 'description for new version' | |
required: false | |
default: 'automated' | |
jobs: | |
build_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: | |
keygen-ed25519-checksum: ${{steps.keygen-ed25519.outputs.checksum}} | |
keygen-secp256k1-checksum: ${{steps.keygen-secp256k1.outputs.checksum}} | |
steps: | |
- name: echo | |
run: | | |
echo keygen-ed25519-version ${{github.event.inputs.keygen-ed25519-version}} | |
echo keygen-secp256k1-version ${{github.event.inputs.keygen-secp256k1-version}} | |
echo version-description ${{github.event.inputs.version-description}} | |
- name: clone | |
run: rm -rf oyster-keygen && git clone https://github.com/marlinprotocol/oyster-keygen oyster-keygen | |
- name: checkout | |
run: cd oyster-keygen && git checkout master | |
- name: build | |
run: cd oyster-keygen && 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 keygen-ed25519 | |
id: keygen-ed25519 | |
if: ${{github.event.inputs.keygen-ed25519-version != 'vX.Y.Z-beta.U'}} | |
run: | | |
sudo upx oyster-keygen/target/${{matrix.target}}/release/keygen-ed25519 | |
echo "::set-output name=checksum::$(sha256sum oyster-keygen/target/${{matrix.target}}/release/keygen-ed25519 | awk '{print $1;}')" | |
aws s3 cp oyster-keygen/target/${{matrix.target}}/release/keygen-ed25519 s3://public.artifacts.marlin.pro/projects/enclaves/keygen-ed25519_${{github.event.inputs.keygen-ed25519-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}} | |
- name: upload keygen-secp256k1 | |
id: keygen-secp256k1 | |
if: ${{github.event.inputs.keygen-secp256k1-version != 'vX.Y.Z-beta.U'}} | |
run: | | |
sudo upx oyster-keygen/target/${{matrix.target}}/release/keygen-secp256k1 | |
echo "::set-output name=checksum::$(sha256sum oyster-keygen/target/${{matrix.target}}/release/keygen-secp256k1 | awk '{print $1;}')" | |
aws s3 cp oyster-keygen/target/${{matrix.target}}/release/keygen-secp256k1 s3://public.artifacts.marlin.pro/projects/enclaves/keygen-secp256k1_${{github.event.inputs.keygen-secp256k1-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}} |