From 8167489c9aea4608a1799d5a9e553e9cc9055f16 Mon Sep 17 00:00:00 2001 From: Ondrej Moris Date: Tue, 12 Mar 2024 13:10:26 +0100 Subject: [PATCH] workflows/integration: use tests/integration Signed-off-by: Ondrej Moris --- .github/workflows/integration.yml | 103 +++++++++++++++++++----------- 1 file changed, 65 insertions(+), 38 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 9c07ca17..e9381c42 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -7,53 +7,80 @@ on: pull_request: branches: ["main"] -env: - P_LIBSSH_DEBUG: /tmp/libssh-provider-debug.log - jobs: - build: - name: libssh + libssh: runs-on: ubuntu-22.04 - container: fedora:latest + container: docker.io/dokken/fedora-40 steps: - - name: Install Dependencies + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Build Requirements 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 + dnf -y install git autoconf autoconf-archive automake libtool \ + openssl-devel + + - name: Setup, Build and Install pkcs11-provider + run: | + autoreconf -fiv + ./configure --libdir=/usr/lib64 + make + make install + + - name: Test + run: | + export PKCS11_MODULE=/usr/lib64/ossl-modules/pkcs11.so + pushd tests/integration + bash -e libssh.sh + + httpd: + runs-on: ubuntu-22.04 + # TODO: Change to fedora:latest once F40 is released + container: docker.io/dokken/fedora-40 + steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Install Build Requirements + run: | + dnf -y install autoconf autoconf-archive automake libtool \ + openssl-devel + - 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 .. + + - name: Test + run: | + export PKCS11_MODULE=/usr/lib64/ossl-modules/pkcs11.so + pushd tests/integration + bash -e httpd.sh + + bind: + runs-on: ubuntu-22.04 + # TODO: Change to fedora:latest once F40 is released + container: docker.io/dokken/fedora-40 + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Build Requirements + run: | + dnf -y install autoconf autoconf-archive automake libtool \ + openssl-devel + + - name: Setup, Build and Install pkcs11-provider + run: | + autoreconf -fiv + ./configure --libdir=/usr/lib64 make - - name: Run libssh pkcs11-provider tests - run: | - cd libssh-mirror/build - ! test -e $P_LIBSSH_DEBUG && \ - echo "Provider log $P_LIBSSH_DEBUG does not exist yet (expected)" - PKCS11_PROVIDER_DEBUG=file:$P_LIBSSH_DEBUG 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 $P_LIBSSH_DEBUG && \ - echo "Provider log $P_LIBSSH_DEBUG exists (expected)" + make install + + - name: Test + run: | + export PKCS11_MODULE=/usr/lib64/ossl-modules/pkcs11.so + pushd tests/integration + bash -e bind.sh \ No newline at end of file