Skip to content

Commit

Permalink
ci: check against testnet and preview
Browse files Browse the repository at this point in the history
We've seen substantial drift in compatibilility, now that we're running
testnests for longer than two weeks (currently at 5 weeks on 63 Rhea).
As we did with Galileo [0], let's update CI to run checks against both
targets.

[0] penumbra-zone/galileo#85
  • Loading branch information
conorsch committed Dec 5, 2023
1 parent 6da76c3 commit 8b24483
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 46 deletions.
55 changes: 47 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Rust CI
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
# Run periodically to check for breakage, since we seldom update the osiris repo.
# This allows us to determine approximately when a breaking change was merged into
# the penumbra repo, so we can fix it ahead of a testnet release.
Expand All @@ -14,20 +11,62 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
lookup-testnet:
name: Look up testnet
runs-on: ubuntu-latest
outputs:
testnet_tag: ${{ steps.testnet_tag.outputs.testnet_tag }}
steps:
- id: testnet_tag
run: >-
printf "testnet_tag=%s" "$(curl -sSfL https://api.github.com/repos/penumbra-zone/penumbra/releases/latest | jq -r .tag_name)"
>> "$GITHUB_OUTPUT"
# Let's make sure we can still build against the currently active stable testnet.
check-testnet:
name: Check Testnet
runs-on: buildjet-8vcpu-ubuntu-2004
needs: lookup-testnet
steps:
- name: Checkout osiris
uses: actions/checkout@v4

- name: Check out penumbra repo
uses: actions/checkout@v4
with:
repository: penumbra-zone/penumbra
path: penumbra-repo
lfs: true
ref: ${{needs.lookup-testnet.outputs.testnet_tag}}

- name: Move penumbra repo to relative path
run: mv penumbra-repo ../penumbra

- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Configure rust cache
uses: Swatinem/rust-cache@v2

- name: Run cargo check
run: cargo check --release

build-preview:
name: Build Preview
runs-on: buildjet-16vcpu-ubuntu-2004
steps:
- name: Checkout osiris
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check out penumbra repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: penumbra-zone/penumbra
path: penumbra-repo
lfs: true
ref: main

- name: Move penumbra repo to relative path
run: mv penumbra-repo ../penumbra
Expand All @@ -50,7 +89,7 @@ jobs:
runs-on: buildjet-8vcpu-ubuntu-2004
steps:
- name: Checkout osiris
uses: actions/checkout@v3
uses: actions/checkout@v4

# N.B. `cargo fmt` does not require relpath dependencies to be present,
# so we don't need to clone the penumbra repo here.
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/schedule.yml

This file was deleted.

0 comments on commit 8b24483

Please sign in to comment.