Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

CI: use rust-toolchain.toml #176

Merged
merged 4 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
# uses: actions-rs/toolchain@v1
uses: zephraph/toolchain@support-toolchain-toml
with:
profile: minimal
override: true
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- id: rust # MSRV
name: Read required Rust version
run: |
echo "WASM_BUILD_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
echo ::set-output name=version::$(cat rust-toolchain)

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
# uses: actions-rs/toolchain@v1
uses: zephraph/toolchain@support-toolchain-toml
with:
toolchain: ${{ steps.rust.outputs.version }}
profile: minimal
target: wasm32-unknown-unknown
override: false
override: true

- name: Restore Rust cache
uses: Swatinem/rust-cache@v1
Expand All @@ -173,7 +167,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: cargo +${{ steps.rust.outputs.version }} build --release
run: cargo build --release

- name: Upload Node
uses: actions/upload-release-asset@v1
Expand Down
53 changes: 14 additions & 39 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- id: rust # MSRV
name: use required Rust version
run: |
echo "WASM_BUILD_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
echo ::set-output name=version::$(cat rust-toolchain)

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
# uses: actions-rs/toolchain@v1
uses: zephraph/toolchain@support-toolchain-toml
with:
toolchain: ${{ steps.rust.outputs.version }}
profile: minimal
components: rustfmt
override: false
override: true

- name: Check formatting
run: cargo fmt -- --check
Expand All @@ -66,7 +60,7 @@ jobs:
run: make assets

- name: Tests
run: cargo +${{ steps.rust.outputs.version }} test --all --no-fail-fast -- --nocapture --test-threads=1
run: cargo test --all --no-fail-fast -- --nocapture --test-threads=1
env: { SKIP_WASM_BUILD: 1 }

clippy:
Expand All @@ -89,16 +83,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- id: rust # MSRV
name: use required Rust version
run: |
echo "WASM_BUILD_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
echo ::set-output name=version::$(cat rust-toolchain)

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
# uses: actions-rs/toolchain@v1
uses: zephraph/toolchain@support-toolchain-toml
with:
toolchain: ${{ steps.rust.outputs.version }}
profile: minimal
components: clippy
target: wasm32-unknown-unknown
Expand All @@ -115,7 +103,6 @@ jobs:
uses: actions-rs/clippy-check@v1
with:
name: Clippy report
toolchain: ${{ steps.rust.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
args: -p=sp-mvm -p=sp-mvm-rpc -p=sp-mvm-rpc-runtime

Expand All @@ -141,19 +128,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- id: rust # MSRV
name: use required Rust version
run: |
echo "WASM_BUILD_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
echo ::set-output name=version::$(cat rust-toolchain)

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
# uses: actions-rs/toolchain@v1
uses: zephraph/toolchain@support-toolchain-toml
with:
toolchain: ${{ steps.rust.outputs.version }}
profile: minimal
target: wasm32-unknown-unknown
override: false
override: true

- name: get dove
uses: pontem-network/get-dove@main
Expand All @@ -163,7 +144,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: cargo +${{ steps.rust.outputs.version }} build --all
run: cargo build --all

- name: make artifact
if: "contains(github.event.head_commit.message, 'save artifact') || contains(github.event.head_commit.message, '+artifact')"
Expand Down Expand Up @@ -198,19 +179,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- id: rust # MSRV
name: use required Rust version
run: |
echo "WASM_BUILD_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV
echo ::set-output name=version::$(cat rust-toolchain)

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
# uses: actions-rs/toolchain@v1
uses: zephraph/toolchain@support-toolchain-toml
with:
toolchain: ${{ steps.rust.outputs.version }}
profile: minimal
target: wasm32-unknown-unknown
override: false
override: true

- name: get dove
uses: pontem-network/get-dove@main
Expand All @@ -220,7 +195,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: cargo +${{ steps.rust.outputs.version }} build --features "runtime-benchmarks" --release
run: cargo build --features "runtime-benchmarks" --release

- name: Run benchmarks
run: |
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2021-11-07"
progile = "complete"
profile = "complete"
targets = [ "wasm32-unknown-unknown"]