-
Notifications
You must be signed in to change notification settings - Fork 8
136 lines (130 loc) · 4.95 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# ========================================================================================
# (C) (or copyright) 2024. Triad National Security, LLC. All rights reserved.
#
# This program was produced under U.S. Government contract 89233218CNA000001 for Los
# Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC
# for the U.S. Department of Energy/National Nuclear Security Administration. All rights
# in the program are reserved by Triad National Security, LLC, and the U.S. Department
# of Energy/National Nuclear Security Administration. The Government is granted for
# itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide
# license in this material to reproduce, prepare derivative works, distribute copies to
# the public, perform publicly and display publicly, and to permit others to do so.
# ========================================================================================
# This file was created in part or in whole by one of OpenAI's generative AI models
name: Continuous Integration
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
ci_format_job:
if: >
${{ !contains(github.event.pull_request.title, 'Draft:') &&
!contains(github.event.pull_request.title, 'WIP:') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify the Python version you need
- name: Install dependencies
run: |
pip install black
- name: Run format check
run: |
source env/bash
VERBOSE=1 ./style/format.sh
git diff --exit-code --ignore-submodules
ci_cpu_job:
if: >
${{ !contains(github.event.pull_request.title, 'Draft:') &&
!contains(github.event.pull_request.title, 'WIP:') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq --no-install-recommends tzdata
sudo apt-get install -qq git
sudo apt-get install -qq make cmake g++
sudo apt-get install -qq libopenmpi-dev libhdf5-openmpi-dev
sudo apt-get install -qq openssh-client
sudo apt-get install -qq python3 python3-numpy python3-h5py python3-matplotlib
- name: Set up environment
run: |
source env/bash
- name: Run CPU tests
run: |
cd tst
python3 run_tests.py regression.suite \
--save_build \
--make_nproc=4 \
--cmake=-DCMAKE_C_COMPILER=gcc \
--cmake=-DCMAKE_CXX_COMPILER=g++ \
--log_file=ci_cpu_log.txt
- name: Upload CPU test log
if: always()
uses: actions/upload-artifact@v3
with:
name: ci_cpu_log.txt
path: tst/ci_cpu_log.txt
retention-days: 3
- name: Upload figures
if: always()
uses: actions/upload-artifact@v3
with:
name: figs
path: tst/figs
retention-days: 3
# ci_gpu_job:
# if: >
# ${{ !contains(github.event.pull_request.title, 'Draft:') &&
# !contains(github.event.pull_request.title, 'WIP:') }}
# runs-on: ubuntu-latest # Update to a runner with GPU support if available
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Install dependencies
# run: |
# sudo apt-get update -qq
# sudo apt-get install -qq --no-install-recommends tzdata
# sudo apt-get install -qq git
# sudo apt-get install -qq make cmake g++
# sudo apt-get install -qq libopenmpi-dev libhdf5-openmpi-dev
# sudo apt-get install -qq openssh-client
# sudo apt-get install -qq python3 python3-numpy python3-h5py python3-matplotlib
# sudo apt-get install -qq -y cuda
# sudo apt-get install -qq -y nvidia-driver-525
# - name: Set up environment
# run: |
# source env/bash
# - name: Run GPU tests
# run: |
# cd tst
# python3 run_tests.py gpu.suite \
# --save_build \
# --make_nproc=32 \
# --cmake=-DARTEMIS_ENABLE_CUDA=On \
# --cmake=-DKokkos_ARCH_VOLTA70=On \
# --cmake=-DCMAKE_CXX_COMPILER=$GITHUB_WORKSPACE/external/parthenon/external/Kokkos/bin/nvcc_wrapper \
# --log_file=ci_gpu_log.txt
# - name: Upload GPU test log
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: ci_gpu_log.txt
# path: tst/ci_gpu_log.txt
# retention-days: 3
# - name: Upload figures
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: figs
# path: tst/figs
# retention-days: 3