ci: Run tests also on i686 #909
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | ||
on: [push, pull_request, workflow_dispatch] | ||
jobs: | ||
# Use the following command to fix words locally: | ||
# codespell --write-changes | ||
check-spelling: | ||
name: Check spelling | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check spelling | ||
uses: codespell-project/actions-codespell@v1 | ||
formatting: | ||
name: Check formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
lints: | ||
name: Check lints | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check formatting | ||
run: cargo clippy --all-targets -- -D clippy::all -D clippy::cargo | ||
docs: | ||
name: Check documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check documentation | ||
run: RUSTDOCFLAGS="-Dwarnings" cargo doc --document-private-items --no-deps | ||
check: | ||
name: Check for errors | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
target: | ||
- x86_64-unknown-linux-gnu | ||
- armv7-unknown-linux-gnueabi | ||
- armv7-unknown-linux-gnueabihf | ||
- arm-unknown-linux-gnueabi | ||
- aarch64-unknown-linux-gnu | ||
- i686-unknown-linux-gnu | ||
- loongarch64-unknown-linux-gnu | ||
- powerpc64-unknown-linux-gnu | ||
- powerpc64le-unknown-linux-gnu | ||
- x86_64-pc-windows-msvc | ||
- x86_64-apple-darwin | ||
- aarch64-apple-darwin | ||
- x86_64-unknown-freebsd | ||
- riscv64gc-unknown-linux-gnu | ||
toolchain: | ||
- stable | ||
- "1.66.0" # MSRV | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
- name: Install Rust target | ||
run: rustup target add ${{ matrix.target }} | ||
- name: Check source | ||
run: cargo check --target ${{ matrix.target }} --workspace --all-targets | ||
- name: Check all features source | ||
run: cargo check --target ${{ matrix.target }} --all-features --workspace --all-targets | ||
check-matrix: | ||
name: Check if all checks succeeded | ||
if: always() | ||
needs: | ||
- check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
tests-softhsm: | ||
name: Run tests against SoftHSM | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
target: | ||
- x86_64-unknown-linux-gnu | ||
- i686-unknown-linux-gnu | ||
- aarch64-unknown-linux-gnu | ||
toolchain: | ||
- stable | ||
- "1.66.0" # MSRV | ||
include: | ||
- target: x86_64-unknown-linux-gnu | ||
runner: ubuntu-latest | ||
- target: i686-unknown-linux-gnu | ||
runner: ubuntu-latest | ||
- target: aarch64-unknown-linux-gnu | ||
runner: i686-unknown-linux-gnu | ||
runs-on: {{ matrix.runner }} | ||
Check failure on line 108 in .github/workflows/ci.yml
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
- name: Install SoftHSM | ||
run: | | ||
sudo apt-get update -y -qq | ||
if [ "{{ matrix.target }}" = "i686-unknown-linux-gnu" ]; then | ||
sudo dpkg --add-architecture i386 && | ||
sudo apt-get install -y -qq gcc-multilib libsofthsm2:i386 | ||
else | ||
sudo apt-get install -y -qq libsofthsm2 | ||
fi | ||
mkdir /tmp/tokens | ||
echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf | ||
- name: Install Rust target | ||
run: rustup target add ${{ matrix.target }} | ||
- name: Check | ||
run: cargo check --target ${{ matrix.target }} --workspace --all-targets | ||
- name: Test script | ||
env: | ||
TEST_PKCS11_MODULE: /usr/lib/softhsm/libsofthsm2.so | ||
SOFTHSM2_CONF: /tmp/softhsm2.conf | ||
TARGET: ${{ matrix.target }} | ||
RUST_BACKTRACE: 1 | ||
RUSTFLAGS: "-D warnings" | ||
run: ./ci.sh | ||
build-windows: | ||
name: Build on Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo check --all-features --workspace --all-targets | ||
tests-kryoptic: | ||
name: Run tests against Kryoptic | ||
runs-on: ubuntu-latest | ||
container: fedora:rawhide | ||
steps: | ||
- name: Install dependencies | ||
run: dnf -y install git cargo clang-devel kryoptic | ||
- uses: actions/checkout@v4 | ||
- name: Test script | ||
env: | ||
KRYOPTIC_CONF: /tmp/kryoptic.sql | ||
TEST_PKCS11_MODULE: /usr/lib64/pkcs11/libkryoptic_pkcs11.so | ||
run: | | ||
RUST_BACKTRACE=1 cargo build && | ||
RUST_BACKTRACE=1 cargo build --all-features && | ||
RUST_BACKTRACE=1 cargo test | ||
links: | ||
name: Check links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Link Checker | ||
uses: peter-evans/link-checker@v1 | ||
with: | ||
args: -v -r *.md | ||
- name: Fail if there were link errors | ||
run: exit ${{ steps.lc.outputs.exit_code }} |