Skip to content

Commit

Permalink
Merge pull request #10 from lanl/brryan/github_workflows
Browse files Browse the repository at this point in the history
Move remainder of CI to github
  • Loading branch information
brryan authored Nov 14, 2024
2 parents 9737637 + b44c50c commit 6496d7b
Show file tree
Hide file tree
Showing 34 changed files with 694 additions and 283 deletions.
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Background

## Description of Changes

## Checklist

- [ ] New features are documented
- [ ] Tests added for bug fixes and new features
- [ ] (@lanl.gov employees) Update copyright on changed files
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# ========================================================================================
# (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]

# Cancel outdated workflows
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
format:
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
cpu:
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: Run CPU tests
run: |
export MAKE_PROGRAM=make
cd tst
mkdir -p build
cd build
cmake --preset=cpu-release ../../
make -j 4
cd ..
python3 run_tests.py regression.suite \
--exe build/src/artemis \
--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
14 changes: 13 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# ========================================================================================
# (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.
# ========================================================================================

name: Build And Deploy Docs

Expand Down Expand Up @@ -31,5 +43,5 @@ jobs:
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_dir: ./public
force_orphan: true
70 changes: 70 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# ========================================================================================
# (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: Nightly Tests

on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight; adjust as needed

jobs:
cpu:
runs-on: ubuntu-latest
env:
MAKE_PROGRAM: ${{ env.MAKE_PROGRAM || 'make' }}
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: Update Parthenon submodule
run: |
cd external/parthenon
git pull origin develop
echo "==> Current Parthenon commit hash:"
git rev-parse HEAD
- name: Run CPU tests
run: |
cd tst
mkdir -p build
cd build
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc ../../
make -j 4
cd ..
python3 run_tests.py regression.suite \
--exe build/src/artemis \
--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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ debug*
doc/_build/*
doc/src/parameters.rst

# CI files
artemis_ci_*.out
tst/figs

# Visualization package files
.smhist

Expand Down
189 changes: 0 additions & 189 deletions .gitlab-ci.yml

This file was deleted.

Loading

0 comments on commit 6496d7b

Please sign in to comment.