Skip to content

Commit be0de14

Browse files
Merge pull request #1166 from mintlayer/done-deal
Accumulated changes from Gitlab
2 parents 443ecea + 415d70c commit be0de14

File tree

286 files changed

+20159
-5191
lines changed

Some content is hidden

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

286 files changed

+20159
-5191
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: build
33
on:
44
push:
55
branches:
6-
- '**' # target all branches
6+
- "**" # target all branches
77
pull_request:
88
branches:
99
- master
@@ -14,7 +14,6 @@ env:
1414
RUST_BACKTRACE: full
1515

1616
jobs:
17-
1817
rustfmt:
1918
runs-on: ubuntu-latest
2019
steps:
@@ -23,6 +22,8 @@ jobs:
2322
with:
2423
concurrent_skipping: "same_content_newer"
2524
skip_after_successful_duplicate: "true"
25+
- name: Install dependencies
26+
run: sudo apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
2627
- uses: actions/checkout@v2
2728
- name: Install rust stable
2829
uses: actions-rs/toolchain@v1
@@ -82,6 +83,8 @@ jobs:
8283
with:
8384
concurrent_skipping: "same_content_newer"
8485
skip_after_successful_duplicate: "true"
86+
- name: Install dependencies
87+
run: sudo apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
8588
- uses: actions/checkout@v2
8689
- name: Install rust stable
8790
uses: actions-rs/toolchain@v1
@@ -142,4 +145,3 @@ jobs:
142145
with:
143146
name: macos-functional-test-artifacts
144147
path: target/tmp
145-

.github/workflows/code_checks.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
with:
1818
concurrent_skipping: "same_content_newer"
1919
skip_after_successful_duplicate: "true"
20+
- name: Install dependencies
21+
run: sudo apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
2022
- uses: actions/checkout@v1
2123
- run: rustup component add clippy
2224

@@ -27,6 +29,7 @@ jobs:
2729
args: >
2830
--all-features --workspace --all-targets --
2931
-D warnings
32+
-A clippy::unnecessary_literal_unwrap
3033
-A clippy::new_without_default
3134
-A unknown_lints
3235
-W clippy::implicit_saturating_sub
@@ -62,8 +65,8 @@ jobs:
6265
concurrent_skipping: "same_content_newer"
6366
skip_after_successful_duplicate: "true"
6467
- uses: actions/checkout@v1
65-
- run: pip install -r ./.github/scripts/requirements.txt
66-
- run: ./.github/scripts/codecheck.py
68+
- run: pip install -r ./build-tools/codecheck/requirements.txt
69+
- run: ./build-tools/codecheck/codecheck.py
6770

6871
cargo_deny_checks:
6972
name: Cargo deny check licenses and advisories

.github/workflows/coverage.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
branches:
4-
- '**' # target all branches
4+
- "**" # target all branches
55
pull_request:
66
branches:
77
- master
@@ -17,11 +17,13 @@ jobs:
1717
with:
1818
concurrent_skipping: "same_content_newer"
1919
skip_after_successful_duplicate: "true"
20+
- name: Install dependencies
21+
run: sudo apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
2022
- uses: actions/checkout@v1
2123
- uses: actions-rs/toolchain@v1
2224
with:
2325
# TODO: Inspect coverage, and change toolchain to stable
24-
toolchain: nightly-2023-04-10
26+
toolchain: nightly-2023-08-01
2527
override: true
2628
- uses: actions-rs/cargo@v1
2729
with:
@@ -34,12 +36,11 @@ jobs:
3436
RUST_LOG: debug
3537
RUST_BACKTRACE: full
3638
CARGO_INCREMENTAL: 0
37-
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
38-
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
39+
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
40+
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
3941
- id: coverage
4042
uses: actions-rs/[email protected]
4143
- uses: actions/upload-artifact@v2
4244
with:
4345
name: code-coverage-report
4446
path: ${{ steps.coverage.outputs.report }}
45-

.gitlab-ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
image: "rust:latest"
2+
3+
stages:
4+
- build_clean
5+
- test_fmt
6+
- code_checks
7+
- test_clippy
8+
- test_cargo
9+
- build_cargo
10+
- test_cargo_deny
11+
- test_functional
12+
- test_sighash
13+
14+
variables:
15+
RUST_LOG: debug
16+
RUST_BACKTRACE: full
17+
18+
# Create a random path to avoid collisions
19+
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PIPELINE_ID/mintlayer-core
20+
21+
workflow:
22+
rules:
23+
- if: $CI_PIPELINE_SOURCE == "web"
24+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
25+
26+
before_script:
27+
- apt-get update -yqq
28+
- apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
29+
30+
build:clean:
31+
stage: build_clean
32+
script:
33+
- rm -rf target
34+
35+
test:fmt:
36+
stage: test_fmt
37+
script:
38+
- rustup component add rustfmt
39+
- cargo fmt --all -- --check
40+
41+
test:code_checks:
42+
stage: code_checks
43+
script:
44+
- ./build-tools/codecheck/codecheck.py
45+
46+
test:clippy:
47+
stage: test_clippy
48+
script:
49+
- rustup component add clippy
50+
- cargo clippy --all-features --workspace --all-targets -- -D warnings -A clippy::unnecessary_literal_unwrap -A clippy::new_without_default -W clippy::implicit_saturating_sub -W clippy::implicit_clone -W clippy::map_unwrap_or -W clippy::unnested_or_patterns -W clippy::manual_assert -W clippy::unused_async -W clippy::mut_mut -W clippy::todo
51+
- cargo clippy --all-features --workspace --lib --bins --examples -- -A clippy::all -D clippy::float_arithmetic -W clippy::unwrap_used -W clippy::dbg_macro -W clippy::items_after_statements -W clippy::fallible_impl_from -W clippy::string_slice
52+
53+
test:cargo:
54+
stage: test_cargo
55+
script:
56+
- rustc --version && cargo --version
57+
- cargo test --release --all --workspace --verbose
58+
59+
build:cargo:
60+
stage: build_cargo
61+
script:
62+
- cargo build --release --all --locked
63+
64+
test:cargo_deny:
65+
stage: test_cargo_deny
66+
script:
67+
- cargo install cargo-deny
68+
- cargo deny check advisories licenses
69+
70+
test:func:
71+
stage: test_functional
72+
script:
73+
- cargo test --release -p mintlayer-test --test functional -- --ignored
74+
75+
test:sighash:
76+
stage: test_sighash
77+
script:
78+
- cargo test --release -p common mixed_sighash_types -- --ignored

.gitlab/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @muursh @TheQuantumPhysicist @erubboli

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
If you want to contribute but have no idea what to start working on, feel free to check the [issues](https://github.com/mintlayer/mintlayer-core/issues) or grep for "TODO" in the code. If you have a proposal for a major change or feature that we haven't outlined before, the best idea would be to open an issue or pull request to discuss the idea before you delve too deeply into it, as there may be a good reason we haven't gone that route before.
66

7-
If you find a security issue, please follow the guide [here](https://github.com/mintlayer/mintlayer-core/security/policy) to report it.
7+
If you find a security issue, please follow the guide [here](https://github.com/mintlayer/mintlayer-core/security/policy) to report it.
88

99
## External contributors
1010

1111
First and foremost, you should make sure you have [rust installed](https://www.rust-lang.org/tools/install). As a rule, we use the latest stable version of rust that is available; if this changes, we'll be sure to update this note.
1212

13-
As an outside contributor, your first step will be to fork the repo and create your own copy. You can't push to our repo directly, so without doing this, it won't be possible to contribute any code. Your contributions should be put in a logically named branch in your fork. If you're not sure what I mean by that, take a look at the extant branches in our repo, and you'll see some examples. If you have several significant changes to make that don't logically fit together, then multiple branches and pull requests are the way to go.
13+
As an outside contributor, your first step will be to fork the repo and create your own copy. You can't push to our repo directly, so without doing this, it won't be possible to contribute any code. Your contributions should be put in a logically named branch in your fork. If you're not sure what I mean by that, take a look at the extant branches in our repo, and you'll see some examples. If you have several significant changes to make that don't logically fit together, then multiple branches and pull requests are the way to go.
1414

15-
As you make your changes, ensure the code is as clean as possible and well documented so that it's clear to us what you're up to when we review it and it is thoroughly tested. Make sure that the old tests still pass, as well as any tests you've added. We will only merge code with all the tests passing in CI.
15+
As you make your changes, ensure the code is as clean as possible and well documented so that it's clear to us what you're up to when we review it and it is thoroughly tested. Make sure that the old tests still pass, as well as any tests you've added. We will only merge code with all the tests passing in CI.
1616

1717
## Internal contributors
1818

0 commit comments

Comments
 (0)