-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96acf74
commit 5b5e83b
Showing
4 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: GitHub Actions CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- feature-gh-actions | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
|
||
linux: | ||
runs-on: ubuntu-latest | ||
container: ${{ matrix.container }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_JOBNAME: ${{ matrix.jobname }} | ||
GH_OS: Linux | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
jobname: [ | ||
ubuntu22-gcc, | ||
ubuntu22-clang, | ||
] | ||
include: | ||
- jobname: ubuntu22-gcc | ||
container: | ||
image: ghcr.io/philipfackler/xolotl-ci:ubuntu22-dev | ||
options: -u root | ||
- jobname: ubuntu22-clang | ||
container: | ||
image: ghcr.io/philipfackler/xolotl-ci:ubuntu22-dev | ||
options: -u root | ||
|
||
steps: | ||
- name: Checkout Action | ||
uses: actions/checkout@v1 | ||
|
||
- name: Configure | ||
run: CI/scripts/run_step.sh configure | ||
|
||
- name: Build | ||
run: CI/scripts/run_step.sh build | ||
|
||
- name: Test | ||
run: CI/scripts/run_step.sh test | ||
|
||
|
||
macos: | ||
runs-on: macos-latest | ||
env: | ||
GH_YML_JOBNAME: ${{ matrix.jobname }} | ||
GH_YML_OS: macOS | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
jobname: [ | ||
macos1015-xcode11 | ||
] | ||
|
||
steps: | ||
- name: Checkout Action | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup Dependencies | ||
run: | | ||
brew install boost open-mpi hdf5-mpi make python@3.10 | ||
echo "PATH=/opt/homebrew/opt/python@3.10/libexec/bin:$PATH" >> $GITHUB_ENV | ||
- name: Configure | ||
run: CI/scripts/run_step.sh configure | ||
env: | ||
PATH: ${{ env.PATH }} | ||
|
||
- name: Build | ||
run: CI/scripts/run_step.sh build | ||
|
||
- name: Test | ||
run: CI/scripts/run_step.sh test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Install dependencies | ||
RUN apt-get update -y | ||
RUN apt-get upgrade -y | ||
RUN apt-get install -y \ | ||
python3 \ | ||
clang \ | ||
clang-tidy \ | ||
g++ \ | ||
git \ | ||
gdb \ | ||
make \ | ||
cmake \ | ||
cmake-curses-gui \ | ||
mpi-default-dev \ | ||
libblas-dev \ | ||
liblapack-dev \ | ||
libhdf5-mpi-dev \ | ||
libboost-filesystem-dev \ | ||
libboost-program-options-dev \ | ||
libboost-test-dev \ | ||
libboost-log-dev \ | ||
bzip2 \ | ||
sudo | ||
|
||
RUN useradd -mr -u 10000 builduser | ||
RUN adduser builduser sudo | ||
RUN echo "builduser:builduser" | chpasswd | ||
|
||
USER builduser | ||
WORKDIR /home/builduser |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
echo -e "\nCheck gcc and clang compilers\n" | ||
gcc --version | ||
clang --version | ||
|
||
case "$1" in | ||
|
||
configure) | ||
|
||
case "${GH_JOBNAME}" in | ||
*"clang"*) | ||
export CC=clang | ||
export CXX=clang++ | ||
export OMPI_CC=${C_COMPILER} | ||
export OMPI_CXX=${CXX_COMPILER} | ||
;; | ||
*) | ||
;; | ||
esac | ||
|
||
/usr/bin/env python3 --version | ||
|
||
cd ${GITHUB_WORKSPACE}/.. | ||
|
||
git clone https://gitlab.com/petsc/petsc.git -b v3.21.6 petsc | ||
cd petsc | ||
bash ${GITHUB_WORKSPACE}/../xolotl/scripts/build_petsc.sh \ | ||
--prefix=${GITHUB_WORKSPACE}/../install \ | ||
--skip-pull | ||
|
||
cd ${GITHUB_WORKSPACE}/.. | ||
mkdir build | ||
cd build | ||
|
||
git describe --tags | ||
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/../install ${GITHUB_WORKSPACE} | ||
|
||
;; | ||
|
||
build) | ||
cd ${GITHUB_WORKSPACE}/../build | ||
make -j4 | ||
;; | ||
|
||
test) | ||
cd ${GITHUB_WORKSPACE}/../build | ||
ctest -VV --label-exclude xolotl.tests.system | ||
./test/system/SystemTester -- -t | ||
;; | ||
|
||
*) | ||
echo " Invalid step" "$1" | ||
exit -1 | ||
;; | ||
esac |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
#include <xolotl/util/IStepSequence.h> | ||
|
||
namespace xolotl | ||
|