Skip to content

Build oyster-attestation-verifier #17

Build oyster-attestation-verifier

Build oyster-attestation-verifier #17

name: Build oyster-attestation-verifier
on:
workflow_dispatch:
inputs:
oyster-attestation-verifier-version:
description: 'oyster-attestation-verifier version'
# required: false
# default: 'X.Y.Z-beta.U'
jobs:
build_oyster_attestation_verifier_linux:
name: Build oyster-attestation-verifier 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
cargo: CC=musl-gcc cargo
- os: 'ubuntu-22.04'
runs-on: self-hosted
build_type: Release
GOOS: linux
GOARCH: arm64
target: aarch64-unknown-linux-musl
CFLAGS: -mno-outline-atomics
cargo: CC=musl-gcc CFLAGS=-mno-outline-atomics cargo
runs-on: ${{ matrix.runs-on }}
outputs:
oyster-attestation-verifier-checksum: ${{steps.oyster-attestation-verifier.outputs.checksum}}
steps:
- name: echo
run: |
echo oyster-attestation-verifier-version ${{github.event.inputs.oyster-attestation-verifier-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-verifier && git clone https://github.com/marlinprotocol/oyster-attestation-verifier
- name: checkout
run: cd oyster-attestation-verifier && git checkout master
- name: build
run: cd oyster-attestation-verifier && ${{ matrix.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-verifier
id: oyster-attestation-verifier
# if: ${{github.event.inputs.oyster-attestation-verifier-version != 'X.Y.Z-beta.U'}}
run: |
echo "::set-output name=checksum::$(md5sum oyster-attestation-verifier/target/${{ matrix.target }}/release/oyster-attestation-verifier | awk '{print $1;}')"
upx oyster-attestation-verifier/target/${{ matrix.target }}/release/oyster-attestation-verifier
aws s3 cp oyster-attestation-verifier/target/${{ matrix.target }}/release/oyster-attestation-verifier s3://public.artifacts.marlin.pro/projects/enclaves/attestation-verifier_${{github.event.inputs.oyster-attestation-verifier-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}