add solana workspace #6
Workflow file for this run
This file contains 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
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: test ${{ matrix.rust }} ${{ matrix.flags }} ${{ matrix.extra-flags }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: ["stable", "beta", "nightly", "1.75"] # MSRV | |
flags: [ | |
"--features mainnet", | |
"--features testnet", | |
"--features localnet" | |
] | |
extra-flags: [ | |
"--features ruint", | |
"--features anchor", | |
"--features ruint,anchor" | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: test | |
run: cd universal && cargo test --workspace ${{ matrix.flags }} ${{ matrix.extra-flags }} | |
clippy: | |
name: clippy ${{ matrix.flags }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
flags: [ | |
"--features mainnet", | |
"--features testnet", | |
"--features localnet" | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@clippy | |
- run: cd universal && cargo clippy --workspace --all-targets ${{ matrix.flags }} | |
env: | |
RUSTFLAGS: -Dwarnings | |
docs: | |
name: docs | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rust-docs | |
- run: cd universal && cargo doc --workspace --no-deps --document-private-items | |
env: | |
RUSTDOCFLAGS: "--cfg docsrs -D warnings" | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- run: cd universal && cargo fmt --all --check |