Skip to content

Commit

Permalink
Fix licenses and CI (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars authored Jun 7, 2024
1 parent 3d75837 commit 6b466c0
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .cargo/config → .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ xclippy = [
"-Wclippy::all",
"-Wclippy::disallowed_methods",
]
xlint = "run --package x --bin x -- lint"
xtest = "run --package x --bin x -- external-crates-tests"

# Configuration specifically for running clippy on `external-crates/move/`.
Expand All @@ -26,6 +25,8 @@ move-clippy = [
"-Aclippy::manual_slice_size_calculation",
]

ci-license = "license-template --template .license_template"

[build]
rustflags = ["-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"]

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- uses: bmwill/rust-cache@v1 # Fork of 'Swatinem/rust-cache' which allows caching additional paths
- name: Install cargo-hakari, and cache the binary
uses: baptiste0928/cargo-install@1cd874a5478fdca35d868ccc74640c5aabbb8f1b # [email protected]
with:
crate: cargo-hakari
locked: true
- run: cargo xlint

- name: Install cargo-license-template
run: cargo install --force cargo-license-template

- name: Run cargo-license-template
run: cargo ci-license

release-notes-description-check:
name: release-notes-check
Expand Down
2 changes: 2 additions & 0 deletions .license_template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{(\/\/ Copyright.*\n)*?}// {(Modifications )?}Copyright (c) {20\d{2}(-20\d{2})?} IOTA Stiftung
{(\/\/ Copyright.*\n)*}// SPDX-License-Identifier: Apache-2.0
3 changes: 3 additions & 0 deletions crates/iota-genesis-builder/src/stardust/types/nft.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use anyhow::anyhow;
use iota_protocol_config::ProtocolConfig;
use iota_sdk::types::block::output::{
Expand Down
3 changes: 3 additions & 0 deletions crates/iota-genesis-builder/src/stardust/types/output.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

//! Rust types and logic for the Move counterparts in the `stardust` system
//! package.
Expand Down
5 changes: 3 additions & 2 deletions crates/iota-graphql-rpc/src/types/transaction_block.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::collections::{BTreeMap, BTreeSet};

// Copyright (c) Mysten Labs, Inc.
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use std::collections::{BTreeMap, BTreeSet};

use async_graphql::{
connection::{Connection, CursorType, Edge},
*,
Expand Down
2 changes: 0 additions & 2 deletions crates/transaction-fuzzer/src/account_universe.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// Copyright (c) The Diem Core Contributors
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 0 additions & 2 deletions crates/transaction-fuzzer/src/account_universe/account.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// Copyright (c) The Diem Core Contributors
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 0 additions & 2 deletions crates/transaction-fuzzer/src/account_universe/helpers.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// Copyright (c) The Diem Core Contributors
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// Copyright (c) The Diem Core Contributors
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 0 additions & 2 deletions crates/transaction-fuzzer/src/account_universe/universe.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// Copyright (c) The Diem Core Contributors
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 0 additions & 2 deletions crates/transaction-fuzzer/src/executor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// Copyright (c) The Diem Core Contributors
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 0 additions & 2 deletions crates/transaction-fuzzer/tests/p2p_fuzz.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// Copyright (c) The Diem Core Contributors
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Expand Down
1 change: 1 addition & 0 deletions crates/x/src/lint.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) Mysten Labs, Inc.
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use anyhow::anyhow;
Expand Down
5 changes: 3 additions & 2 deletions narwhal/primary/src/tests/common.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::num::NonZeroUsize;

// Copyright (c) Mysten Labs, Inc.
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use std::num::NonZeroUsize;

use config::{AuthorityIdentifier, WorkerId};
use storage::{CertificateStore, CertificateStoreCache, PayloadStore, PayloadToken};
use store::{
Expand Down
1 change: 1 addition & 0 deletions narwhal/primary/src/tests/proposer_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) Mysten Labs, Inc.
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use indexmap::IndexMap;
use prometheus::Registry;
use test_utils::{fixture_payload, latest_protocol_version, CommitteeFixture};
Expand Down

0 comments on commit 6b466c0

Please sign in to comment.