Skip to content

Commit

Permalink
Run CI with integration test for libssh
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Moris <[email protected]>
  • Loading branch information
The-Mule committed Feb 14, 2024
1 parent 8cd8062 commit 7d8558b
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Integration tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
PROVIDER_LIBSSH_DEBUG_FILE: /tmp/libssh-provider-debug.log

jobs:
build:
name: libssh
runs-on: ubuntu-22.04
container: fedora:latest
steps:
- name: Install Dependencies
run: |
dnf -y install gcc g++ git cmake libcmocka libcmocka-devel \
autoconf automake autoconf-archive libtool softhsm nss-tools \
gnutls-utils p11-kit p11-kit-devel p11-kit-server opensc \
softhsm-devel socket_wrapper nss_wrapper uid_wrapper \
pam_wrapper priv_wrapper openssh-server zlib-devel
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup, Build and Install pkcs11-provider
run: |
autoreconf -fiv
./configure --libdir=/usr/lib64
make
make install
- name: Clone, Setup and Build libssh
run: |
git clone https://gitlab.com/libssh/libssh-mirror.git
cd libssh-mirror/
mkdir build
cd build/
cmake \
-DUNIT_TESTING=ON \
-DCLIENT_TESTING=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DWITH_PKCS11_URI=ON \
-DWITH_PKCS11_PROVIDER=ON \
-DPKCS11_PROVIDER=/usr/lib64/ossl-modules/pkcs11.so ..
make
- name: Run libssh pkcs11-provider tests
run: |
cd libssh-mirror/build
! test -e $PROVIDER_LIBSSH_DEBUG_FILE
PKCS11_PROVIDER_DEBUG=file:$PROVIDER_LIBSSH_DEBUG_FILE ctest \
--output-on-failure -R \
'(torture_auth_pkcs11|torture_pki_rsa_uri|torture_pki_ecdsa_uri)' \
| tee testout.log 2>&1
grep -q "100% tests passed, 0 tests failed out of 3" testout.log
test -e $PROVIDER_LIBSSH_DEBUG_FILE # Proves that provider was used

0 comments on commit 7d8558b

Please sign in to comment.