Skip to content

Commit

Permalink
Add to CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
DOBEN committed Feb 9, 2024
1 parent bdee360 commit b14c20e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 114 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/rust-fmt-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

env:
RUST_FMT: nightly-2023-04-01-x86_64-unknown-linux-gnu
RUST_VERSION: 1.67
RUST_VERSION: 1.72
CARGO_CONCORDIUM_VERSION: "3.2.0"

jobs:
Expand All @@ -29,6 +29,7 @@ jobs:
- sponsoredTransactions/backend/Cargo.toml
- sponsoredTransactionsAuction/backend/Cargo.toml
- trackAndTrace/smart-contract/Cargo.toml
- trackAndTrace/test-scripts/Cargo.toml

steps:
- name: Checkout
Expand Down Expand Up @@ -59,6 +60,7 @@ jobs:
- sponsoredTransactions/backend/Cargo.toml
- sponsoredTransactionsAuction/backend/Cargo.toml
- trackAndTrace/smart-contract/Cargo.toml
- trackAndTrace/test-scripts/Cargo.toml

steps:
- name: Checkout
Expand All @@ -79,6 +81,29 @@ jobs:
command: clippy
args: --manifest-path ${{ matrix.crates }} -- -D warnings

build:
name: Build Rust project
# Don't run on draft pull requests
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
strategy:
matrix:
crates:
- trackAndTrace/smart-contract/Cargo.toml
- trackAndTrace/test-scripts/Cargo.toml

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive

- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path=${{ matrix.crates }}

test:
name: Running tests
runs-on: ubuntu-latest
Expand Down
54 changes: 0 additions & 54 deletions trackAndTrace/smart-contract/Cargo.lock

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

3 changes: 1 addition & 2 deletions trackAndTrace/smart-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ description = "A smart contract for tracking and tracing items on a supply chain

[features]
default = ["std", "wee_alloc"]
std = ["concordium-std/std", "concordium-cis2/std"]
std = ["concordium-std/std"]
wee_alloc = ["concordium-std/wee_alloc"]
derive-serde = ["concordium-contracts-common/derive-serde", "serde"]

[dependencies]
concordium-std = { version = "9.0", default-features = false }
concordium-cis2 = { version = "6.0", default-features = false }
serde = { version = "1", optional = true, features = ["derive"] }
concordium-contracts-common = "9.0.0"

Expand Down
3 changes: 2 additions & 1 deletion trackAndTrace/smart-contract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
//! ];
//! ```
#![cfg_attr(not(feature = "std"), no_std)]
use concordium_cis2::*;
use concordium_std::*;
// Re-export type.
pub use concordium_std::MetadataUrl;

/// Event tags.
pub const ITEM_CREATED_EVENT_TAG: u8 = 0;
Expand Down
54 changes: 0 additions & 54 deletions trackAndTrace/test-scripts/Cargo.lock

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

3 changes: 1 addition & 2 deletions trackAndTrace/test-scripts/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::contract_client::MetadataUrl;
use anyhow::Context;
use clap::Parser as _;
use concordium_rust_sdk::{
Expand All @@ -13,7 +12,7 @@ use concordium_rust_sdk::{
},
v2::{self as sdk, BlockIdentifier},
};
use track_and_trace::*;
use track_and_trace::{MetadataUrl, *};

pub enum TrackAndTraceContract {}

Expand Down

0 comments on commit b14c20e

Please sign in to comment.