Skip to content
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

Add justfile, fix CI #20

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 64 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,70 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:

check_formatting:
name: Check Formatting
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-formatting-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-formatting-v2-
cargo-${{ runner.os }}-

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-24
components: rustfmt
profile: minimal

- name: Check formatting
run: |
cargo +nightly-2023-10-24 fmt -- --check

- name: Check docs
run: cargo +nightly-2023-10-24 doc

core_tests_linux:
name: Core Tests on Linux
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --all-features --verbose
- name: Checkout
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-24
override: true
profile: minimal
components: clippy

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-core-tests-linux-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-core-tests-linux-v2-
cargo-${{ runner.os }}-

- name: Add targets
run: rustup target add x86_64-unknown-linux-gnu

- name: Run cargo clippy
run: cargo clippy --all-features --tests --package bitcoin-waila --target=x86_64-unknown-linux-gnu -- -D warnings

- name: Run cargo test
run: cargo test --package bitcoin-waila --target=x86_64-unknown-linux-gnu --all-features
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/target
/Cargo.lock
Loading
Loading