From f9d6a93de9118c2b096a7c3dd8d7c75c7c4e3be6 Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Tue, 25 Jul 2023 11:44:18 +0200 Subject: [PATCH 1/8] Add missing license fields to Cargo manifests --- adapters/celestia/Cargo.toml | 1 + examples/const-rollup-config/Cargo.toml | 1 + examples/demo-rollup/Cargo.toml | 1 + examples/demo-simple-stf/Cargo.toml | 1 + examples/demo-stf/Cargo.toml | 1 + 5 files changed, 5 insertions(+) diff --git a/adapters/celestia/Cargo.toml b/adapters/celestia/Cargo.toml index 472f752d6..afdb440a4 100644 --- a/adapters/celestia/Cargo.toml +++ b/adapters/celestia/Cargo.toml @@ -2,6 +2,7 @@ name = "jupiter" version = { workspace = true } edition = { workspace = true } +license = { workspace = true } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/examples/const-rollup-config/Cargo.toml b/examples/const-rollup-config/Cargo.toml index e73155ff9..75e64e279 100644 --- a/examples/const-rollup-config/Cargo.toml +++ b/examples/const-rollup-config/Cargo.toml @@ -3,5 +3,6 @@ name = "const-rollup-config" version = { workspace = true } edition = { workspace = true } authors = { workspace = true } +license = { workspace = true } homepage = "sovereign.xyz" publish = false diff --git a/examples/demo-rollup/Cargo.toml b/examples/demo-rollup/Cargo.toml index a7b2332aa..53688968d 100644 --- a/examples/demo-rollup/Cargo.toml +++ b/examples/demo-rollup/Cargo.toml @@ -3,6 +3,7 @@ name = "sov-demo-rollup" version = { workspace = true } edition = { workspace = true } authors = { workspace = true } +license = { workspace = true } homepage = "sovereign.xyz" publish = false resolver = "2" diff --git a/examples/demo-simple-stf/Cargo.toml b/examples/demo-simple-stf/Cargo.toml index 5f26c4bd0..ed332ad55 100644 --- a/examples/demo-simple-stf/Cargo.toml +++ b/examples/demo-simple-stf/Cargo.toml @@ -4,6 +4,7 @@ version = { workspace = true } edition = { workspace = true } resolver = "2" authors = { workspace = true } +license = { workspace = true } homepage = "sovereign.xyz" publish = false diff --git a/examples/demo-stf/Cargo.toml b/examples/demo-stf/Cargo.toml index 7ddd29ec5..a7e0ccb0c 100644 --- a/examples/demo-stf/Cargo.toml +++ b/examples/demo-stf/Cargo.toml @@ -4,6 +4,7 @@ version = { workspace = true } edition = { workspace = true } resolver = "2" authors = { workspace = true } +license = { workspace = true } homepage = "sovereign.xyz" publish = false From 7f54c35eef79a0e9c2a7f70045aef00e03490733 Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Tue, 25 Jul 2023 11:50:22 +0200 Subject: [PATCH 2/8] Test with --experimental on CI --- .github/workflows/rust.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ffd79bd58..62b003064 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -89,6 +89,19 @@ jobs: - uses: mozilla-actions/sccache-action@v0.0.3 - name: Run cargo test run: cargo test + test-experimental: + runs-on: + group: 8-cores_32GB_Ubuntu Group + timeout-minutes: 60 + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + - uses: mozilla-actions/sccache-action@v0.0.3 + - name: Run cargo test --features experimental + run: cargo test --features experimental coverage: runs-on: group: 8-cores_32GB_Ubuntu Group From 9f46f3962104a47b36d6de7facb8f9a242d0c888 Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Tue, 25 Jul 2023 11:54:49 +0200 Subject: [PATCH 3/8] Run dependabot weekly --- .github/dependabot.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ab6513fb0..4d3a840b3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,7 +3,8 @@ updates: - package-ecosystem: cargo directory: "/" schedule: - interval: daily + interval: weekly + day: monday time: "15:00" timezone: "Europe/Warsaw" - open-pull-requests-limit: 10 \ No newline at end of file + open-pull-requests-limit: 10 From 54a58f72185dfa81950049a5b967c31115c309fd Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Tue, 25 Jul 2023 12:10:39 +0200 Subject: [PATCH 4/8] Use cargo-deny for license checking --- .github/workflows/rust.yml | 8 ++++++++ deny.toml | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 deny.toml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 62b003064..8a9776bce 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -166,6 +166,14 @@ jobs: echo "Curl failed, retrying in 5 seconds..." sleep 5 done + check-licenses: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain + - run: cargo install cargo-deny + - run: cargo deny check licenses cargo-doc-artifact: runs-on: ubuntu-latest timeout-minutes: 90 diff --git a/deny.toml b/deny.toml new file mode 100644 index 000000000..4040e3ab2 --- /dev/null +++ b/deny.toml @@ -0,0 +1,24 @@ +[licenses] +# Deny crates that do not have a license. +unlicensed = "deny" +allow = [ + "Apache-2.0", + "MIT", + "Unlicense", + "Unicode-DFS-2016", + "MPL-2.0", + "ISC", + "CC0-1.0", + "BSD-2-Clause", + "BSD-3-Clause", + "OpenSSL", +] + +[[licenses.clarify]] +name = "ring" +# ring is derived from BoringSSL and has a bit of a special licensing situation, +# but we can effectively treat is as OpenSSL-like licensing. +expression = "OpenSSL" +license-files = [ + { path = "LICENSE", hash = 0xbd0eed23 } +] From fbac41ca82c0918d10883af8084353467c3bc617 Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Tue, 25 Jul 2023 12:14:17 +0200 Subject: [PATCH 5/8] Cancel job when new commits are pushed --- .github/workflows/rust.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8a9776bce..71f08e1d3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,6 +13,12 @@ on: env: CARGO_TERM_COLOR: always +# Automatically cancels a job if a new commit if pushed to the same PR, branch, or tag. +# Source: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: check: runs-on: ubuntu-latest From d9f5a556c4937e07f3270870af6f212a79a1e698 Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Tue, 25 Jul 2023 12:20:41 +0200 Subject: [PATCH 6/8] Fix rust.yml --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 71f08e1d3..82626cd53 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -177,7 +177,7 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain + - uses: actions-rs/toolchain@v1 - run: cargo install cargo-deny - run: cargo deny check licenses cargo-doc-artifact: From 240cbb2e7c9ebdce895698b5018feb4c98d2e9db Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Tue, 25 Jul 2023 12:23:29 +0200 Subject: [PATCH 7/8] Fix rust.yml --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 82626cd53..b80a516f2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -177,7 +177,8 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + - name: Setup Rust toolchain + run: rustup show - run: cargo install cargo-deny - run: cargo deny check licenses cargo-doc-artifact: From 00ee9b31f68610ef3b14b2d74a0da1d81b059c5c Mon Sep 17 00:00:00 2001 From: Filippo Costa Date: Tue, 25 Jul 2023 12:43:10 +0200 Subject: [PATCH 8/8] Only build GH pages on nightly/stable --- .github/workflows/rust.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b80a516f2..9221e4d82 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -184,6 +184,11 @@ jobs: cargo-doc-artifact: runs-on: ubuntu-latest timeout-minutes: 90 + # We only deploy `cargo doc` to GH pages on `stable`, but let's at least + # build it on `nightly` as well to avoid nasty surprises when merging + # `nightly` into `stable`. Running it on every PR would be excessive, + # though. + if: (github.ref == 'refs/heads/stable') || (github.ref == 'refs/heads/nightly') steps: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 @@ -205,7 +210,6 @@ jobs: deploy-github-pages: needs: cargo-doc-artifact timeout-minutes: 5 - # No point in deploying if we're not on `stable`, as it will just fail. if: github.ref == 'refs/heads/stable' # Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: