-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 2.73 KB
/
oyster-attestation-verifier-enclave.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
name: Build oyster-attestation-verifier-enclave
on:
workflow_dispatch:
inputs:
oyster-attestation-verifier-enclave-version:
description: 'oyster-attestation-verifier-enclave version'
# required: false
default: 'vX.Y.Z-beta.U'
jobs:
build_oyster_attestation_verifier_linux:
name: Build oyster-attestation-verifier-enclave linux
strategy:
matrix:
include:
- os: 'ubuntu-24.04'
runs-on: 'ubicloud'
build_type: Release
GOOS: linux
GOARCH: amd64
- os: 'ubuntu-24.04'
runs-on: 'ubicloud-standard-2-arm'
build_type: Release
GOOS: linux
GOARCH: arm64
runs-on: ${{ matrix.runs-on }}
outputs:
oyster-attestation-verifier-enclave-checksum: ${{steps.oyster-attestation-verifier-enclave.outputs.checksum}}
steps:
- name: echo
run: |
echo oyster-attestation-verifier-enclave-version ${{github.event.inputs.oyster-attestation-verifier-enclave-version}}
- name: clone
run: rm -rf oyster-attestation-verifier-enclave && git clone https://github.com/marlinprotocol/oyster-attestation-verifier-enclave
- name: checkout
run: cd oyster-attestation-verifier-enclave && git checkout master
- name: nix
run: sudo install -d -m755 -o $(id -u) -g $(id -g) /nix && curl -L https://nixos.org/nix/install | sh
- name: build
run: cd oyster-attestation-verifier-enclave && . /home/runner/.nix-profile/etc/profile.d/nix.sh && nix build --out-link result-${{matrix.GOARCH}} ./${{matrix.GOARCH}} -vL --extra-experimental-features "nix-command flakes"
- name: upload oyster-attestation-verifier-enclave
id: oyster-attestation-verifier-enclave
if: ${{github.event.inputs.oyster-attestation-verifier-enclave-version != 'vX.Y.Z-beta.U'}}
run: |
echo "::set-output name=checksum::$(sha256sum oyster-attestation-verifier-enclave/result-${{matrix.GOARCH}}/image.eif | awk '{print $1;}')"
AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} oyster-attestation-verifier-enclave/result-${{matrix.GOARCH}}/image.eif s3://artifacts/oyster/eifs/attestation-verifier_${{github.event.inputs.oyster-attestation-verifier-enclave-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}.eif
AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} oyster-attestation-verifier-enclave/result-${{matrix.GOARCH}}/pcr.json s3://artifacts/oyster/eifs/attestation-verifier_${{github.event.inputs.oyster-attestation-verifier-enclave-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}.json