forked from everx-labs/ever-executor
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove common submodule + refactoring + fmt rules + ci
- Loading branch information
Showing
7 changed files
with
88 additions
and
18 deletions.
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,23 @@ | ||
on: [push, pull_request] | ||
|
||
name: Lint and Test | ||
|
||
jobs: | ||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: clippy, rustfmt | ||
- run: cargo fmt --all -- --check | ||
- run: cargo clippy -- -D warnings | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: cargo test --all-features |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use std::process::Command; | ||
|
||
fn get_value(cmd: &str, args: &[&str]) -> String { | ||
if let Ok(result) = Command::new(cmd).args(args).output() { | ||
if let Ok(result) = String::from_utf8(result.stdout) { | ||
return result; | ||
} | ||
} | ||
"Unknown".to_string() | ||
} | ||
|
||
fn main() { | ||
let git_branch = get_value("git", &["rev-parse", "--abbrev-ref", "HEAD"]); | ||
let git_commit = get_value("git", &["rev-parse", "HEAD"]); | ||
let commit_date = get_value("git", &["log", "-1", "--date=iso", "--pretty=format:%cd"]); | ||
let build_time = get_value("date", &["+%Y-%m-%d %T %z"]); | ||
let rust_version = get_value("rustc", &["--version"]); | ||
|
||
println!("cargo:rustc-env=BUILD_GIT_BRANCH={}", git_branch); | ||
println!("cargo:rustc-env=BUILD_GIT_COMMIT={}", git_commit); | ||
println!("cargo:rustc-env=BUILD_GIT_DATE={}", commit_date); | ||
println!("cargo:rustc-env=BUILD_TIME={}", build_time); | ||
println!("cargo:rustc-env=BUILD_RUST_VERSION={}", rust_version); | ||
} |
Submodule common
deleted from
91a06e
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,26 @@ | ||
# I can't rely on contributors using .editorconfig | ||
newline_style = "Unix" | ||
# require the shorthand instead of it being optional | ||
use_field_init_shorthand = true | ||
# outdated default — `?` was unstable at the time | ||
# additionally the `try!` macro is deprecated now | ||
use_try_shorthand = true | ||
# Max to use the 100 char width for everything or Default. See https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#use_small_heuristics | ||
use_small_heuristics = "Max" | ||
|
||
|
||
version = "Two" | ||
unstable_features = true | ||
|
||
# better grepping | ||
imports_granularity = "Item" | ||
group_imports = "StdExternalCrate" | ||
|
||
normalize_comments = true | ||
reorder_impl_items = true | ||
reorder_modules = true | ||
wrap_comments = true | ||
|
||
format_code_in_doc_comments = true | ||
format_macro_bodies = true | ||
format_macro_matchers = true |
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