Skip to content

Commit

Permalink
add testing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xxshady committed Dec 21, 2024
1 parent 3c1dbba commit 4b7793c
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Test changes

on:
push:
branches: "*"
pull_request:

env:
RUSTFLAGS: -Dwarnings

jobs:
test:
runs-on: ${{ matrix.os }}
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
strategy:
matrix:
include:
- os: ubuntu-22.04
- os: windows-2022
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: rust version
run: rustc -V

- name: cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: build workspace without default features
run: cargo build --workspace --no-default-features

- name: build workspace with all features
run: cargo build --workspace --all-features

- name: clippy
run: cargo clippy --workspace

- name: check examples
run: |
cd examples/template
cargo build --workspace
cargo clippy --workspace
cargo build --workspace --features unloading
cargo clippy --workspace --features unloading
cd ../abi_stable_usage
cargo build --workspace
cargo clippy --workspace
cargo build --workspace --features unloading
cargo clippy --workspace --features unloading
cd ../custom_global_alloc
cargo build --workspace
cargo clippy --workspace
cargo build --workspace --features unloading
cargo clippy --workspace --features unloading
cd ../live_reload
cargo build --workspace
cargo clippy --workspace
cd ../export_main_macro
cargo build --workspace
cargo clippy --workspace

0 comments on commit 4b7793c

Please sign in to comment.