From f3fff9a3c3f0881b8da6a1c084672a02e3c041b2 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 5 Aug 2024 13:10:25 -0400 Subject: [PATCH] Split CI build workflows into separate files. Added MPI backend test. --- .github/workflows/build-cuda.yml | 18 ++++++++++++++ .github/workflows/build-mpi.yml | 25 +++++++++++++++++++ .github/workflows/build-serial-omp.yml | 30 +++++++++++++++++++++++ .github/workflows/build.yml | 34 -------------------------- 4 files changed, 73 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/build-cuda.yml create mode 100644 .github/workflows/build-mpi.yml create mode 100644 .github/workflows/build-serial-omp.yml delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build-cuda.yml b/.github/workflows/build-cuda.yml new file mode 100644 index 00000000..fe5baad9 --- /dev/null +++ b/.github/workflows/build-cuda.yml @@ -0,0 +1,18 @@ +name: Build and Test CUDA Backend + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + schedule: + - cron: '30 8 * * *' + +jobs: + build-cuda: + runs-on: self-hosted + steps: + - uses: actions/checkout@v4 + - name: Run batch file + run: cd tests/misc && chmod +x run-crnch-cuda.sh && sbatch run-crnch-cuda.sh + \ No newline at end of file diff --git a/.github/workflows/build-mpi.yml b/.github/workflows/build-mpi.yml new file mode 100644 index 00000000..40e299c8 --- /dev/null +++ b/.github/workflows/build-mpi.yml @@ -0,0 +1,25 @@ +name: Build and Test MPI Backend + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + schedule: + - cron: '30 8 * * *' + +jobs: + build-and-run-mpi: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: awalsh128/cache-apt-pkgs-action@latest #Add OpenMPI to test against + with: + packages: openmpi-bin libopenmpi-dev + version: 1.0 + - name: Build-MPI + run: + cmake -DUSE_MPI=1 -B build_mpi -S . && make -C build_mpi + - name: Test-MPI + run: make test -C build_mpi + \ No newline at end of file diff --git a/.github/workflows/build-serial-omp.yml b/.github/workflows/build-serial-omp.yml new file mode 100644 index 00000000..ab9d0600 --- /dev/null +++ b/.github/workflows/build-serial-omp.yml @@ -0,0 +1,30 @@ +name: Build and Test Serial and OpenMP backends + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + schedule: + - cron: '30 8 * * *' + +jobs: + build-and-run-serial: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build-Serial + run: cmake -B build_serial_gnu -S . && make -C build_serial_gnu + - name: Test-Serial + run: make test -C build_serial_gnu + + build-and-run-omp: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build-OMP + run: + cmake -DUSE_OPENMP=1 -B build_omp_gnu -S . && make -C build_omp_gnu + - name: Test-OMP + run: make test -C build_omp_gnu + \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 2d005ce5..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Build - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - schedule: - - cron: '30 8 * * *' - -jobs: - build-and-run-serial: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - name: Build-Serial - run: cmake -DBACKEND=serial -DCOMPILER=gnu -B build_serial_gnu -S . && make -C build_serial_gnu - - name: Test-Serial - run: make test -C build_serial_gnu - build-and-run-omp: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - name: Build-OMP - run: - cmake -DBACKEND=openmp -DCOMPILER=gnu -B build_omp_gnu -S . && make -C build_omp_gnu - - name: Test-OMP - run: make test -C build_omp_gnu - build-cuda: - runs-on: self-hosted - steps: - - uses: actions/checkout@v4 - - name: Run batch file - run: cd tests/misc && chmod +x run-crnch-cuda.sh && sbatch run-crnch-cuda.sh