Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci.yml: Add a job for runnning tests on MSRV #188

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/actions/ci_script/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "CI script Tests"
description: "Installs SoftHSM and executes tests"

runs:
using: "composite"
steps:
- name: Install SoftHSM
run: |
sudo apt-get update -y -qq &&
sudo apt-get install -y -qq libsofthsm2 &&
mkdir /tmp/tokens
echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf
shell: bash

- name: Install Rust targets
run: |
rustup target add armv7-unknown-linux-gnueabi &&
rustup target add armv7-unknown-linux-gnueabihf &&
rustup target add arm-unknown-linux-gnueabi &&
rustup target add aarch64-unknown-linux-gnu &&
rustup target add i686-unknown-linux-gnu &&
rustup target add loongarch64-unknown-linux-gnu &&
rustup target add powerpc64-unknown-linux-gnu &&
rustup target add powerpc64le-unknown-linux-gnu &&
rustup target add x86_64-pc-windows-msvc &&
rustup target add x86_64-apple-darwin &&
rustup target add aarch64-apple-darwin &&
rustup target add x86_64-unknown-freebsd
shell: bash

- name: Test script
env:
PKCS11_SOFTHSM2_MODULE: /usr/lib/softhsm/libsofthsm2.so
SOFTHSM2_CONF: /tmp/softhsm2.conf
run: ./ci.sh
shell: bash
40 changes: 13 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,20 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: "Installs SoftHSM and execute tests"
uses: ./.github/actions/ci_script

- name: Install SoftHSM
run: |
sudo apt-get update -y -qq &&
sudo apt-get install -y -qq libsofthsm2 &&
mkdir /tmp/tokens
echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf

- name: Install Rust targets
run: |
rustup target add armv7-unknown-linux-gnueabi &&
rustup target add armv7-unknown-linux-gnueabihf &&
rustup target add arm-unknown-linux-gnueabi &&
rustup target add aarch64-unknown-linux-gnu &&
rustup target add i686-unknown-linux-gnu &&
rustup target add loongarch64-unknown-linux-gnu &&
rustup target add powerpc64-unknown-linux-gnu &&
rustup target add powerpc64le-unknown-linux-gnu &&
rustup target add x86_64-pc-windows-msvc &&
rustup target add x86_64-apple-darwin &&
rustup target add aarch64-apple-darwin &&
rustup target add x86_64-unknown-freebsd

- name: Test script
env:
PKCS11_SOFTHSM2_MODULE: /usr/lib/softhsm/libsofthsm2.so
SOFTHSM2_CONF: /tmp/softhsm2.conf
run: ./ci.sh
build-msrv:
name: MSRV - Execute CI script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Rust toolchain on MSRV
uses: actions-rs/toolchain@v1
with:
toolchain: 1.66.0
- name: "Installs SoftHSM and execute tests"
uses: ./.github/actions/ci_script
wiktor-k marked this conversation as resolved.
Show resolved Hide resolved

links:
name: Check links
Expand Down
Loading