Build attestation server - secp256k1 #9
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-attestation-server-secp256k1 | |
on: | |
workflow_dispatch: | |
inputs: | |
oyster-attestation-server-secp256k1-version: | |
description: 'oyster-attestation-server-secp256k1 version' | |
# required: false | |
# default: 'X.Y.Z-beta.U' | |
jobs: | |
build_oyster-attestation-server-secp256k1_linux: | |
name: Build oyster-attestation-server-secp256k1 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: | |
oyster-attestation-server-secp256k1-checksum: ${{steps.oyster-attestation-server-secp256k1.outputs.checksum}} | |
steps: | |
- name: echo | |
run: | | |
echo oyster-attestation-server-secp256k1-version ${{github.event.inputs.oyster-attestation-server-secp256k1-version}} | |
- name: setup rust | |
run: rustup update && rustup target add ${{ matrix.target }} && sudo apt-get install -y musl-tools | |
- name: clone | |
run: rm -rf oyster-attestation-server-secp256k1 && git clone https://github.com/marlinprotocol/oyster-attestation-server-secp256k1 oyster-attestation-server-secp256k1 | |
- name: checkout | |
run: cd oyster-attestation-server-secp256k1 && git checkout master | |
- name: build | |
run: cd oyster-attestation-server-secp256k1 && CC=musl-gcc 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 oyster-attestation-server-secp256k1 | |
id: oyster-attestation-server-secp256k1 | |
# if: ${{github.event.inputs.oyster-attestation-server-secp256k1-version != 'X.Y.Z-beta.U'}} | |
run: | | |
echo "::set-output name=checksum::$(md5sum oyster-attestation-server-secp256k1/target/${{ matrix.target }}/release/oyster-attestation-server-secp256k1 | awk '{print $1;}')" | |
upx oyster-attestation-server-secp256k1/target/${{ matrix.target }}/release/oyster-attestation-server-secp256k1 | |
aws s3 cp oyster-attestation-server-secp256k1/target/${{ matrix.target }}/release/oyster-attestation-server-secp256k1 s3://public.artifacts.marlin.pro/projects/enclaves/attestation-server-secp256k1_${{github.event.inputs.oyster-attestation-server-secp256k1-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}} |