@@ -36,50 +36,27 @@ jobs:
3636 echo "NITRO_IMAGE=${NITRO_IMAGE}" >> $GITHUB_ENV
3737 echo "NITRO_TAG=$(echo ${NITRO_IMAGE} | sed 's/.*://')" >> $GITHUB_ENV
3838
39- # - name: Extract Nitro Binary
40- # run: |
41- # mkdir -p build-outputs
42- # docker pull "${{ env.NITRO_IMAGE }}"
43- # echo "IMAGE_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ${{ env.NITRO_IMAGE }})" >> $GITHUB_ENV
44-
45- # CONTAINER_ID=$(docker create "${{ env.NITRO_IMAGE }}" /bin/true)
46- # docker cp "${CONTAINER_ID}:/usr/local/bin/nitro" "build-outputs/nitro"
47- # docker rm "${CONTAINER_ID}"
48- # chmod +x build-outputs/nitro
49-
50- # echo "NITRO_BINARY_HASH=$(sha256sum build-outputs/nitro | cut -d' ' -f1)" >> $GITHUB_ENV
51- # docker system prune -af
52- # echo "Disk after Docker cleanup:"
53- # df -h /
54-
55- # - name: Stage Binary for Nix
56- # run: |
57- # git config user.name "github-actions"
58- # git config user.email "github-actions@github.com"
59- # git add -f build-outputs/nitro
60- # git commit -m "temp: stage nitro binary" || true
61-
6239 - uses : DeterminateSystems/nix-installer-action@main
6340 - uses : DeterminateSystems/magic-nix-cache-action@main
6441
65- - name : Build EIF and Enclaver
66- run : |
42+ - name : Build EIF and Enclaver
43+ run : |
6744 # Build the EIF
68- nix build '.#x86_64-eif' -L || true
69-
70- EIF_DIR=$(ls -d /nix/store/*batcher-x86_64 2>/dev/null | grep -v '\.drv' | head -1)
71- [ -z "$EIF_DIR" ] && { echo "ERROR: EIF not found"; exit 1; }
45+ nix build '.#x86_64-eif' -L --out-link ./eif-result
7246
73- cp "$EIF_DIR/batcher.eif" ./enclave.eif
74- cp "$EIF_DIR/pcr.json" ./pcr.json
47+ # Copy files from the result
48+ cp ./eif-result/batcher.eif ./enclave.eif
49+ cp ./eif-result/pcr.json ./pcr.json
7550
76- # Build the enclaver binary (includes outer proxy for network)
77- nix build '.#default ' -L --impure
78- cp ./result/bin/enclaver ./enclaver
51+ # Build the enclaver binary
52+ nix build '.#enclaver ' -L --out-link ./enclaver-result
53+ cp ./enclaver- result/bin/enclaver ./enclaver
7954 chmod +x ./enclaver
80-
8155 echo "Built files:"
82- ls -la ./enclave.eif ./pcr.json ./enclaver
56+ ls -lh ./enclave.eif ./pcr.json ./enclaver
57+
58+ echo "PCR Measurements:"
59+ cat ./pcr.json | jq .
8360
8461 - name : Install Foundry
8562 uses : foundry-rs/foundry-toolchain@v1
0 commit comments