Skip to content

Commit

Permalink
Compile the runtime with stable Rust by adding RUSTC_BOOTSTRAP=1 flag (
Browse files Browse the repository at this point in the history
…#677)

* Fix CI workflows by adding RUSTC_BOOTSTRAP=1 flag
* use standard nightly for check_build
* Update and rename check_build.yml to run_linters.yml
* Changelog
* fixup

Signed-off-by: Adam Reif <Garandor@manta.network>
  • Loading branch information
Adam Reif authored Jul 12, 2022
1 parent df5883d commit eb05731
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 26 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/check_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ jobs:
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
rustup toolchain install nightly
rustup default stable
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update
rustup target add wasm32-unknown-unknown
- name: Run Unit Tests
env:
RUST_BACKTRACE: full
Expand All @@ -82,7 +81,7 @@ jobs:
SCCACHE_DIR: /home/runner/.cache/sccache
run: |
source ${HOME}/.cargo/env
cargo test --release --features=runtime-benchmarks,try-runtime -- --test-threads=2
RUSTC_BOOTSTRAP=1 cargo test --release --features=runtime-benchmarks,try-runtime -- --test-threads=2
- name: stop sccache server
run: sccache --stop-server || true
stop-unit-test-checks:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/generate_calamari_weights_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ jobs:
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
rustup toolchain install nightly
rustup default stable
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update
rustup target add wasm32-unknown-unknown
- name: build
env:
RUST_BACKTRACE: full
Expand All @@ -62,7 +61,7 @@ jobs:
CARGO_TERM_COLOR: always
run: |
source ${HOME}/.cargo/env
cargo build --profile production --verbose --features=runtime-benchmarks
RUSTC_BOOTSTRAP=1 cargo build --profile production --verbose --features=runtime-benchmarks
- name: stop sccache server
run: sccache --stop-server || true
- name: upload
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/generate_dolphin_weights_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ jobs:
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
rustup toolchain install nightly
rustup default stable
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update
rustup target add wasm32-unknown-unknown
- name: build
env:
RUST_BACKTRACE: full
Expand All @@ -62,7 +61,7 @@ jobs:
CARGO_TERM_COLOR: always
run: |
source ${HOME}/.cargo/env
cargo build --profile production --verbose --features=runtime-benchmarks
RUSTC_BOOTSTRAP=1 cargo build --profile production --verbose --features=runtime-benchmarks
- name: stop sccache server
run: sccache --stop-server || true
- name: upload
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/generate_manta_weights_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ jobs:
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
rustup toolchain install nightly
rustup default stable
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update
rustup target add wasm32-unknown-unknown
- name: build
env:
RUST_BACKTRACE: full
Expand All @@ -62,7 +61,7 @@ jobs:
CARGO_TERM_COLOR: always
run: |
source ${HOME}/.cargo/env
cargo build --profile production --verbose --features=runtime-benchmarks
RUSTC_BOOTSTRAP=1 cargo build --profile production --verbose --features=runtime-benchmarks
- name: stop sccache server
run: sccache --stop-server || true
- name: upload
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/metadata_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ jobs:
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
rustup toolchain install nightly
rustup default stable
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update
rustup target add wasm32-unknown-unknown
- name: Build Binary
env:
RUST_BACKTRACE: full
Expand All @@ -87,7 +86,7 @@ jobs:
SCCACHE_DIR: /home/runner/.cache/sccache
run: |
source ${HOME}/.cargo/env
cargo build --release
RUSTC_BOOTSTRAP=1 cargo build --release
chmod +x target/release/manta
- name: stop sccache server
run: sccache --stop-server || true
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/publish_draft_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ jobs:
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
rustup toolchain install nightly
rustup default stable
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update
rustup target add wasm32-unknown-unknown
- name: build
env:
RUST_BACKTRACE: full
Expand All @@ -132,7 +131,7 @@ jobs:
SCCACHE_DIR: /home/runner/.cache/sccache
run: |
source ${HOME}/.cargo/env
cargo build --profile production --verbose
RUSTC_BOOTSTRAP=1 cargo build --profile production --verbose
- name: stop sccache server
run: sccache --stop-server || true
- name: upload
Expand Down Expand Up @@ -188,7 +187,7 @@ jobs:
- if: ${{ needs.check-for-runtime-upgrade.outputs.do-versions-match == 'false' }}
name: fetch and chmod polkadot
run: |
curl -L -o $HOME/.local/bin/polkadot https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot
curl -L -o $HOME/.local/bin/polkadot https://github.com/paritytech/polkadot/releases/download/v0.9.22/polkadot
chmod +x $HOME/.local/bin/polkadot
ls -ahl $HOME/.local/bin/
- if: ${{ needs.check-for-runtime-upgrade.outputs.do-versions-match == 'false' }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Build
name: Run Linters
on:
pull_request:
branches: [manta]
Expand Down Expand Up @@ -66,13 +66,13 @@ jobs:
- name: start sccache server
run: sccache --start-server
- name: init
# NOTE: We use nightly Rust only to get nightly fmt & clippy
run: |
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup +nightly target add wasm32-unknown-unknown
rustup default nightly
rustup update
cargo install taplo-cli
- name: Run yamllint
uses: actionshub/yamllint@main
Expand All @@ -87,7 +87,7 @@ jobs:
cargo fmt --all -- --check
$HOME/.cargo/bin/taplo fmt --check
$HOME/.cargo/bin/taplo lint
- name: Check Build
- name: Cargo Check & Clippy
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/try-runtime-calamari-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ jobs:
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
rustup toolchain install nightly
rustup default stable
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update
rustup target add wasm32-unknown-unknown
- name: Build Binary
env:
RUST_BACKTRACE: full
Expand All @@ -87,7 +86,7 @@ jobs:
SCCACHE_DIR: /home/runner/.cache/sccache
run: |
source ${HOME}/.cargo/env
cargo build --release --features=try-runtime
RUSTC_BOOTSTRAP=1 cargo build --release --features=try-runtime
chmod a+x target/release/manta
- name: move bin
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- [\#657](https://github.com/Manta-Network/Manta/pull/657) retire manta-pc-launch with polkadot-launch.

### Bug fixes
- [\#677](https://github.com/Manta-Network/Manta/pull/677) Fix CI failure by building the runtime with stable Rust

## v3.2.0
### Breaking changes
Expand Down

0 comments on commit eb05731

Please sign in to comment.