Skip to content

Bump dtolnay/rust-toolchain from 1482605bfc5719782e1267fd0c0cc350fe7646b8 to a54c7afa936fefeb4456b2dd8068152669aa8203 in the github-actions group #1049

Bump dtolnay/rust-toolchain from 1482605bfc5719782e1267fd0c0cc350fe7646b8 to a54c7afa936fefeb4456b2dd8068152669aa8203 in the github-actions group

Bump dtolnay/rust-toolchain from 1482605bfc5719782e1267fd0c0cc350fe7646b8 to a54c7afa936fefeb4456b2dd8068152669aa8203 in the github-actions group #1049

Workflow file for this run

# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
toolchain: ["stable"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- run: rustup toolchain install nightly --profile minimal --component rustfmt
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build workspace
run: cargo build --verbose
# Catch individual crates not enabling all features they need.
- name: Build individual crates
if: matrix.os != 'windows-latest'
run:
for crate in native-pkcs11 native-pkcs11-core native-pkcs11-traits
pkcs11-sys native-pkcs11-keychain native-pkcs11-windows; do cargo
build --verbose -p $crate || exit 1 ; done
- run: cargo +nightly fmt -- --check
- name: Run Clippy (default features)
if: matrix.toolchain == 'stable'
run: cargo clippy --tests -- -D warnings
- name: Run Clippy (all features)
if: matrix.toolchain == 'stable'
run: cargo clippy --tests --all-features -- -D warnings
- name: Run cargo-deny
if: matrix.os == 'ubuntu-latest'
uses: EmbarkStudios/cargo-deny-action@e2f4ede4a4e60ea15ff31bc0647485d80c66cfba # v1.6.3∂ß
test:
strategy:
matrix:
os: [macos-latest]
toolchain: ["stable"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: ${{ matrix.toolchain }}
targets: aarch64-apple-darwin,x86_64-apple-darwin
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: cargo test
run: . tests/create_keychain.sh && cargo test --verbose
- run: tests/java/run.sh
- run: tests/ssh/run.sh