-
Notifications
You must be signed in to change notification settings - Fork 0
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
ci: add rust_ci.yaml github workflow #15
Merged
Merged
Changes from 3 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4222cfa
ci: add rust_ci.yaml github workflow
samlaf e43b501
ci: remove benchmark from rust_ci since we don't have any
samlaf c93d973
test: add dummy test in eigenda_data just to make `just test` not com…
samlaf 9daf2e4
style: fix lint issues
samlaf d9f873e
style: beautify justfile layout to make it easier to read
samlaf 415487b
ci: add unused deps job to rust_ci workflow
samlaf aae4f73
ci: remove build job from rust_ci workflow
samlaf 4f46e7f
chore: fix justfile (lint was being redefined twice)
samlaf d43fd2f
ci: fix unused-deps job, need to install machete, not unused-deps
samlaf 4bb5dd2
ci: properly install cargo-machete in rust_ci
samlaf 19b18a6
ci: wrong name for cargo-udeps
samlaf d65f8dc
ci: increase unused-deps job timeout to 5 mins
samlaf c4ef7c9
style: stringify EigenDACommitment hint as "eigenda-commitment" inste…
samlaf 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 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,132 @@ | ||
name: Rust CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
merge_group: | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
cargo-tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
name: test | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: taiki-e/install-action@just | ||
- name: Install Rust stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- uses: taiki-e/install-action@nextest | ||
- name: cargo test | ||
run: just test | ||
cargo-lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
# TODO: add back cannon and asterisc once we are using them | ||
# See https://github.com/Layr-Labs/kona/blob/main/.github/workflows/rust_ci.yaml | ||
target: ["native"] | ||
name: lint-${{ matrix.target }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: taiki-e/install-action@just | ||
- name: Install Rust nightly toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt, clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
prefix-key: ${{ matrix.target }} | ||
- name: Log into ghcr | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: fmt + lint | ||
run: just lint-${{ matrix.target }} | ||
- name: chown target | ||
run: | | ||
sudo chown -R $(id -u):$(id -g) ./target | ||
cargo-build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
# TODO: add back cannon and asterisc once we are using them | ||
# See https://github.com/Layr-Labs/kona/blob/main/.github/workflows/rust_ci.yaml | ||
target: ["native"] | ||
name: build-${{ matrix.target }} | ||
continue-on-error: true | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: taiki-e/install-action@just | ||
- name: Install Rust stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
prefix-key: ${{ matrix.target }} | ||
- name: Log into ghcr | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: build | ||
run: just build-${{ matrix.target }} | ||
- name: chown target | ||
run: | | ||
sudo chown -R $(id -u):$(id -g) ./target | ||
cargo-doc: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: taiki-e/install-action@just | ||
- name: Install Rust stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- name: doclint | ||
run: just lint-docs | ||
- name: doctest | ||
run: just test-docs | ||
cargo-hack: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: taiki-e/install-action@just | ||
- name: Install Rust stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: taiki-e/install-action@cargo-hack | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- name: cargo hack | ||
run: just hack |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually want to build? it takes super long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aae4f73