Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executor: add a verifiable build #9

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci-verifiable-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Verifiable Build
on:
push:
tags:
- 'program-v*'
workflow_dispatch:

env:
EXECUTOR_NAME: autobahn_executor

jobs:
build:
name: Build Verifiable Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup solana-verify
run: |
cargo install solana-verify

- name: Verifiable build autobahn-executor
run: |
solana-verify build --library-name ${{ env.EXECUTOR_NAME }}

- name: Get hash autobahn-executor
run: |
solana-verify get-executable-hash target/deploy/${{ env.EXECUTOR_NAME }}.so

- name: Generate checksum autobahn-executor
run: |
echo "EXECUTOR_CHECKSUM=$(sha256sum ./target/deploy/${{ env.EXECUTOR_NAME }}.so | head -c 64)" >> $GITHUB_ENV

- name: Generate SBOM autobahn executor
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
format: 'cyclonedx'
output: '${{ env.EXECUTOR_NAME }}-${{ github.ref_name }}-sbom.json'

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: |
autobahn-executor sha256 checksum: ${{ env.EXECUTOR_CHECKSUM }}
github commit: ${{ github.sha }}
files: |
./target/deploy/${{ env.EXECUTOR_NAME }}.so
./${{ env.EXECUTOR_NAME }}-${{ github.ref_name }}-sbom.json
Loading