language: generic dist: focal sudo: required virt: vm arch: arm64-graviton2 group: edge services: - docker install: true stages: - build-and-test matrix: include: - stage: build-and-test env: fedora=latest - stage: build-and-test env: centos=8 - stage: build-and-test env: centos=centos7 before_script: - if test -n "$fedora" ; then sed -i "s#^FROM.*#FROM registry.fedoraproject.org/fedora:$fedora#" tests/Dockerfile ; fi - if test -n "$centos" ; then sed -i "s#^FROM.*#FROM centos:$centos#" tests/Dockerfile ; fi script: - if grep -q fedora tests/Dockerfile ; then sed -i 's/^RUN/# RUN/; s%^ENTRYPOINT .*%ENTRYPOINT [ "/usr/bin/sleep", "600" ]%' tests/Dockerfile ; fi - docker build -t mod_authnz_pam -f tests/Dockerfile . - docker run $( grep -q fedora tests/Dockerfile && echo --security-opt=seccomp:unconfined ) --name mod_authnz_pam --rm -d mod_authnz_pam - if grep -q fedora tests/Dockerfile ; then docker exec mod_authnz_pam tests/build.sh ; docker exec mod_authnz_pam tests/config.sh ; fi - if grep -q fedora tests/Dockerfile ; then docker exec mod_authnz_pam /usr/sbin/httpd -DFOREGROUND ; fi & docker exec mod_authnz_pam tests/run.sh