-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaee7f5
commit 214c54f
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build oyster-iperf3-enclave | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
oyster-iperf3-enclave-family: | ||
description: 'oyster-iperf3-enclave family' | ||
# required: false | ||
default: 'salmon' | ||
oyster-iperf3-enclave-version: | ||
description: 'oyster-iperf3-enclave version' | ||
# required: false | ||
default: 'vX.Y.Z-beta.U' | ||
jobs: | ||
build_linux: | ||
name: Build oyster-iperf3-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-iperf3-enclave-checksum: ${{steps.oyster-iperf3-enclave.outputs.checksum}} | ||
steps: | ||
- name: echo | ||
run: | | ||
echo oyster-iperf3-enclave-version ${{github.event.inputs.oyster-iperf3-enclave-version}} | ||
- name: clone | ||
run: rm -rf oyster-iperf3-enclave && git clone https://github.com/marlinprotocol/oyster-iperf3-enclave | ||
- name: checkout | ||
run: cd oyster-iperf3-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-iperf3-enclave && . /home/runner/.nix-profile/etc/profile.d/nix.sh && nix build --out-link result-${{github.event.inputs.oyster-iperf3-enclave-family}}-${{matrix.GOARCH}} ./${{github.event.inputs.oyster-iperf3-enclave-family}}/${{matrix.GOARCH}} -vL --extra-experimental-features "nix-command flakes" | ||
- name: upload oyster-iperf3-enclave | ||
id: oyster-iperf3-enclave | ||
if: ${{github.event.inputs.oyster-iperf3-enclave-version != 'vX.Y.Z-beta.U'}} | ||
run: | | ||
echo "::set-output name=checksum::$(sha256sum oyster-iperf3-enclave/result-${{github.event.inputs.oyster-iperf3-enclave-family}}-${{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-iperf3-enclave/result-${{github.event.inputs.oyster-iperf3-enclave-family}}-${{matrix.GOARCH}}/image.eif s3://artifacts/oyster/eifs/iperf3-${{github.event.inputs.oyster-iperf3-enclave-family}}_${{github.event.inputs.oyster-iperf3-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-iperf3-enclave/result-${{github.event.inputs.oyster-iperf3-enclave-family}}-${{matrix.GOARCH}}/pcr.json s3://artifacts/oyster/eifs/iperf3-${{github.event.inputs.oyster-iperf3-enclave-family}}_${{github.event.inputs.oyster-iperf3-enclave-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}.json |