Skip to content

build(rs): automate Rust releases #6

build(rs): automate Rust releases

build(rs): automate Rust releases #6

Workflow file for this run

name: '[rs] CI (Rust)'
on:
push:
branches: [master]
paths:
- '.cargo/**'
- '.github/workflows/ci.yml'
- 'examples/**'
- 'rs/**'
- 'templates/**'
- 'Cargo.lock'
- 'Cargo.toml'
- 'rust-toolchain.toml'
pull_request:
paths:
- '.cargo/**'
- '.github/workflows/ci.yml'
- 'examples/**'
- 'rs/**'
- 'templates/**'
- 'Cargo.lock'
- 'Cargo.toml'
- 'rust-toolchain.toml'
env:
BINARYEN_VERSION: version_111
CARGO_TERM_COLOR: always
jobs:
check:
name: Check Code
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: false
haskell: true
large-packages: false
docker-images: true
swap-storage: true
- name: Checkout Code
uses: actions/checkout@v4
- name: Install wasm-opt
run: |
sudo wget -c https://github.com/WebAssembly/binaryen/releases/download/$BINARYEN_VERSION/binaryen-$BINARYEN_VERSION-x86_64-linux.tar.gz -O - | sudo tar -xz -C .
sudo cp binaryen-$BINARYEN_VERSION/bin/wasm-opt /usr/bin/
- name: Check Code Formatting
run: __GEAR_WASM_BUILDER_NO_FEATURES_TRACKING=1 cargo fmt --all --check
- name: Check Code With Clippy
run: __GEAR_WASM_BUILDER_NO_FEATURES_TRACKING=1 cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Check IDL Parser For WASM With Clippy
run: __GEAR_WASM_BUILDER_NO_FEATURES_TRACKING=1 cargo clippy -p sails-idl-parser --all-targets --locked --target=wasm32-unknown-unknown -- -D warnings
test:
name: Run Workflow Tests
uses: ./.github/workflows/rs-run-ws-tests.yml
with:
gear_node_version: 1.6.0
test-cli:
name: Run CLI Tests
uses: ./.github/workflows/rs-run-cli-tests.yml