|
| 1 | +name: Build |
| 2 | +on: |
| 3 | + push: |
| 4 | + pull_request: |
| 5 | + # do not run if only system tests were edited inside a pull request |
| 6 | + paths-ignore: |
| 7 | + - 'src/tests/system/**' |
| 8 | +concurrency: |
| 9 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 10 | + cancel-in-progress: true |
| 11 | +jobs: |
| 12 | + make-distcheck: |
| 13 | + if: github.event_name == 'push' || !contains(github.event.pull_request.labels.*.name, 'Accepted') |
| 14 | + runs-on: ubuntu-latest |
| 15 | + container: quay.io/sssd/ci-client-devel:latest |
| 16 | + permissions: |
| 17 | + contents: read |
| 18 | + steps: |
| 19 | + - name: Checkout repository |
| 20 | + uses: actions/checkout@v6 |
| 21 | + |
| 22 | + - name: Install dependencies |
| 23 | + id: dependencies |
| 24 | + uses: ./.github/actions/install-dependencies |
| 25 | + |
| 26 | + - name: Configure sssd |
| 27 | + uses: ./.github/actions/configure |
| 28 | + |
| 29 | + - name: make |
| 30 | + shell: bash |
| 31 | + working-directory: x86_64 |
| 32 | + run: | |
| 33 | + source ../contrib/fedora/bashrc_sssd |
| 34 | + make CFLAGS+="$SSS_WARNINGS -Werror" -j$PROCESSORS |
| 35 | +
|
| 36 | + - name: make check |
| 37 | + shell: bash |
| 38 | + working-directory: x86_64 |
| 39 | + run: | |
| 40 | + source ../contrib/fedora/bashrc_sssd |
| 41 | + make CFLAGS+="$SSS_WARNINGS -Werror" -j$PROCESSORS check |
| 42 | +
|
| 43 | + - name: make distcheck |
| 44 | + shell: bash |
| 45 | + working-directory: x86_64 |
| 46 | + run: | |
| 47 | + source ../contrib/fedora/bashrc_sssd |
| 48 | + make -j$PROCESSORS distcheck |
| 49 | +
|
| 50 | + - uses: actions/upload-artifact@v5 |
| 51 | + if: always() |
| 52 | + with: |
| 53 | + name: build |
| 54 | + path: | |
| 55 | + x86_64/config.log |
| 56 | + x86_64/config.h |
| 57 | + x86_64/test-suite.log |
| 58 | + if-no-files-found: ignore |
| 59 | + |
| 60 | + freebsd: |
| 61 | + if: github.event_name == 'push' || !contains(github.event.pull_request.labels.*.name, 'Accepted') |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - name: Repository checkout |
| 65 | + uses: actions/checkout@v6 |
| 66 | + - uses: cross-platform-actions/action@v0.32.0 |
| 67 | + with: |
| 68 | + operating_system: 'freebsd' |
| 69 | + version: '14.3' |
| 70 | + architecture: 'x86_64' |
| 71 | + run: | |
| 72 | + # Use latest package set |
| 73 | + sudo mkdir -p /usr/local/etc/pkg/repos/ |
| 74 | + sudo cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf |
| 75 | + sudo sed -i.bak -e 's|/quarterly|/latest|' /usr/local/etc/pkg/repos/FreeBSD.conf |
| 76 | +
|
| 77 | + # Trick SSSD into believing that nsupdate supports 'realm' clause |
| 78 | + # until FreeBSD switches to MIT Kerberos by default |
| 79 | + # Can be removed with FreeBSD 15 |
| 80 | + sed -i.bak -e 's|echo realm|echo class IN|g' src/external/nsupdate.m4 |
| 81 | +
|
| 82 | + # Patch out "timezone" variable usage - it is a legacy function in FreeBSD |
| 83 | + # Can be removed with FreeBSD 15 |
| 84 | + sed -i.bak -e 's|timezone;|0;|g' src/util/util.c |
| 85 | + sed -i.bak -e 's|daylight,|0,|g' src/providers/ldap/ldap_auth.c \ |
| 86 | + src/providers/ldap/sdap_access.c |
| 87 | +
|
| 88 | + echo "::group::Dependencies installation" |
| 89 | + sudo -E pkg install -y \ |
| 90 | + autoconf automake gettext-tools gmake libtool pkgconf \ |
| 91 | + ldb25 popt samba416 talloc tdb tevent \ |
| 92 | + bind-tools c-ares ding-libs git jose libinotify libuuid libxml2 \ |
| 93 | + libxslt krb5 pcre2 python3 xmlcatmgr docbook-xsl \ |
| 94 | + py311-setuptools \ |
| 95 | + check cmocka cwrap softhsm2 |
| 96 | + echo "::endgroup::" |
| 97 | +
|
| 98 | + echo "::group::Build configuration" |
| 99 | + autoreconf -f -i |
| 100 | +
|
| 101 | + env CFLAGS=-isystem/usr/local/include \ |
| 102 | + CPPFLAGS=-isystem/usr/local/include \ |
| 103 | + LDFLAGS=-L/usr/local/lib \ |
| 104 | + KRB5_CONFIG=/usr/local/bin/krb5-config \ |
| 105 | + SOFTHSM2_PATH=/usr/local/lib/softhsm/libsofthsm2.so \ |
| 106 | + MAKE=gmake \ |
| 107 | + LIBS=-lintl \ |
| 108 | + ./configure --disable-cifs-idmap-plugin \ |
| 109 | + --disable-linux-caps \ |
| 110 | + --without-selinux \ |
| 111 | + --without-nfsv4-idmapd-plugin \ |
| 112 | + --with-smb-idmap-interface-version=6 \ |
| 113 | + --with-xml-catalog-path=/usr/local/share/xml/catalog |
| 114 | + echo "::endgroup::" |
| 115 | +
|
| 116 | + echo "::group::Building" |
| 117 | + gmake |
| 118 | + echo "::endgroup::" |
| 119 | +
|
| 120 | + echo "::group::Testing" |
| 121 | + # Tests don't work yet |
| 122 | + #gmake check |
| 123 | + echo "::endgroup::" |
0 commit comments