name: Linux
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
PKCS11_SOFTHSM2_MODULE: /usr/lib/softhsm/libsofthsm2.so
steps:
- uses: actions/checkout@v2
- name: SoftHSM installation
run: |
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ eoan universe"
sudo apt-get install -f libsofthsm2
sudo usermod -a -G softhsm $USER
- name: build
run: cargo build --verbose
- name: test
run: |
sg softhsm -c \
'cargo test --verbose'
- name: rustfmt
run: cargo fmt -- --check
- name: clippy
run: cargo clippy --all-targets --all-features -- -D warnings