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

feat: use self-hosted runner #37

Merged
merged 9 commits into from
May 24, 2024
23 changes: 12 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: CI

on:
pull_request:
types: [labeled]
types: [ labeled ]
push:
branches: [develop, main]
branches: [ develop, main ]

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
toml:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -31,7 +31,8 @@ jobs:
echo 'Please run taplo format'

format:
runs-on: ubuntu-latest
runs-on: self-hosted
needs: toml
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -51,7 +52,10 @@ jobs:
echo 'Please run cargo fmt --all'

clippy_build_and_test:
runs-on: ubuntu-latest
runs-on: self-hosted
needs:
- toml
cernicc marked this conversation as resolved.
Show resolved Hide resolved
- format
steps:
- uses: actions/checkout@v4
- name: Cargo caching
Expand All @@ -64,21 +68,16 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/Cargo.toml') }}
- name: Install protobuf compiler
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.77.0
target: wasm32-unknown-unknown
components: clippy rust-src
- name: List version
run: |
rustup show
cargo --version
cargo clippy --version
- name: Cargo clippy
run: cargo clippy --locked -q --no-deps -- -D warnings
- name: Build with try-runtime feature
run: RUSTFLAGS="-D warnings" cargo build --locked -q --features try-runtime
- name: Build node runtime
Expand All @@ -87,6 +86,8 @@ jobs:
run: RUSTFLAGS="-D warnings" cargo build --locked -q -p polka-storage-node --features runtime-benchmarks
- name: Build in release mode
run: RUSTFLAGS="-D warnings" cargo build --locked -q --release
- name: Cargo clippy
run: cargo clippy --locked -q --no-deps -- -D warnings
- name: Run tests
run: RUSTFLAGS="-D warnings" cargo test --locked -q --workspace
- name: Failure handling
Expand Down
Loading