Skip to content

Commit

Permalink
ci: remove workspace and fix ci to test lib with MSRV 1.57.0
Browse files Browse the repository at this point in the history
  • Loading branch information
notmandatory authored and DanGould committed Aug 7, 2023
1 parent b6f12d8 commit 1a97145
Show file tree
Hide file tree
Showing 6 changed files with 1,354 additions and 290 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ jobs:

test-lib:
runs-on: ubuntu-latest
defaults:
run:
working-directory: payjoin
strategy:
fail-fast: false
matrix:
rust: [stable, nightly]
rust:
- 1.57.0 # MSRV
- stable
- nightly

steps:
- uses: actions/checkout@v2
Expand All @@ -18,14 +24,20 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Fixes for MSRV
if: matrix.rust == '1.57.0'
run: |
cargo update
cargo update -p log --precise 0.4.18
cargo update -p tempfile --precise 3.6.0
- name: test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all-features --lib --manifest-path payjoin/Cargo.toml
run: cargo test --verbose --all-features --lib

build-payjoin-cli:
runs-on: ubuntu-latest
defaults:
run:
working-directory: payjoin-cli
strategy:
fail-fast: false
matrix:
Expand All @@ -38,26 +50,26 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
override: true
- run: cd payjoin-cli
- name: build payjoin example
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path payjoin-cli/Cargo.toml
- name: build payjoin cli example
run: |
cargo build
fmt:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
rust: [nightly]
package: [payjoin, payjoin-cli]

steps:
- uses: actions/checkout@v2
- uses: Swatinem/[email protected]
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
toolchain: nightly
override: true
- run: rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- run: cargo fmt --all -- --check
- name: fmt check
run: |
cd ${{ matrix.package }}
cargo fmt --all -- --check
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/target
target
*config.toml
2 changes: 0 additions & 2 deletions Cargo.toml

This file was deleted.

11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ Seeking review of the code that verifies there is no overpayment. Contributions
- [ ] Fuzzing
- [ ] Coverage measurement

## Minimum Supported Rust Version (MSRV)

The `payjoin` library should always compile with any combination of features on Rust **1.57.0**.

To build and test with the MSRV you will need to pin the below dependency versions:

```shell
cargo update -p log --precise 0.4.18
cargo update -p tempfile --precise 3.6.0
```

## License

MIT
Loading

0 comments on commit 1a97145

Please sign in to comment.