Skip to content

Build oyster-attestation-verifier-enclave #5

Build oyster-attestation-verifier-enclave

Build oyster-attestation-verifier-enclave #5

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