Skip to content

Commit e449930

Browse files
author
Matthew Orris
committed
chore: Replace Currency->fungible: update pallet_capacity with fungible
for time-release pallet Initial code changes Split from PR #1779
1 parent 9691055 commit e449930

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+8869
-6290
lines changed

.cargo-deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ allow-git = []
273273

274274
[sources.allow-org]
275275
# 1 or more github.com organizations to allow git sources for
276-
github = ["paritytech", "w3f"]
276+
github = ["paritytech", "w3f", "multiformats"]
277277
# 1 or more gitlab.com organizations to allow git sources for
278278
# gitlab = [""]
279279
# 1 or more bitbucket.org organizations to allow git sources for
Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,59 @@
11
name: Run Generation of Code Coverage
2-
description: Runs cargo llvm-cov
2+
description: Runs cargo grcov
3+
inputs:
4+
code-cov-token:
5+
description: "codecov token"
6+
required: true
37
runs:
48
using: "composite"
59
steps:
6-
- name: Install cargo-llvm-cov
7-
uses: taiki-e/install-action@cargo-llvm-cov
10+
- name: Install grcov
11+
shell: bash
12+
run: cargo +nightly-2023-07-13 install grcov
13+
- name: Build
14+
shell: bash # Limited to 10 threads max
15+
run: cargo +nightly-2023-07-13 build -j 10 --features frequency-lint-check
16+
env:
17+
CARGO_INCREMENTAL: '0'
18+
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
19+
RUSTDOCFLAGS: "-Cpanic=abort"
20+
- name: Test
21+
shell: bash # Limited to 10 threads max
22+
run: cargo +nightly-2023-07-13 test -j 10 --features frequency-lint-check
23+
env:
24+
CARGO_INCREMENTAL: '0'
25+
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
26+
RUSTDOCFLAGS: "-Cpanic=abort"
27+
# There are a lot of things ignored here to make it all work
28+
# See the grcov docs for more information
29+
# excl rpc traits, and error enums
30+
# Only one of excl start and stop are allowed.
831
- name: Generate code coverage
932
shell: bash
1033
run: |
11-
cargo llvm-cov -v --no-fail-fast --workspace --lcov --output-path lcov.info \
12-
--ignore-filename-regex "^.*\/(node\/|runtime\/|mock\.rs|weights(\.rs)?|benchmarking\.rs|runtime-api/src/lib\.rs).*$" \
13-
--exclude "frequency,frequency-cli,frequency-runtime,frequency-service" \
14-
--features frequency-lint-check
34+
grcov . -s . --binary-path ./target/debug/ -t lcov \
35+
--ignore-not-existing \
36+
--excl-start '(pub enum Error<T> \{|#\[rpc\()' \
37+
--excl-stop '\s*}$' \
38+
--ignore "target/*" \
39+
--ignore "node/*" \
40+
--ignore "runtime/*" \
41+
--ignore "**/*weights.rs" \
42+
--ignore "**/benchmark*.rs" \
43+
--ignore "**/*tests.rs" \
44+
--ignore "**/tests/*.rs" \
45+
--ignore "**/*mock.rs" \
46+
--ignore "**/*runtime-api/src/lib.rs" \
47+
--ignore "*github.com*" \
48+
--ignore "*libcore*" \
49+
--ignore "*rustc*" \
50+
--ignore "*liballoc*" \
51+
--ignore "*cargo*" \
52+
-o ./target/debug/lcov.info
1553
- name: Upload to codecov.io
16-
uses: codecov/codecov-action@v3
54+
uses: codecov/codecov-action@v4.0.0-beta.3
1755
with:
18-
files: lcov.info
56+
token: ${{inputs.code-cov-token}}
57+
files: ./target/debug/lcov.info
1958
fail_ci_if_error: false # optional (default = false)
2059
verbose: true # optional (default = false)

.github/workflows/merge-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ jobs:
6464

6565
calc-code-coverage:
6666
name: Merge - Calculate Code Coverage
67-
# This job currently fails on EKS runners and must be run on standalone until
68-
# https://www.pivotaltracker.com/story/show/185045668 is resolved.
69-
runs-on: [self-hosted, Linux, X64, build, v1]
67+
runs-on: [self-hosted, Linux, X64, build, v2]
7068
container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0
7169
steps:
7270
- name: Check Out Repo
7371
uses: actions/checkout@v4
7472
- name: Generate and Upload Code Coverage
7573
id: codecov
7674
uses: ./.github/workflows/common/codecov
75+
with:
76+
code-cov-token: ${{ secrets.CODECOV_TOKEN }}
7777

7878
publish-ci-base-image:
7979
needs: changes

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ jobs:
358358
with:
359359
ref: ${{env.RELEASE_BRANCH_NAME}}
360360
- name: Setup Pages
361-
uses: actions/configure-pages@v3
361+
uses: actions/configure-pages@v4
362362
- name: Build Docs
363363
run: |
364364
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-07-13
@@ -371,7 +371,7 @@ jobs:
371371
echo "::warning title=Invalid file permissions automatically fixed::$line"
372372
done
373373
- name: Upload Docs
374-
uses: actions/upload-pages-artifact@v1
374+
uses: actions/upload-pages-artifact@v3
375375
with:
376376
path: ./target/doc
377377

@@ -1005,7 +1005,7 @@ jobs:
10051005
- name: Deploy to GitHub Pages
10061006
if: env.TEST_RUN != 'true'
10071007
id: deployment
1008-
uses: actions/deploy-pages@v2
1008+
uses: actions/deploy-pages@v4
10091009

10101010
release-js-api-augment:
10111011
needs: wait-for-all-builds

.github/workflows/verify-pr-commit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,16 +263,16 @@ jobs:
263263
needs: changes
264264
if: needs.changes.outputs.rust == 'true'
265265
name: Calculate Code Coverage
266-
# This job currently fails on EKS runners and must be run on standalone until
267-
# https://www.pivotaltracker.com/story/show/185045668 is resolved.
268-
runs-on: [self-hosted, Linux, X64, build, v1]
266+
runs-on: [self-hosted, Linux, X64, build, v2]
269267
container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0
270268
steps:
271269
- name: Check Out Repo
272270
uses: actions/checkout@v4
273271
- name: Generate and Upload Code Coverage
274272
id: codecov
275273
uses: ./.github/workflows/common/codecov
274+
with:
275+
code-cov-token: ${{ secrets.CODECOV_TOKEN }}
276276

277277
# Workaround to handle skipped required check inside matrix
278278
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
// Set the features to use for cargo commands
1717
"rust-analyzer.cargo.features": [
1818
"frequency-no-relay"
19+
],
20+
"lldb.launch.preRunCommands": [
21+
"script lldb.debugger.HandleCommand('settings set target.source-map /rustc/{} \"{}/lib/rustlib/src/rust\"'.format(os.popen('rustc --version --verbose').read().split('commit-hash: ')[1].split('\\n')[0].strip(), os.popen('rustc --print sysroot').readline().strip()))"
1922
]
2023
}

0 commit comments

Comments
 (0)