Skip to content

Commit

Permalink
Merge pull request #55 from stellar/waltonian-interdentil
Browse files Browse the repository at this point in the history
Followup clean up of builds and makefile
  • Loading branch information
leighmcculloch authored Nov 1, 2022
2 parents 7c208b1 + 8820fdb commit a6cce45
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 24 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,19 @@ jobs:
sys:
- os: ubuntu-latest
target: wasm32-unknown-unknown
profile: release
test: false
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
profile: test
test: true
runs-on: ${{ matrix.sys.os }}
steps:
- uses: actions/checkout@v3
- uses: stellar/actions/rust-cache@main
- run: rustup update
- run: rustup target add ${{ matrix.sys.target }}
- uses: stellar/binaries@v12
with:
name: cargo-hack
version: 0.5.16
- run: cargo clippy --profile ${{ matrix.sys.profile }} --target ${{ matrix.sys.target }} --lib
- run: cargo clippy --target ${{ matrix.sys.target }} --lib
- if: matrix.sys.target != 'wasm32-unknown-unknown'
run: cargo clippy --target ${{ matrix.sys.target }} --bins --tests --examples --benches
- run: cargo build --target ${{ matrix.sys.target }}
- if: matrix.sys.test
run: cargo hack --feature-powerset clippy --profile ${{ matrix.sys.profile }} --target ${{ matrix.sys.target }} --bins --tests --examples --benches
- run: cargo build --profile ${{ matrix.sys.profile }} --target ${{ matrix.sys.target }}
- if: matrix.sys.test
run: cargo hack --feature-powerset test --profile ${{ matrix.sys.profile }} --target ${{ matrix.sys.target }}
run: cargo test --target ${{ matrix.sys.target }}
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
all: check build test

export RUSTFLAGS=-Dwarnings
export RUSTFLAGS=-Dwarnings -Dclippy::all -Dclippy::pedantic

test: fmt
cargo test
Expand All @@ -22,8 +22,8 @@ build: fmt
done

check: fmt
cargo hack --feature-powerset check --all-targets
cargo check --release --target wasm32-unknown-unknown
cargo clippy --all-targets
cargo clippy --release --target wasm32-unknown-unknown

watch:
cargo watch --clear --watch-when-idle --shell '$(MAKE)'
Expand Down
6 changes: 0 additions & 6 deletions contracts/crowdfund/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ publish = false
[lib]
crate-type = ["cdylib"]

[features]
default = ["export"]
export = []
testutils = ["soroban-sdk/testutils", "soroban-auth/testutils", "dep:stellar-xdr"]

[dependencies]
soroban-sdk = { version = "0.1.0" }
soroban-auth = { version = "0.1.0" }
Expand All @@ -20,5 +15,4 @@ stellar-xdr = { version = "0.0.6", features = ["next", "std"], optional = true }
[dev_dependencies]
soroban-sdk = { version = "0.1.0", features = ["testutils"] }
soroban-auth = { version = "0.1.0", features = ["testutils"] }
soroban-crowdfund-contract = { path = ".", default-features = false, features = ["testutils"] }
rand = { version = "0.7.3" }
2 changes: 1 addition & 1 deletion contracts/crowdfund/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod token {
}

mod test;
pub mod testutils;
mod testutils;

#[derive(Clone)]
#[contracttype]
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdfund/src/test.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg(test)]

use super::testutils::{register_test_contract as register_crowdfund, Crowdfund};
use super::token::{Client as Token, TokenMetadata};
use crate::testutils::{register_test_contract as register_crowdfund, Crowdfund};
use rand::{thread_rng, RngCore};
use soroban_auth::{Identifier, Signature};
use soroban_sdk::{
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdfund/src/testutils.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(any(test, feature = "testutils"))]
#![cfg(test)]

use crate::CrowdfundClient;

Expand Down

0 comments on commit a6cce45

Please sign in to comment.