Skip to content

CI

CI #165

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
create:
tags:
- v*
env:
CARGO_TERM_COLOR: always
LEAPSDK_LIB_PATH: leap-sdk-redist/LeapSDK/lib/x64
jobs:
build:
strategy:
matrix:
include:
- sdk-redist-ref: gemini
cargo-features: --no-default-features --features nalgebra --features glam --features gemini
- sdk-redist-ref: orion
cargo-features: --no-default-features --features nalgebra --features glam
name: build
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
ref: ${{ matrix.sdk-redist-ref }}
repository: plule/leap-sdk-redist
token: ${{ secrets.LEAP_SDK_REDIST_PAT }}
path: leap-sdk-redist
- uses: Swatinem/rust-cache@v1
- name: Build
run: cargo build ${{ matrix.cargo-features }}
- name: Build Examples
run: cargo build ${{ matrix.cargo-features }} --examples
- name: Build Tests
run: cargo build ${{ matrix.cargo-features }} --tests
- name: Doc
run: cargo doc --features nalgebra --features glam
- name: Style
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -D warnings
release:
needs:
- build
runs-on: ubuntu-latest
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
- name: Publish crate
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}