Skip to content

Commit

Permalink
Merge pull request #11 from zachary0809/main-develop
Browse files Browse the repository at this point in the history
Create rust.yml
  • Loading branch information
wd30130 authored Aug 6, 2024
2 parents dc6d76f + f9ec848 commit 9d2e7b7
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Rust

on:
push:
branches:
- 'main'
- 'main-develop'
pull_request:
branches:
- 'main'
- 'main-develop'

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Free up space on runner
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Rust Setup
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy

- name: Install smove
run: cargo install --git https://github.com/eigerco/smove

- name: Install protoc
run: |
sudo apt-get install -y protobuf-compiler
protoc --version
- uses: actions/checkout@v3

- name: Rustfmt
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: fmt
args: --all --check

- name: Rust Cache
uses: Swatinem/[email protected]
with:
cache-on-failure: true
cache-all-crates: true

- name: Add rust-src
run: |
rustup component add rust-src
- name: Cargo Clean
run: cargo clean

- name: Build
run: cargo check --release

- name: Run tests
run: cargo test --release --locked --verbose --all

0 comments on commit 9d2e7b7

Please sign in to comment.