From 3f3087492383adb480e9764f8273f8e49c6855e0 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Tue, 30 Jul 2024 12:56:44 +0900 Subject: [PATCH] ci: release ci added --- .github/workflows/programs.yml | 6 ++--- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++ .github/workflows/rust.yml | 7 +++--- .github/workflows/upload-programs.yml | 3 +-- 4 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/programs.yml b/.github/workflows/programs.yml index 99f66c4..96aa992 100644 --- a/.github/workflows/programs.yml +++ b/.github/workflows/programs.yml @@ -10,7 +10,7 @@ jobs: update-client: strategy: fail-fast: true - name: Build update-client + name: build-update-client runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 @@ -36,7 +36,7 @@ jobs: membership: strategy: fail-fast: true - name: Build membership + name: build-membership runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 @@ -62,7 +62,7 @@ jobs: uc-and-membership: strategy: fail-fast: true - name: Build uc-and-membership + name: build-uc-and-membership runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..865321d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: release + +on: + release: + types: [published] + +jobs: + release: + name: build-and-upload + runs-on: ubuntu-20.04 + steps: + - name: Checkout sources + 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 RISC-V ELF files + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./elf/* + tag: ${{ github.ref }} + overwrite: true + file_glob: true diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 53988c1..63e930a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,7 +8,7 @@ on: jobs: lints: - name: Clippy and Fmt + name: fmt-and-clippy runs-on: ubuntu-latest steps: - name: Checkout sources @@ -32,7 +32,7 @@ jobs: command: clippy tests: - name: Unit Tests + name: unit-tests runs-on: ubuntu-latest steps: - name: Checkout sources @@ -43,6 +43,7 @@ jobs: profile: minimal toolchain: stable override: true + - name: Run unit tests uses: actions-rs/cargo@v1 with: @@ -52,7 +53,7 @@ jobs: RUST_BACKTRACE: 1 build-all-features: - name: Build (without programs) + name: build-without-programs runs-on: ubuntu-latest continue-on-error: true steps: diff --git a/.github/workflows/upload-programs.yml b/.github/workflows/upload-programs.yml index 4cced99..18cb9bc 100644 --- a/.github/workflows/upload-programs.yml +++ b/.github/workflows/upload-programs.yml @@ -9,7 +9,7 @@ jobs: upload: strategy: fail-fast: true - name: Build and Upload Programs + name: build-and-upload runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 @@ -29,7 +29,6 @@ jobs: - name: Build SP1 Programs run: just build-programs - - name: Upload Programs uses: actions/upload-artifact@v4 with: