Skip to content

Commit 64dc28e

Browse files
committed
Merge branch 'develop' of github.com:lanl/jaybenne into brryan/darwin_ci
2 parents 1df7ba9 + aaa7907 commit 64dc28e

File tree

6 files changed

+208
-167
lines changed

6 files changed

+208
-167
lines changed

.github/workflows/ci.yml

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
#=========================================================================================
2+
# (C) (or copyright) 2023-2024. Triad National Security, LLC. All rights reserved.
3+
# This program was produced under U.S. Government contract 89233218CNA000001
4+
# for Los Alamos National Laboratory (LANL), which is operated by Triad
5+
# National Security, LLC for the U.S. Department of Energy/National
6+
# Nuclear Security Administration. All rights in the program are
7+
# reserved by Triad National Security, LLC, and the U.S. Department of
8+
# Energy/National Nuclear Security Administration. The Government is
9+
# granted for itself and others acting on its behalf a nonexclusive,
10+
# paid-up, irrevocable worldwide license in this material to reproduce,
11+
# prepare derivative works, distribute copies to the public, perform
12+
# publicly and display publicly, and to permit others to do so.
13+
#=========================================================================================
14+
15+
# This file was created in whole or in part by one of OpenAI's generative AI models.
16+
17+
name: CI
18+
19+
on:
20+
push:
21+
branches: [ "main" ]
22+
pull_request:
23+
24+
# Cancel outdated workflows
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
# -------------------------------------------
31+
# 1) CI Format job
32+
# -------------------------------------------
33+
ci_format:
34+
# If you want to skip if the PR title has 'Draft:' or 'WIP:',
35+
# you can approximate with the condition below.
36+
if: >
37+
github.event_name == 'pull_request' &&
38+
(!
39+
(
40+
contains(github.event.pull_request.title, 'Draft:') ||
41+
contains(github.event.pull_request.title, 'WIP:')
42+
)
43+
) ||
44+
github.event_name == 'push'
45+
runs-on: ubuntu-latest
46+
47+
# If you need HPC resources, set up a self-hosted runner here:
48+
# runs-on: self-hosted
49+
# or
50+
# runs-on: [self-hosted, darwin-slurm-shared]
51+
52+
# Equivalent to 'variables:' in GitLab
53+
env:
54+
GIT_SUBMODULE_STRATEGY: recursive
55+
SCHEDULER_PARAMETERS: "--nodes 1 --partition=skylake-gold"
56+
57+
steps:
58+
- name: Check out code (with submodules)
59+
uses: actions/checkout@v3
60+
with:
61+
submodules: true
62+
63+
- name: Set up environment
64+
run: |
65+
source env/bash
66+
67+
- name: Format
68+
run: |
69+
VERBOSE=1 ./style/format.sh
70+
71+
- name: Check for changes
72+
run: |
73+
git diff --exit-code --ignore-submodules
74+
75+
# -------------------------------------------
76+
# 2) CI CPU job
77+
# -------------------------------------------
78+
ci_cpu:
79+
# If you wanted it to run only if ci_format succeeded:
80+
needs: ci_format
81+
# Or skip if 'Draft:' or 'WIP:' in PR title
82+
if: >
83+
github.event_name == 'pull_request' &&
84+
(!
85+
(
86+
contains(github.event.pull_request.title, 'Draft:') ||
87+
contains(github.event.pull_request.title, 'WIP:')
88+
)
89+
) ||
90+
github.event_name == 'push'
91+
runs-on: ubuntu-latest
92+
env:
93+
GIT_SUBMODULE_STRATEGY: recursive
94+
SCHEDULER_PARAMETERS: "--nodes 1 --partition=skylake-gold"
95+
96+
steps:
97+
- name: Check out code (with submodules)
98+
uses: actions/checkout@v3
99+
with:
100+
submodules: recursive
101+
102+
- name: Install dependencies
103+
run: |
104+
sudo apt-get update -qq
105+
sudo apt-get install -qq --no-install-recommends tzdata
106+
sudo apt-get install -qq git
107+
sudo apt-get install -qq make cmake g++
108+
sudo apt-get install -qq libopenmpi-dev libhdf5-openmpi-dev
109+
sudo apt-get install -qq openssh-client
110+
sudo apt-get install -qq python3 python3-numpy python3-h5py python3-matplotlib
111+
112+
- name: Build Jaybenne
113+
run: |
114+
cd tst
115+
mkdir -p build
116+
cd build
117+
cmake -DPARTHENON_DISABLE_HDF5_COMPRESSION=ON -DCMAKE_BUILD_TYPE=Release ../../
118+
make -j 4
119+
echo "JAYBENNE_EXECUTABLE=$(pwd)/mcblock" >> $GITHUB_ENV
120+
cd ..
121+
122+
- name: stepdiff tests
123+
run: |
124+
cd tst
125+
./stepdiff.py --executable $JAYBENNE_EXECUTABLE \
126+
--input ../inputs/stepdiff.in --use_mpiexec
127+
./stepdiff.py --executable $JAYBENNE_EXECUTABLE \
128+
--input ../inputs/stepdiff_ddmc.in --use_mpiexec
129+
./stepdiff_smr.py --executable $JAYBENNE_EXECUTABLE \
130+
--input ../inputs/stepdiff_smr.in --use_mpiexec
131+
./stepdiff_smr.py --executable $JAYBENNE_EXECUTABLE \
132+
--input ../inputs/stepdiff_smr_ddmc.in --use_mpiexec
133+
./stepdiff_smr.py --executable $JAYBENNE_EXECUTABLE \
134+
--input ../inputs/stepdiff_smr_ddmc.in --use_mpiexec \
135+
--mpi_nthreads 8 --mpi_oversubscribe
136+
./stepdiff_smr.py --executable $JAYBENNE_EXECUTABLE \
137+
--input ../inputs/stepdiff_smr_hybrid.in --use_mpiexec
138+
./stepdiff_smr.py --executable $JAYBENNE_EXECUTABLE \
139+
--input ../inputs/stepdiff_smr_hybrid.in --use_mpiexec \
140+
--mpi_nthreads 8 --mpi_oversubscribe

.gitlab-ci.yml

-82
This file was deleted.

.gitlab/merge_request_templates/Default.md

-17
This file was deleted.

0 commit comments

Comments
 (0)