Merge pull request #75 from messense/mupdf-1.22.2 #463
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 500 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo check | |
test: | |
name: Test Suite | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-2019] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 500 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install LLVM | |
if: matrix.os == 'windows-2019' | |
run: choco install -y llvm | |
- name: Setup msbuild | |
if: matrix.os == 'windows-2019' | |
uses: microsoft/[email protected] | |
- run: cargo test | |
timeout-minutes: 20 | |
if: matrix.os == 'windows-2019' | |
env: | |
LIBCLANG_PATH: "C:\\Program Files\\LLVM\\bin" | |
- run: cargo test | |
if: matrix.os != 'windows-2019' | |
- name: Test package mupdf-sys | |
if: matrix.os == 'ubuntu-latest' | |
run: cargo package --manifest-path mupdf-sys/Cargo.toml | |
asan: | |
name: Address Sanitizer | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 500 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rust-src | |
- name: cargo test | |
run: | | |
cargo test -Zbuild-std --target x86_64-unknown-linux-gnu | |
env: | |
RUSTFLAGS: -Zsanitizer=address | |
valgrind: | |
name: Valgrind | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 500 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@valgrind | |
- uses: taiki-e/install-action@cargo-valgrind | |
- run: cargo valgrind test | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- run: cargo fmt --all --check |