Skip to content

Optimize CI for wolfProvider #2005

Optimize CI for wolfProvider

Optimize CI for wolfProvider #2005

Workflow file for this run

name: SSSD Tests

Check failure on line 1 in .github/workflows/sssd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sssd.yml

Invalid workflow file

(Line: 44, Col: 13): Matrix exclude key 'force_fail' does not match any key within the matrix
# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE*'
- '.github/ISSUE_TEMPLATE/**'
- '.github/dependabot.yml'
- '.gitignore'
- 'AUTHORS'
- 'COPYING'
- 'README*'
- 'CHANGELOG*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION
jobs:
test_sssd:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
timeout-minutes: 20
container:
image: quay.io/sssd/ci-client-devel:ubuntu-latest
env:
LD_LIBRARY_PATH: /usr/local/lib:/github/home/wolfssl-install/lib:/github/home/openssl-install/lib64
strategy:
fail-fast: false
matrix:
sssd_ref: [ '2.9.1' ]
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
openssl_ref: [ 'openssl-3.5.0' ]
exclude:
- sssd_ref: 'master'
force_fail: 'WOLFPROV_FORCE_FAIL=1'
steps:
- name: Checkout wolfProvider
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Build wolfProvider
run: |
OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
- name: Install dependencies
run: |
# Don't prompt for anything
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y build-essential autoconf libldb-dev \
libldb2 python3-ldb bc libcap-dev libutf8proc-dev
- name: Setup env
run: |
ln -s samba-4.0/ldb.h /usr/include/ldb.h
ln -s samba-4.0/ldb_errors.h /usr/include/ldb_errors.h
ln -s samba-4.0/ldb_handlers.h /usr/include/ldb_handlers.h
ln -s samba-4.0/ldb_module.h /usr/include/ldb_module.h
ln -s samba-4.0/ldb_version.h /usr/include/ldb_version.h
- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
fetch-depth: 1
- name: Build and test sssd with wolfProvider
run: |
# Clone SSSD
git clone https://github.com/SSSD/sssd.git
cd sssd
git checkout ${{ matrix.sssd_ref }}
# Apply patch for testing
patch -p1 < $GITHUB_WORKSPACE/osp/wolfProvider/sssd/sssd-${{ matrix.sssd_ref }}-wolfprov.patch
# Configure and build SSSD with wolfProvider
autoreconf -ivf
./configure --without-samba --disable-cifs-idmap-plugin \
--without-nfsv4-idmapd-plugin --with-oidc-child=no
make -j
- name: Run tests
working-directory: sssd
shell: bash
run: |
# Set environment variables (shared across both modes)
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64
export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf
export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib
echo "Checking OpenSSL providers:"
$GITHUB_WORKSPACE/openssl-install/bin/openssl list -providers | tee provider-list.log
grep -q libwolfprov provider-list.log || (echo "ERROR: libwolfprov not found in OpenSSL providers" && exit 1)
# --- normal mode ---
make check 2>&1 | tee sssd-test.log
TEST_RESULT=${PIPESTATUS[0]}
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT "" sssd
# --- force-fail mode ---
export WOLFPROV_FORCE_FAIL=1
set +e
make check 2>&1 | tee sssd-test.log
TEST_RESULT=${PIPESTATUS[0]}
set -e
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT "WOLFPROV_FORCE_FAIL=1" sssd