Skip to content

Merge branch 'V24_0-branch' #449

Merge branch 'V24_0-branch'

Merge branch 'V24_0-branch' #449

name: Build and test HTCondor-CE RPMs
on: [push, pull_request]
jobs:
build-rpms-and-test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
platform:
- rockylinux:8
- almalinux:9
target_env:
- uw_build
- osg-23
- osg-23-testing
- osg-23-upcoming
- osg-23-upcoming-testing
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Prepare Docker
run: |
echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null &&
sudo service docker restart
- name: Start ${{ matrix.platform }} image
run: |
docker run --privileged --detach --env "container=docker" \
--name $GITHUB_SHA \
--volume /sys/fs/cgroup:/sys/fs/cgroup \
--volume `pwd`:/htcondor-ce:rw \
${{ matrix.platform }} \
/usr/sbin/init
- name: Build ${{ matrix.platform }} RPMs (${{ matrix.target_env }})
run: |
docker exec $GITHUB_SHA \
/bin/bash -xc \
"/htcondor-ce/tests/build_rpms.sh \
${{ matrix.platform }} \
${{ matrix.target_env }}"
- name: Install ${{ matrix.platform }} RPMs (${{ matrix.target_env }})
run: |
docker exec $GITHUB_SHA \
/bin/bash -xc \
"/htcondor-ce/tests/install_rpms.sh \
${{ matrix.target_env}}"
- name: Run unit tests
run: |
docker exec $GITHUB_SHA \
/bin/bash -xc \
"cd /htcondor-ce/tests; \
python3 run_tests.py"
- name: Run ${{ matrix.target_env }} integration tests (${{ matrix.platform }})
id: integration-tests
run: |
docker exec $GITHUB_SHA \
/bin/bash -xc \
"/htcondor-ce/tests/test_inside_docker.sh \
${{ matrix.platform}} \
${{ matrix.target_env}}"
- name: Host certificate details
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
openssl x509 -in /etc/grid-security/hostcert.pem -noout -text
- name: HTCondor-CE configuration details
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
condor_ce_config_val -dump
- name: HTCondor-CE mapfile details
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
/bin/sh -c "cat /etc/condor-ce/mapfiles.d/* && cat /usr/share/condor-ce/mapfiles.d/*"
- name: HTCondor configuration details
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
condor_config_val -dump
- name: HTCondor-CE logs
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
/bin/bash -c "cat /var/log/condor-ce/*"
- name: HTCondor logs
if: failure() && steps.integration-tests.outcome == 'failure'
run: |
docker exec $GITHUB_SHA \
/bin/bash -c "cat /var/log/condor/*"
- name: Verify preun/postun RPM sections
run: |
docker exec $GITHUB_SHA \
yum remove -y 'htcondor-ce*'