Skip to content

Commit

Permalink
ci: Add GitHub Actions CI file
Browse files Browse the repository at this point in the history
  • Loading branch information
shesek committed Oct 21, 2024
1 parent c5a8346 commit 8b7aae8
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/minsc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Minsc tests

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]

jobs:
Test:
runs-on: ubuntu-22.04
env:
CARGO_TERM_COLOR: always

steps:
- name: πŸ“₯ Checkout
uses: actions/checkout@v4

- name: πŸ—„οΈ Cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/registry
~/.cargo/git
target
- name: πŸ› Check for errors
run: cargo check --all-features

- name: 🧹 Check formatting
run: cargo fmt -- --check

- name: πŸ“Ž Check with Clippy
run: cargo clippy --all-targets --all-features

- name: πŸ”¨ Build
run: cargo build --release

- name: πŸ§ͺ Run tests
run: MINSC_EXE=target/release/minsc ./tests/test.sh tests

- name: πŸ“– Run examples
run: MINSC_EXE=target/release/minsc ./tests/test.sh examples

- name: πŸ“¦ Prepare artifacts
run: strip target/release/minsc

- name: πŸ“€οΈ Upload artifacts
uses: actions/upload-artifact@v4
with:
name: minsc
path: target/release/minsc

0 comments on commit 8b7aae8

Please sign in to comment.