|
| 1 | +name: Samba-libs Test |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ 'master', 'main', 'release/**' ] |
| 6 | + pull_request: |
| 7 | + branches: [ '*' ] |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + build_samba_libs: |
| 15 | + timeout-minutes: 60 |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + os: [ ubuntu-latest ] |
| 19 | + samba_ref: [ 'master' ] |
| 20 | + fail-fast: false |
| 21 | + runs-on: ${{ matrix.os }} |
| 22 | + container: |
| 23 | + image: debian:bookworm |
| 24 | + |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + |
| 28 | + - name: Set up build tool-chain |
| 29 | + run: | |
| 30 | + apt-get update |
| 31 | + apt-get install -y sudo wget build-essential pkg-config \ |
| 32 | + git \ |
| 33 | + libacl1-dev libldap2-dev libpam0g-dev \ |
| 34 | + attr krb5-user dnsutils \ |
| 35 | + gnulib autopoint gperf gtk-doc-tools nettle-dev clang \ |
| 36 | + libtasn1-bin libtasn1-6-dev libunistring-dev libp11-kit-dev libunbound-dev \ |
| 37 | + liblmdb-dev libparse-yapp-perl libgpgme11-dev libjansson-dev libarchive-dev \ |
| 38 | + libdbus-1-dev python3-dnspython python3-markdown libpopt-dev heimdal-dev \ |
| 39 | + libtirpc-dev |
| 40 | + apt-get install -y \ |
| 41 | + libkrb5-dev libsasl2-dev libssl-dev libcap-dev \ |
| 42 | + libcups2-dev libavahi-client-dev libavahi-common-dev liburing-dev \ |
| 43 | + gdb libgpgme-dev |
| 44 | + apt-get install -y acl attr autoconf bind9utils bison build-essential \ |
| 45 | + debhelper dnsutils docbook-xml docbook-xsl flex gdb libjansson-dev krb5-user \ |
| 46 | + libacl1-dev libaio-dev libarchive-dev libattr1-dev libblkid-dev libbsd-dev \ |
| 47 | + libcap-dev libcups2-dev libgpgme-dev libjson-perl \ |
| 48 | + libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \ |
| 49 | + libpopt-dev libreadline-dev nettle-dev perl pkg-config \ |
| 50 | + python3-dev python3-dbg python3-cryptography python3-dnspython python3-gpg python3-markdown \ |
| 51 | + xsltproc zlib1g-dev liblmdb-dev lmdb-utils python3-pyasn1 python3-iso8601 |
| 52 | +
|
| 53 | + - name: Restore cached gnutls-wolfssl |
| 54 | + id: cache-gnutls |
| 55 | + uses: actions/cache@v4 |
| 56 | + with: |
| 57 | + path: | |
| 58 | + /opt/gnutls |
| 59 | + /opt/wolfssl |
| 60 | + /opt/wolfssl-gnutls-wrapper |
| 61 | + key: gnutls-wolfssl-${{ runner.os }}-${{ hashFiles('setup.sh', 'wolfssl-gnutls-wrapper/**', 'wolfssl/**', 'gnutls/**') }} |
| 62 | + restore-keys: | |
| 63 | + gnutls-wolfssl-${{ runner.os }}- |
| 64 | +
|
| 65 | + - name: Build GnuTLS with wolfSSL provider using setup.sh script |
| 66 | + if: steps.cache-gnutls.outputs.cache-hit != 'true' |
| 67 | + run: | |
| 68 | + echo "Running setup.sh..." |
| 69 | + GNUTLS_INSTALL=/opt/gnutls WOLFSSL_INSTALL=/opt/wolfssl ./setup.sh |
| 70 | +
|
| 71 | + - name: Verify provider artefacts exist |
| 72 | + run: | |
| 73 | + test -d /opt/wolfssl || exit 1 |
| 74 | + test -d /opt/gnutls || exit 1 |
| 75 | + test -d /opt/wolfssl-gnutls-wrapper/lib || exit 1 |
| 76 | +
|
| 77 | + - name: Clone Samba |
| 78 | + run: | |
| 79 | + git clone https://gitlab.com/samba-team/samba.git samba |
| 80 | + cd samba |
| 81 | + if [ "${{ matrix.samba_ref }}" != "master" ]; then |
| 82 | + git checkout ${{ matrix.samba_ref }} |
| 83 | + fi |
| 84 | +
|
| 85 | + - name: Configure & build Samba-libs |
| 86 | + working-directory: samba |
| 87 | + run: | |
| 88 | + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}/opt/gnutls/lib/pkgconfig" |
| 89 | + export CPPFLAGS="-I/opt/gnutls/include ${CPPFLAGS:-}" |
| 90 | + export LDFLAGS="-L/opt/gnutls/lib -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/opt/gnutls/lib ${LDFLAGS:-}" |
| 91 | + export LD_LIBRARY_PATH="/opt/gnutls/lib:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}" |
| 92 | + ./configure --enable-selftest |
| 93 | + make -j"$(nproc)" |
| 94 | +
|
| 95 | + - name: Run quick-tests |
| 96 | + working-directory: samba |
| 97 | + run: | |
| 98 | + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}/opt/gnutls/lib/pkgconfig" |
| 99 | + export CPPFLAGS="-I/opt/gnutls/include ${CPPFLAGS:-}" |
| 100 | + export LDFLAGS="-L/opt/gnutls/lib -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/opt/gnutls/lib ${LDFLAGS:-}" |
| 101 | + export LD_LIBRARY_PATH="/opt/gnutls/lib:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}" |
| 102 | + make quicktest -j"$(nproc)" |
0 commit comments