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

Introduce PR check workflow #41

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Deploy
on:
pull_request:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check ENState ⚒️
runs-on: ubuntu-latest
strategy:
matrix:
path: [server, worker]
include:
- path: server
target: x86_64-unknown-linux-gnu
- path: worker
target: wasm32-unknown-unknown
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
rustup target add ${{ matrix.target }}

- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
server/target/
worker/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- run: cargo check --target ${{ matrix.target }} --release
working-directory: ${{ matrix.path }}