Skip to content

version 0.3.0

version 0.3.0 #323

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
CARGO_HOME: ${{ github.workspace }}/.cargo
RUSTFLAGS: -D warnings -A unused-imports
RUSTDOCFLAGS: -D warnings
RUST_BACKTRACE: ful
jobs:
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup update stable --no-self-update
- run: rustc -Vv
- run: cargo fmt --all -- --check
unit-tests:
name: Tests - ${{ matrix.os }} - ${{ matrix.toolchain }} - ${{ matrix.llvm[0] }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
llvm:
- ["15.0", "15-0"]
- ["16.0", "16-0"]
- ["17.0", "17-0"]
#- ["18.0", "18-0"] (next version of inkwell should support 18.1, then can be added here)
toolchain:
- stable
os:
- ubuntu-latest
include:
- toolchain: stable
os: windows-latest
llvm: ""
- toolchain: stable
os: macos-latest
llvm: ["16.0", "16-0"]
- toolchain: beta
os: ubuntu-latest
llvm: ["16.0", "16-0"]
- toolchain: nightly
os: ubuntu-latest
llvm: ["16.0", "16-0"]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/cache@v3
with:
path: |
${{ env.CARGO_HOME }}
target
key: unit-test-${{ runner.os }}-${{ matrix.toolchain}}-${{ matrix.llvm }}
- name: Set up Rust
run: rustup default ${{ matrix.toolchain }} && rustup update ${{ matrix.toolchain }} --no-self-update && rustup component add clippy rust-docs
- name: Rust version
run: rustc -Vv
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13'
with:
version: ${{ matrix.llvm[0] }}
- name: Run tests (LLVM)
if : matrix.llvm != ''
run: cargo test --verbose --features llvm${{ matrix.llvm[1] }}
- name: Run tests
if : matrix.llvm == ''
run: cargo test --verbose
- name: Run Clippy (LLVM)
if: matrix.toolchain == 'nightly'
run: cargo clippy --verbose --features llvm${{ matrix.llvm[1] }}
- name: Run Docs (LLVM)
if: matrix.toolchain == 'nightly'
run: cargo rustdoc --features llvm${{ matrix.llvm[1] }}
book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- run: mdbook build book
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book