This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Github CI lint and and tests #46
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,15 @@ | ||
name: '[rust] Checkout and cache' | ||
description: '[rust] Checkout cache' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: ⚡ Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry/ | ||
~/.cargo/git/db/ | ||
~/.cargo/bin/ | ||
target/ | ||
key: v2-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} |
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,35 @@ | ||
name: Lint | ||
on: [push] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
rustfmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Cache | ||
uses: ./.github/actions/cache | ||
- name: Install latest nightly toolchain and rustfmt | ||
run: rustup update nightly && rustup default nightly && rustup component add rustfmt | ||
- run: cargo fmt --all -- --check | ||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Cache | ||
uses: ./.github/actions/cache | ||
- name: Install latest nightly toolchain and clippy | ||
run: rustup update nightly && rustup default nightly && rustup component add clippy | ||
- run: cargo clippy --all-targets --all-features -- -D warnings | ||
licensecheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Install licensecheck | ||
run: sudo apt-get install -y licensecheck | ||
- name: Check licenses | ||
run: '! find . -name "*.rs" -o -name "*.c" -o -name "*.sh" | xargs licensecheck -c ".*" | grep -v "Apache License 2.0"' |
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,16 @@ | ||
name: Test | ||
on: [push] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
name: cargo test --workspace | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Cache | ||
uses: ./.github/actions/cache | ||
- run: cargo build --workspace --verbose | ||
- run: cargo test --workspace --verbose | ||
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
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
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.
Can I convince you to also build the
examples/ffi
? We've had issues with them bitrotting in the past so it'd be great to have them running in CI :)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.
Yeah, we should definitely add that build to the CI. But it seems I need to basically build the end artifact to make cmake happy.
I have another proposal in progress, which builds the world using
bazel
its not handling the example yet.But once it does - it would just be this invocation in the CI for build checking everything:
Bazel or no bazel, we'll definitely need to check this in CI at some point. So I can take a note, to return to it, if we decide bazel sucks too much :)