updates CI test and scripts #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NERSC / Perlmutter (no cache) | ||
on: | ||
push: | ||
workflow_dispatch: | ||
concurrency: | ||
group: "${{ github.ref }}" | ||
cancel-in-progress: true | ||
env: | ||
GOOGLE_CREDENTIALS: "${{ secrets.GOOGLE_CREDENTIALS }}" | ||
GOOGLE_SPREADSHEET_ID: "${{ secrets.GOOGLE_SPREADSHEET_ID }}" | ||
PDC_TMPDIR: "${{ github.workspace }}/${{ github.run_id }}/pdc-tmp-paralell-pdc" | ||
PDC_DATA_LOC: "${{ github.workspace }}/${{ github.run_id }}/pdc-data-paralell-pdc" | ||
SCHEDULER_PARAMETERS: "-A ${{ secrets.NERSC_PERLMUTTER_PROJECT }} --qos=debug --constraint=cpu -N 1 -t 00:30:00 -W" | ||
MERCURY_DIR: "/global/cfs/cdirs/${{ secrets.NERSC_PERLMUTTER_PROJECT }}/pdc-perlmutter/mercury/install" | ||
foundation | ||
jobs: | ||
build: | ||
runs-on: | ||
- self-hosted | ||
- perlmutter | ||
environment: NERSC | ||
timeout-minutes: 2880 | ||
steps: | ||
- uses: actions/checkout@v4.1.0 | ||
- run: | | ||
module list | ||
mkdir -p build install | ||
cd build | ||
cmake .. \ | ||
-DCMAKE_C_COMPILER=cc \ | ||
-DCMAKE_INSTALL_PREFIX=$(realpath ..)/install \ | ||
-DBUILD_MPI_TESTING=ON \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DPDC_SERVER_CACHE=OFF \ | ||
-DBUILD_TESTING=ON \ | ||
-DPDC_ENABLE_MPI=ON \ | ||
-DMERCURY_DIR=$MERCURY_DIR \ | ||
-DMPI_RUN_CMD="srun -A ${{ secrets.NERSC_PERLMUTTER_PROJECT }} --qos=debug --constraint=cpu" | ||
make -j | ||
make install | ||
- uses: actions/upload-artifact@v4.1.0 | ||
if: success() | ||
with: | ||
name: "no-cache" | ||
path: | | ||
${{ github.workspace }}/build | ||
${{ github.workspace }}/install | ||
test: | ||
needs: | ||
- build | ||
runs-on: | ||
- self-hosted | ||
- perlmutter | ||
environment: NERSC | ||
timeout-minutes: 2880 | ||
steps: | ||
- uses: actions/download-artifact@v4.1.0 | ||
- run: | | ||
cat <<EOF > .${{ github.run_id }}.slurm | ||
#!/bin/sh | ||
export LD_LIBRARY_PATH="$MERCURY_DIR/lib:$LD_LIBRARY_PATH" | ||
cd ${{ github.workspace }}/no-cache/build | ||
ctest | ||
rm -rf ${PDC_TMPDIR} ${PDC_DATA_LOC} | ||
EOF | ||
sbatch $SCHEDULER_PARAMETERS .${{ github.run_id }}.slurm |