-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 2.45 KB
/
oyster-attestation-verifier.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
- 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-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 && 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-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}}