Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
ci: build and upload operator binary for linux amd64 and darwin aarch…
Browse files Browse the repository at this point in the history
…64 (#88)

* upload programs as multi-platform matrix

* fix template naming

* add token to sp1up

* test token

* split programs and operator builds

* remove debug statement
  • Loading branch information
gjermundgaraba authored Jul 31, 2024
1 parent 64ad2b9 commit 47fa490
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 37 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/upload-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: upload-artifacts

on:
workflow_dispatch:
push:
branches: [ main ]

jobs:
upload-programs:
name: build-and-upload-programs
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/cargo-prove prove --version
- name: Install just
uses: extractions/setup-just@v2

- name: Build SP1 Programs
run: just build-programs
- name: Upload Programs
uses: actions/upload-artifact@v4
with:
name: program-elfs
path: elf/
retention-days: 5

build-and-upload-operator:
needs: [upload-programs]
strategy:
fail-fast: false
matrix:
platform:
- os_name: linux-x86_64
os: ubuntu-20.04
- os_name: darwin-aarch64
os: macos-14
name: build-and-upload-${{ matrix.platform.os_name }}
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Download Programs
uses: actions/download-artifact@v4
with:
name: program-elfs
path: elf/

- name: Build Operator
run: cargo build --bin operator --locked --release
- name: Upload Operator
uses: actions/upload-artifact@v4
with:
name: operator-${{ matrix.platform.os_name }}
path: target/release/operator
retention-days: 5
37 changes: 0 additions & 37 deletions .github/workflows/upload-programs.yml

This file was deleted.

0 comments on commit 47fa490

Please sign in to comment.