Skip to content

Commit f01a1a2

Browse files
ci.yml: Add a job for runnning tests on MSRV
Signed-off-by: Tomás González <[email protected]>
1 parent df3a0a9 commit f01a1a2

File tree

2 files changed

+49
-27
lines changed

2 files changed

+49
-27
lines changed

.github/actions/ci_script/action.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "CI script Tests"
2+
description: "Installs SoftHSM and executes tests"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install SoftHSM
8+
run: |
9+
sudo apt-get update -y -qq &&
10+
sudo apt-get install -y -qq libsofthsm2 &&
11+
mkdir /tmp/tokens
12+
echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf
13+
shell: bash
14+
15+
- name: Install Rust targets
16+
run: |
17+
rustup target add armv7-unknown-linux-gnueabi &&
18+
rustup target add armv7-unknown-linux-gnueabihf &&
19+
rustup target add arm-unknown-linux-gnueabi &&
20+
rustup target add aarch64-unknown-linux-gnu &&
21+
rustup target add i686-unknown-linux-gnu &&
22+
rustup target add loongarch64-unknown-linux-gnu &&
23+
rustup target add powerpc64-unknown-linux-gnu &&
24+
rustup target add powerpc64le-unknown-linux-gnu &&
25+
rustup target add x86_64-pc-windows-msvc &&
26+
rustup target add x86_64-apple-darwin &&
27+
rustup target add aarch64-apple-darwin &&
28+
rustup target add x86_64-unknown-freebsd
29+
shell: bash
30+
31+
- name: Test script
32+
env:
33+
PKCS11_SOFTHSM2_MODULE: /usr/lib/softhsm/libsofthsm2.so
34+
SOFTHSM2_CONF: /tmp/softhsm2.conf
35+
run: ./ci.sh
36+
shell: bash

.github/workflows/ci.yml

+13-27
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,20 @@ jobs:
3838
uses: actions-rs/toolchain@v1
3939
with:
4040
toolchain: stable
41+
- name: "Installs SoftHSM and execute tests"
42+
uses: ./.github/actions/ci_script
4143

42-
- name: Install SoftHSM
43-
run: |
44-
sudo apt-get update -y -qq &&
45-
sudo apt-get install -y -qq libsofthsm2 &&
46-
mkdir /tmp/tokens
47-
echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf
48-
49-
- name: Install Rust targets
50-
run: |
51-
rustup target add armv7-unknown-linux-gnueabi &&
52-
rustup target add armv7-unknown-linux-gnueabihf &&
53-
rustup target add arm-unknown-linux-gnueabi &&
54-
rustup target add aarch64-unknown-linux-gnu &&
55-
rustup target add i686-unknown-linux-gnu &&
56-
rustup target add loongarch64-unknown-linux-gnu &&
57-
rustup target add powerpc64-unknown-linux-gnu &&
58-
rustup target add powerpc64le-unknown-linux-gnu &&
59-
rustup target add x86_64-pc-windows-msvc &&
60-
rustup target add x86_64-apple-darwin &&
61-
rustup target add aarch64-apple-darwin &&
62-
rustup target add x86_64-unknown-freebsd
63-
64-
- name: Test script
65-
env:
66-
PKCS11_SOFTHSM2_MODULE: /usr/lib/softhsm/libsofthsm2.so
67-
SOFTHSM2_CONF: /tmp/softhsm2.conf
68-
run: ./ci.sh
44+
build-msrv:
45+
name: MSRV - Execute CI script
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Setup Rust toolchain on MSRV
50+
uses: actions-rs/toolchain@v1
51+
with:
52+
toolchain: 1.66.0
53+
- name: "Installs SoftHSM and execute tests"
54+
uses: ./.github/actions/ci_script
6955

7056
links:
7157
name: Check links

0 commit comments

Comments
 (0)