Skip to content

Commit

Permalink
ci: improve workflows (#19)
Browse files Browse the repository at this point in the history
* ci: improve workflows

Signed-off-by: Gabrielle Guimarães de Oliveira <[email protected]>

* ci: fix checkout version

Signed-off-by: Gabrielle Guimarães de Oliveira <[email protected]>

* ci: install protoc

Signed-off-by: Gabrielle Guimarães de Oliveira <[email protected]>

---------

Signed-off-by: Gabrielle Guimarães de Oliveira <[email protected]>
  • Loading branch information
aripiprazole authored Feb 24, 2024
1 parent 046274c commit dc88763
Showing 1 changed file with 31 additions and 18 deletions.
49 changes: 31 additions & 18 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,47 @@ on:
jobs:
check:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: 3.20.1
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Set-Up
run: sudo apt install -y git clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2

- name: Install Rustup
- name: Install Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.cargo/env
rustup default stable
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
- name: Check Build
run: |
SKIP_WASM_BUILD=1 cargo check --release
rustup set profile minimal
rustup show
- name: Ensure Rust formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

- name: Check Clippy errors
uses: actions-rs/clippy-check@v1
env:
SKIP_WASM_BUILD: 1
with:
args: --color=always --timings -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests
run: |
cargo test
env:
SKIP_WASM_BUILD: 1
run: cargo test

- name: Check Build for Benchmarking
run: >
pushd node &&
run: |
pushd node
cargo check --features=runtime-benchmarks --release

0 comments on commit dc88763

Please sign in to comment.