Update to Polkadot v1.1.0 #1060
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- 'main' | |
name: continuous-integration-main | |
jobs: | |
ci: | |
strategy: | |
max-parallel: 2 | |
matrix: | |
rust: [ stable, nightly ] | |
runs-on: macos-13 | |
env: | |
RUST_BACKTRACE: full | |
# Make sure CI fails on all warnings, including Clippy lints | |
RUSTFLAGS: "-Dwarnings" | |
steps: | |
- name: Freeing up more disk space | |
run: | | |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android | |
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /usr/local/share/boost | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
df -h | |
- uses: actions/checkout@v2 | |
- name: Install sccache (macos-latest) | |
run: | | |
brew update | |
brew install sccache | |
- name: Install rustup | |
run: | | |
if ! command -v rustup &> /dev/null; then | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
source $HOME/.cargo/env | |
fi | |
- name: Setup stable Rust toolchain | |
if: matrix.rust == 'stable' | |
# Call `rustup show` as a hack so that the toolchain defined in rust-toolchain.toml is installed | |
run: rustup show | |
- name: Remove rust-toolchain.toml for nightly | |
if: matrix.rust == 'nightly' | |
# To make sure that the nightly version will be used all throughout | |
run: | | |
rm rust-toolchain.toml | |
# rm /home/runner/work/spacewalk/spacewalk/rust-toolchain.toml | |
- name: Setup nightly Rust toolchain | |
if: matrix.rust == 'nightly' | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly-2024-02-09 | |
components: rustfmt, clippy | |
target: wasm32-unknown-unknown | |
- name: Setup nightly Rust as default | |
if: matrix.rust == 'nightly' | |
run: rustup default nightly-2024-02-09 | |
- name: Use Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
key: "macos-latest-cargo-${{ hashFiles('**/Cargo.lock') }}" | |
shared-key: "shared" | |
- name: Start sccache server | |
run: sccache --start-server | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check Build | |
if: matrix.rust == 'stable' | |
run: | | |
bash ./scripts/cmd-all build check | |
- name: Test | |
if: matrix.rust == 'nightly' | |
uses: actions-rs/cargo@v1 | |
env: | |
SOURCE_STELLAR_SECRET_MAINNET: ${{ secrets.SOURCE_STELLAR_SECRET_MAINNET }} | |
SOURCE_STELLAR_SECRET_TESTNET: ${{ secrets.SOURCE_STELLAR_SECRET_TESTNET }} | |
DEST_STELLAR_SECRET_MAINNET: ${{ secrets.DEST_STELLAR_SECRET_MAINNET }} | |
DEST_STELLAR_SECRET_TESTNET: ${{ secrets.DEST_STELLAR_SECRET_TESTNET }} | |
with: | |
toolchain: nightly-2024-02-09 | |
command: test | |
args: --all --all-features | |
- name: Rustfmt | |
if: matrix.rust == 'nightly' | |
uses: actions-rs/cargo@v1 | |
with: | |
toolchain: nightly-2024-02-09 | |
command: fmt | |
args: --all -- --check | |
- name: Clippy -- Libraries and Binaries | |
if: matrix.rust == 'stable' | |
run: | | |
bash ./scripts/cmd-all clippy "clippy --lib --bins" "-- -W clippy::all -A clippy::style -A forgetting_copy_types -A forgetting_references" | |
- name: Clippy -- Tests and Examples | |
if: matrix.rust == 'nightly' | |
uses: actions-rs/cargo@v1 | |
with: | |
toolchain: nightly-2024-02-09 | |
command: clippy | |
args: --all-features --tests --benches --examples -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references |