Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thestig4242 authored Sep 16, 2024
1 parent 3aad7ce commit 77d8f83
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

# Define the triggers; usually merges to the repository
# default branch and pull-requests
#v
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize

env:
CARGO_TERM_COLOR: always

defaults:
run:
shell: bash

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --workspace --all-features -- -D warnings
- name: Reject uncommitted changes
run: git diff --exit-code
- name: Build documentation
run: cargo doc --no-deps --document-private-items --all-features --workspace
env:
RUSTDOCFLAGS: -D warnings
- name: Run `cross-compiler`
run: cargo run --package cross-compiler

test:
name: Test
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{matrix.os}}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Run `cargo build`
run: cargo build --all-features
- name: Run `cargo test`
run: cargo test --all-features
- name: Run `export-validator`
run: cargo run --package export-validator

0 comments on commit 77d8f83

Please sign in to comment.