From 7e2b8d1205e5a48e46964412ff0f8c18b9782171 Mon Sep 17 00:00:00 2001 From: TheAssembler1 Date: Tue, 16 Jun 2026 16:49:53 +0000 Subject: [PATCH 1/3] ci: add Spack installation and test workflow (closes #235) --- .github/workflows/spack-install.yml | 72 +++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/spack-install.yml diff --git a/.github/workflows/spack-install.yml b/.github/workflows/spack-install.yml new file mode 100644 index 000000000..ef4518ba0 --- /dev/null +++ b/.github/workflows/spack-install.yml @@ -0,0 +1,72 @@ +name: Spack Installation + +on: + pull_request: + branches: + - develop + - stable + push: + branches: + - develop + - stable + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + spack-install-and-test: + name: Spack Install + Test (Ubuntu) + runs-on: ubuntu-22.04 + timeout-minutes: 90 + + steps: + - name: Checkout PDC + uses: actions/checkout@v4 + + - name: Set up Spack + uses: spack/setup-spack@v3 + with: + buildcache: true + + # Install all PDC dependencies from Spack's binary cache. + # We skip PDC itself and build it below with CMake so that + # BUILD_TESTING=ON and run_test.sh work out of the box. + - name: Install PDC dependencies via Spack + run: | + spack install --only dependencies pdc \ + ^libfabric fabrics=sockets,tcp,udp,rxm + + # Capture the full Spack load environment (PATH, LD_LIBRARY_PATH, + # PKG_CONFIG_PATH, etc.) into a file we can source in later steps. + - name: Capture Spack environment + run: | + spack load --sh --only dependencies pdc \ + ^libfabric fabrics=sockets,tcp,udp,rxm \ + > $GITHUB_WORKSPACE/spack-env.sh + echo "=== spack-env.sh ===" + cat $GITHUB_WORKSPACE/spack-env.sh + + - name: Build PDC with tests + run: | + source $GITHUB_WORKSPACE/spack-env.sh + mkdir build && cd build + cmake ../ \ + -DBUILD_MPI_TESTING=ON \ + -DBUILD_SHARED_LIBS=ON \ + -DPDC_SERVER_CACHE=ON \ + -DBUILD_TESTING=ON \ + -DPDC_ENABLE_MPI=ON \ + -DCMAKE_C_COMPILER=mpicc \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + make -j$(nproc) + + # run_test.sh (called by every CTest entry) backgrounds pdc_server, + # runs the client binary, then calls close_server — so ctest handles + # the full server lifecycle automatically. + - name: Run serial tests + working-directory: build + run: | + source $GITHUB_WORKSPACE/spack-env.sh + ctest -L serial --output-on-failure From 3dab48d271709988a20e8c0df828954be455cbea Mon Sep 17 00:00:00 2001 From: TheAssembler1 Date: Tue, 16 Jun 2026 16:58:55 +0000 Subject: [PATCH 2/3] fix spack bug --- .github/workflows/spack-install.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/spack-install.yml b/.github/workflows/spack-install.yml index ef4518ba0..91b39cbb5 100644 --- a/.github/workflows/spack-install.yml +++ b/.github/workflows/spack-install.yml @@ -30,20 +30,14 @@ jobs: with: buildcache: true - # Install all PDC dependencies from Spack's binary cache. - # We skip PDC itself and build it below with CMake so that - # BUILD_TESTING=ON and run_test.sh work out of the box. - name: Install PDC dependencies via Spack run: | spack install --only dependencies pdc \ ^libfabric fabrics=sockets,tcp,udp,rxm - # Capture the full Spack load environment (PATH, LD_LIBRARY_PATH, - # PKG_CONFIG_PATH, etc.) into a file we can source in later steps. - name: Capture Spack environment run: | - spack load --sh --only dependencies pdc \ - ^libfabric fabrics=sockets,tcp,udp,rxm \ + spack load --sh openmpi libfabric mercury boost \ > $GITHUB_WORKSPACE/spack-env.sh echo "=== spack-env.sh ===" cat $GITHUB_WORKSPACE/spack-env.sh @@ -62,9 +56,6 @@ jobs: -DCMAKE_POLICY_VERSION_MINIMUM=3.5 make -j$(nproc) - # run_test.sh (called by every CTest entry) backgrounds pdc_server, - # runs the client binary, then calls close_server — so ctest handles - # the full server lifecycle automatically. - name: Run serial tests working-directory: build run: | From cb63120a2baf2712a489f9f119d0b5d68c5a0d9e Mon Sep 17 00:00:00 2001 From: TheAssembler1 <47840925+TheAssembler1@users.noreply.github.com> Date: Tue, 11 Aug 2026 15:18:51 -0500 Subject: [PATCH 3/3] Update spack-install.yml --- .github/workflows/spack-install.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/spack-install.yml b/.github/workflows/spack-install.yml index 91b39cbb5..8ce4a6d91 100644 --- a/.github/workflows/spack-install.yml +++ b/.github/workflows/spack-install.yml @@ -39,6 +39,8 @@ jobs: run: | spack load --sh openmpi libfabric mercury boost \ > $GITHUB_WORKSPACE/spack-env.sh + echo "export CPATH=$(spack location -i boost)/include:\$CPATH" \ + >> $GITHUB_WORKSPACE/spack-env.sh echo "=== spack-env.sh ===" cat $GITHUB_WORKSPACE/spack-env.sh