-
Notifications
You must be signed in to change notification settings - Fork 3
chore: generate rust-sdk github action with build.rs #67
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
Closed
Closed
Changes from 15 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a1ac5de
chore: generate rust-sdk github action with build.rs
leoromanovsky 708f1b9
use pull_request instead of pull_request_target
leoromanovsky d78c7d4
git submodules; npm ci; build and docs
leoromanovsky bb7374c
not nightly clippy or fmt
leoromanovsky 218fff4
fix fmt
leoromanovsky f40a765
remove static - https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu…
leoromanovsky 301d5cd
remove redundant return
leoromanovsky c63c643
unnecessary borrow
leoromanovsky 0b825dc
remove return
leoromanovsky 5a4d86a
remove return
leoromanovsky c7629c5
apply clippy fixes to py
leoromanovsky 119f42e
apply clippy fixes to eppo
leoromanovsky 2e7d9fe
lifetimes
leoromanovsky 01ff768
indent
leoromanovsky cedeaf7
remove serde_yaml unused
leoromanovsky a11ecf6
ws
leoromanovsky b64845a
py fmt
leoromanovsky 6c6d3c8
no borrow
leoromanovsky 2896751
format with evaluators
leoromanovsky 71d6c4e
too many args
leoromanovsky 177caa6
is_empty
leoromanovsky d1f4f8d
no borrow
leoromanovsky c85d501
simplify map_err
leoromanovsky c5763cf
no borrow
leoromanovsky 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,48 @@ | ||
name: Test | ||
# ------------------------------------------------------------------- | ||
# ------------------------------- WARNING --------------------------- | ||
# ------------------------------------------------------------------- | ||
# | ||
# This file was automatically generated by gh-workflows using the | ||
# gh-workflow-gen bin. You should add and commit this file to your | ||
# git repository. **DO NOT EDIT THIS FILE BY HAND!** Any manual changes | ||
# will be lost if the file is regenerated. | ||
# | ||
# To make modifications, update your `build.rs` configuration to adjust | ||
# the workflow description as needed, then regenerate this file to apply | ||
# those changes. | ||
# | ||
# ------------------------------------------------------------------- | ||
# ----------------------------- END WARNING ------------------------- | ||
# ------------------------------------------------------------------- | ||
|
||
name: Build and Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
- main | ||
pull_request: {} | ||
jobs: | ||
cargo_build_and_test: | ||
name: Cargo Build & Test | ||
build: | ||
name: Build and Test Rust SDK | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- stable | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- run: npm ci | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- run: cargo build --verbose --all-targets | ||
- run: cargo test --verbose | ||
- run: cargo doc --verbose | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
- run: npm ci | ||
- name: Setup Rust Toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy, rustfmt | ||
- name: Cargo Build | ||
run: cargo build --all-features --all-targets --verbose | ||
- name: Cargo Test | ||
run: cargo test --all-features --verbose | ||
- name: Cargo Fmt | ||
run: cargo fmt --check | ||
- name: Cargo Clippy | ||
run: cargo clippy --all-features --workspace -- -D warnings | ||
- name: Cargo Doc | ||
run: cargo doc --verbose |
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
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
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,41 @@ | ||
use gh_workflow::*; | ||
use indexmap::IndexMap; | ||
use serde_json::json; | ||
use toolchain::Toolchain; | ||
|
||
fn main() { | ||
let mut submodules_map = IndexMap::new(); | ||
submodules_map.insert("submodules".to_string(), json!("true")); | ||
|
||
let build = Job::new("Build and Test Rust SDK") | ||
.add_step(Step::checkout().add_with(submodules_map)) | ||
.add_step(Step::run("npm ci")) | ||
.add_step(Toolchain::default().add_stable().add_clippy().add_fmt()) | ||
.add_step( | ||
Cargo::new("build") | ||
.args("--all-features --all-targets --verbose") | ||
.name("Cargo Build"), | ||
) | ||
.add_step( | ||
Cargo::new("test") | ||
.args("--all-features --verbose") | ||
.name("Cargo Test"), | ||
) | ||
.add_step(Cargo::new("fmt").args("--check").name("Cargo Fmt")) | ||
.add_step( | ||
Cargo::new("clippy") | ||
.args("--all-features --workspace -- -D warnings") | ||
.name("Cargo Clippy"), | ||
) | ||
.add_step(Cargo::new("doc").args("--verbose").name("Cargo Doc")); | ||
|
||
let event = Event::default() | ||
.push(Push::default().add_branch("main")) | ||
.pull_request(PullRequest::default()); | ||
|
||
Workflow::new("Build and Test") | ||
.on(event) | ||
.add_job("build", build) | ||
.generate() | ||
.unwrap(); | ||
} |
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.
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.
❌ A dependency in this package has a MSRV of
1.75
which blocks us from using it: JelteF/derive_more#389I will fiddle around with it to see if we can overcome the blocker.