Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile the runtime with stable Rust by adding RUSTC_BOOTSTRAP=1 flag #677

Merged
merged 6 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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