Skip to content

key pin value (#33) #57

key pin value (#33)

key pin value (#33) #57

Workflow file for this run

---
"on":
push:
pull_request:
name: CI
env:
VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --check
build_and_test:
name: Other build/test
strategy:
fail-fast: false
matrix:
rust_version: [stable, 1.70.0]
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
components: clippy
- uses: mozilla-actions/[email protected]
with:
version: v0.4.2
- if: runner.os != 'windows'
run: |
sudo apt-get update && \
sudo apt-get -y upgrade
- if: runner.os == 'windows'
uses: johnwason/vcpkg-action@v4
with:
pkgs: openssl
triplet: x64-windows-static-md
token: ${{ github.token }}
- run: cargo build
# Don't run clippy on Windows, we only need to run it on Linux
- name: Clippy
if: runner.os != 'windows'
run: |
cargo clippy --no-deps
- name: Cargo test (Debug)
run: cargo test
- name: Cargo test (Release)
run: cargo test --release
docs:
name: Documentation
strategy:
fail-fast: false
matrix:
rust_version: [stable, nightly]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
- name: Install dependencies
run: |
sudo apt-get update && \
sudo apt-get -y upgrade && \
sudo apt-get -y install \
libtss2-dev
- uses: mozilla-actions/[email protected]
with:
version: v0.4.2
- name: Build documentation with zero dependencies / features.
# This tests that all the stubs work properly for optional dependencies,
run: |
cargo ${{ matrix.rust_version == 'nightly' && '+nightly' || '' }} doc \
--all --no-deps --document-private-items
env:
RUSTDOCFLAGS: ${{ matrix.rust_version == 'nightly' && '--cfg docsrs' || '' }}
- uses: actions/upload-artifact@v3
with:
name: docs-${{ matrix.rust_version }}
path: |
target/doc/
!target/doc/src/
if-no-files-found: error
retention-days: 14
# Build with all features
- run: |
cargo ${{ matrix.rust_version == 'nightly' && '+nightly' || '' }} doc \
--all --no-deps --document-private-items --all-features
env:
RUSTDOCFLAGS: ${{ matrix.rust_version == 'nightly' && '--cfg docsrs' || '' }}
- uses: actions/upload-artifact@v3
with:
name: docs-${{ matrix.rust_version }}-all_features
path: |
target/doc/
!target/doc/src/
if-no-files-found: error
retention-days: 14