-
Notifications
You must be signed in to change notification settings - Fork 16
ci: fold the imported workflows into this repo's set #4256
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
864cf24
ci: fold the imported workflows into this repo's set
bgm-malbeclabs ab0c61e
release: point the scheduler prebuilt path at offchain/scheduler
bgm-malbeclabs af9b2cb
ci: name the package in the offchain fork-test cargo calls
bgm-malbeclabs 0aadf18
ci: give the new workflows the same paths filter on push
bgm-malbeclabs a2b7d84
ci: install the toolchain solana pins, not a toolchain named in the w…
bgm-malbeclabs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # The offchain scheduler is the only Elixir component. Its checks ran on a release | ||
| # tag alone before the merge; here they run on the pull request that changes it. | ||
| name: elixir | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, 'hotfix/**'] | ||
| paths: | ||
| - 'offchain/scheduler/**' | ||
| - '.github/workflows/elixir.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'offchain/scheduler/**' | ||
| - '.github/workflows/elixir.yml' | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: offchain/scheduler | ||
|
|
||
| jobs: | ||
| elixir-scheduler: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Elixir and Erlang | ||
| uses: erlef/setup-beam@v1 | ||
| with: | ||
| elixir-version: "1.19.3" | ||
| otp-version: "28.1" | ||
| # mix compile builds the Rust NIF, which is a root workspace member. | ||
| - uses: dtolnay/rust-toolchain@1.97.1 | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Cache deps | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: offchain/scheduler/deps | ||
| key: mix-deps-${{ hashFiles('offchain/scheduler/mix.lock') }} | ||
| restore-keys: | | ||
| mix-deps- | ||
| - run: mix deps.get | ||
| - run: mix format --check-formatted | ||
| - run: mix compile --warnings-as-errors | ||
| - run: mix credo --strict | ||
| - run: mix test --cover | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # Fork tests for the offchain Solana tooling: they start a mainnet-beta fork with | ||
| # doublezero-solana-fork and drive the CLIs against it. | ||
| # | ||
| # Every step runs from the repository root, not from offchain/, because the shell | ||
| # scripts resolve their binaries as target/debug/<name> and the merged workspace | ||
| # writes to the root target/ directory. The fork and the keypairs the scripts read | ||
| # also land in the working directory, so all of it has to agree. | ||
| name: offchain-local-validator | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, 'hotfix/**'] | ||
| paths: | ||
| - 'offchain/**' | ||
| - 'solana/**' | ||
| - 'Cargo.lock' | ||
| - 'Cargo.toml' | ||
| - '.github/workflows/offchain.local-validator.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'offchain/**' | ||
| - 'solana/**' | ||
| - 'Cargo.lock' | ||
| - 'Cargo.toml' | ||
| - '.github/workflows/offchain.local-validator.yml' | ||
|
bgm-malbeclabs marked this conversation as resolved.
|
||
|
|
||
| env: | ||
| SOLANA_CLI: v3.0.12 | ||
|
|
||
| # Every cargo invocation names its package. The root workspace sets | ||
| # `default-members = []`, so a bare `cargo build --bin X` selects nothing and | ||
| # fails with "the workspace has no members". These commands came from a | ||
| # repository whose workspace had no such restriction. | ||
|
|
||
| jobs: | ||
| test-doublezero-solana-fork: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Free disk space | ||
| run: | | ||
| df -h | ||
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | ||
| sudo docker image prune --all --force | ||
| sudo docker builder prune -a --force | ||
| df -h | ||
| - uses: dtolnay/rust-toolchain@1.97.1 | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Solana toolchain | ||
| run: | | ||
| sh -c "$(curl -sSfL https://release.anza.xyz/$SOLANA_CLI/install)" | ||
| echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | ||
| - name: Generate ~/.config/solana/id.json | ||
| run: solana-keygen new --silent --no-bip39-passphrase | ||
| - name: Generate manager keypair for synthetic ValidatorClientRewards | ||
| run: solana-keygen new --silent --no-bip39-passphrase -o manager_keypair.json | ||
| - name: Start Solana mainnet-beta fork in background | ||
| run: | | ||
| MANAGER_PUBKEY=$(solana address -k manager_keypair.json) | ||
| cargo run -p doublezero-solana-fork-cli --bin doublezero-solana-fork -- -um --reset --synthetic-validator-client-rewards-manager "$MANAGER_PUBKEY" > /dev/null 2>&1 & | ||
| - name: Build `doublezero-solana` | ||
| run: cargo build -p doublezero-solana-cli --bin doublezero-solana | ||
| - name: Run `doublezero-solana` tests | ||
| run: bash offchain/sh/test_doublezero_solana_fork.sh | ||
|
|
||
| test-doublezero-solana-validator-debt-fork-current: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Free disk space | ||
| run: | | ||
| df -h | ||
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | ||
| sudo docker image prune --all --force | ||
| sudo docker builder prune -a --force | ||
| df -h | ||
| - uses: dtolnay/rust-toolchain@1.97.1 | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Solana toolchain | ||
| run: | | ||
| sh -c "$(curl -sSfL https://release.anza.xyz/$SOLANA_CLI/install)" | ||
| echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | ||
| - name: Generate ~/.config/solana/id.json | ||
| run: solana-keygen new --silent --no-bip39-passphrase | ||
| - name: Start Solana mainnet-beta fork in background | ||
| run: cargo run -p doublezero-solana-fork-cli --bin doublezero-solana-fork -- -um --reset --god-mode > /dev/null 2>&1 & | ||
| - name: Build the admin and validator-debt CLIs | ||
| run: | | ||
| cargo build \ | ||
| -p doublezero-revenue-distribution-admin-cli --bin doublezero-revenue-distribution-admin \ | ||
| -p doublezero-solana-validator-debt --bin doublezero-solana-validator-debt \ | ||
| -p doublezero-solana-cli --bin doublezero-solana | ||
| - name: Run `doublezero-solana-validator-debt` tests | ||
| run: bash offchain/sh/test_validator_debt_fork.sh | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.