Httpd test improvement #136
This file contains 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: Integration tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
test: [libssh, httpd, bind] | |
token: [softokn, softhsm, kryoptic] | |
exclude: | |
- test: libssh | |
token: softokn | |
- test: libssh | |
token: kryoptic | |
- test: bind | |
token: softokn | |
- test: bind | |
token: softhsm | |
name: ${{ matrix.test }} test with software token (${{ matrix.token }}) | |
container: fedora:rawhide | |
steps: | |
- name: Get Date for DNF cache entry | |
id: get-date | |
run: | | |
echo "date=$(/bin/date -u "+%Y%V")" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: DNF cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
/var/cache/dnf | |
key: ${{ runner.os }}-dnf-${{ steps.get-date.outputs.date }} | |
- name: Install Dependencies | |
run: | | |
dnf -y install clang git meson cargo pkgconf-pkg-config \ | |
openssl-devel openssl opensc p11-kit-server gnutls-utils \ | |
gcc g++ perl-interpreter zlib-devel sqlite-devel httpd \ | |
bind9-next softhsm 'perl(Module::Load::Conditional)' \ | |
'perl(File::Temp)' 'perl(IPC::Cmd)' 'perl(FindBin)' \ | |
'perl(lib)' 'perl(File::Compare)' 'perl(File::Copy)' \ | |
procps-ng | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- if: ${{ matrix.token == 'kryoptic' }} | |
name: Get Kryoptic | |
id: kryoptic_setup | |
run: | | |
git clone https://github.com/latchset/kryoptic.git | |
cd kryoptic | |
git submodule update --init | |
echo "KRYOPTIC=${PWD}" >> "$GITHUB_OUTPUT" | |
- if: ${{ matrix.token == 'kryoptic' }} | |
name: OpenSSL build cache | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: | | |
kryoptic/openssl/ | |
key: ${{ runner.os }}-ossl-${{ hashFiles('kryoptic/.git/modules/openssl/HEAD') }} | |
- if: ${{ matrix.token == 'kryoptic' }} | |
name: Generate lock file | |
run: | | |
cd kryoptic | |
cargo generate-lockfile | |
- if: ${{ matrix.token == 'kryoptic' }} | |
name: Cache Rust dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
kryoptic/target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('kryoptic/**/Cargo.lock') }} | |
- if: ${{ matrix.token == 'kryoptic' }} | |
name: Build Kryoptic | |
run: | | |
cd kryoptic | |
cargo build | |
- name: Setup, Build and Install pkcs11-provider | |
run: | | |
meson setup -Dlibdir=/usr/lib64 builddir | |
meson compile -C builddir | |
meson install -C builddir | |
- name: Test | |
env: | |
PKCS11_MODULE: /usr/lib64/ossl-modules/pkcs11.so | |
KRYOPTIC: ${{ steps.kryoptic_setup.outputs.KRYOPTIC }} | |
run: | | |
pushd tests/integration && bash -e ${{ matrix.test }}.sh ${{ matrix.token }} |