Skip to content

ci: use DDS config path directly instead of --config flag #39

ci: use DDS config path directly instead of --config flag

ci: use DDS config path directly instead of --config flag #39

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
IMAGE_PREFIX: ghcr.io/fairrootgroup/odc-ci
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
include:
- fedora: fedora39
label: fedora-39-x86_64-gcc-13
- fedora: fedora40
label: fedora-40-x86_64-gcc-14
- fedora: fedora41
label: fedora-41-x86_64-gcc-14
- fedora: fedora42
label: fedora-42-x86_64-gcc-15
- fedora: fedora42-boost190
label: fedora-42-x86_64-gcc-15-boost-1.90
- fedora: fedora42
label: sanitizers
extra: -DENABLE_SANITIZERS=ON
container:
image: ${{ format('{0}:{1}', 'ghcr.io/fairrootgroup/odc-ci', matrix.fedora) }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and test
env:
LABEL: ${{ matrix.label }}
run: ctest -S ODCTest.cmake -VV --output-on-failure ${{ matrix.extra }}
- name: Collect logs on failure
if: failure()
run: |
mkdir -p build/logs
cp -r ~/.ODC/ build/logs/ODC 2>/dev/null || true
cp -r ~/.DDS/ build/logs/DDS 2>/dev/null || true
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.label }}
path: |
build/logs/
build/tmp/
if-no-files-found: ignore
retention-days: 7
slurm-integration:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: GSI-HPC/sind-action@v1
with:
clusters: |
- kind: Cluster
name: odc
defaults:
image: ${{ env.IMAGE_PREFIX }}:fedora42-sind
cpus: 4
memory: 4g
nodes:
- controller
- worker: 2
- name: DDS smoke test
run: |
sind exec odc -- bash -lc '
set -ex
echo "HOME=$HOME"
sinfo -N -l
scontrol show partition
scontrol show node
cat /etc/slurm/slurm.conf
dds-user-defaults -f --default
sed -i "s|sandbox_dir=.*|sandbox_dir=/data/.DDS|" ~/.DDS/DDS.cfg
cat ~/.DDS/DDS.cfg
dds-session start
dds-submit -r slurm -n 2 --slots 4 -c /data/tests/slurm.cfg
for i in $(seq 1 24); do
echo "=== Attempt $i/24 ==="
dds-info -l
dds-info -n
idle=$(dds-info --idle-count)
echo "Idle slots: $idle"
if [ "$idle" -ge 8 ] 2>/dev/null; then
echo "All slots ready"
break
fi
squeue || true
sleep 5
done
dds-info -l
dds-info -n
dds-session stop
'
- name: Build and test
run: |
sind exec odc -- bash -lc '\
cd /data && \
DDS_RMS="<rms>slurm</rms><configFile>/data/tests/slurm.cfg</configFile><agents>2</agents><slots>4</slots>" \
ctest -S ODCTest.cmake -VV --output-on-failure \
-DLABEL=slurm-integration \
-DNCPUS=2 \
'
- name: Collect logs on failure
if: failure()
run: |
mkdir -p build/logs
sind exec odc -- bash -c 'cp -r ~/.ODC/ /data/build/logs/ODC 2>/dev/null; cp -r ~/.DDS/ /data/build/logs/DDS 2>/dev/null' || true
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-slurm-integration
path: |
build/logs/
build/tmp/
if-no-files-found: ignore
retention-days: 7
- uses: GSI-HPC/sind-action/cleanup@v1
if: always()