This repository was archived by the owner on Jul 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
BAC-185: Refactor build enclave workflow #278
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
215b350
BAC-185: Refactor build enclave workflow
Marcin-Radecki b70ec2e
Fix typo
Marcin-Radecki 23c320f
Try to fix build
Marcin-Radecki caf4c81
Merge branch 'main' into BAC-185-refactor-enclave-workflow
Marcin-Radecki 18e3e0e
Review
Marcin-Radecki ea96a87
Merge branch 'main' into BAC-185-refactor-enclave-workflow
Marcin-Radecki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,69 @@ | ||
--- | ||
|
||
name: "Build enclave artifacts" | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: 'git ref: hash, branch, tag to build enclave files from' | ||
type: string | ||
required: true | ||
outputs: | ||
artifact-name-eif: | ||
description: 'Name of artifact: shielder-prover-tee enclave file' | ||
value: ${{ jobs.main.outputs.artifact-name-eif }} | ||
artifact-name-measurements: | ||
description: 'Name of artifact: shielder-prover-tee enclave measurements' | ||
value: ${{ jobs.main.outputs.artifact-name-measurements }} | ||
jobs: | ||
main: | ||
runs-on: ubuntu-24.04 | ||
defaults: | ||
run: | ||
working-directory: "tee/nix" | ||
outputs: | ||
artifact-name-eif: ${{ steps.get-artifact-names.outputs.eif }} | ||
artifact-name-measurements: ${{ steps.steps.get-artifact-names.outputs.measurements }} | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
fetch-depth: 0 | ||
|
||
- name: Call action get-ref-properties | ||
id: get-ref-properties | ||
uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 | ||
|
||
- name: Install nix | ||
uses: cachix/install-nix-action@v31 | ||
|
||
- name: Check nix inputs | ||
run: nix flake check | ||
|
||
- name: Build enclave for shielder-prover-tee | ||
# yamllint disable rule:line-length | ||
run: | | ||
nix build --override-input zkOS-monorepo 'github:Cardinal-Cryptography/zkOS-monorepo/${{ steps.get-ref-properties.outputs.full-sha }}' | ||
|
||
- name: Get artifact names | ||
id: get-artifact-names | ||
run: | | ||
echo "eif=shielder-prover-tee-eif" >> $GITHUB_OUTPUT | ||
echo "measurements=shielder-prover-tee-measurements" >> $GITHUB_OUTPUT | ||
|
||
- name: Upload EIF to GH Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.get-artifact-names.outputs.eif }} | ||
path: tee/nix/result/shielderProverTEE/image.eif | ||
if-no-files-found: error | ||
retention-days: 7 | ||
|
||
- name: Upload measurements to GH Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.get-artifact-names.outputs.measurements }} | ||
path: tee/nix/result/shielderProverTEE/pcr.json | ||
if-no-files-found: error | ||
retention-days: 7 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.