-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
3 changed files
with
145 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,70 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{github.event_name == 'pull_request'}} | ||
|
||
jobs: | ||
CI: | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
distro: ['ubuntu:latest'] | ||
cxx: ['g++'] | ||
cmake_build_type: ['Debug', 'Release'] | ||
runs-on: ubuntu-20.04 | ||
container: ghcr.io/ecp-copa/ci-containers/${{ matrix.distro }} | ||
steps: | ||
- name: Install bzip2 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y bzip2 | ||
sudo apt-get clean | ||
- name: Cache boost | ||
uses: actions/cache@v2 | ||
id: boost-cache | ||
with: | ||
path: ~/boost | ||
key: boost-${{ matrix.distro }}-1.75.0 | ||
restore-keys: boost-${{ matrix.distro }} | ||
- name: Get Boost | ||
if: steps.boost-cache.outputs.cache-hit != 'true' | ||
run: | | ||
wget --quiet https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.bz2 \ | ||
--output-document=boost.tar.bz2 | ||
mkdir boost | ||
tar -xf boost.tar.bz2 -C boost --strip-components=1 | ||
- name: Build Boost | ||
if: steps.boost-cache.outputs.cache-hit != 'true' | ||
working-directory: boost | ||
run: | | ||
./bootstrap.sh --prefix=$HOME/boost | ||
./b2 \ | ||
hardcode-dll-paths=true dll-path=$HOME/boost/lib \ | ||
link=shared variant=release cxxflags=-w \ | ||
install | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Build | ||
run: | | ||
cmake -B build \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/thermo4pfm \ | ||
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \ | ||
-DCMAKE_PREFIX_PATH="$HOME/boost" \ | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | ||
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic" \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} | ||
cmake --build build --parallel 2 | ||
cmake --install build | ||
- name: Test | ||
run: | | ||
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target 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,63 @@ | ||
name: Nightly | ||
on: | ||
push: | ||
branches: | ||
- nightly_testing | ||
schedule: | ||
- cron: '0 9 * * 1' | ||
|
||
jobs: | ||
CI: | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
distro: ['ubuntu:latest'] | ||
cmake_build_type: ['Debug'] | ||
runs-on: ubuntu-20.04 | ||
container: ghcr.io/ecp-copa/ci-containers/${{ matrix.distro }} | ||
steps: | ||
- name: Install bzip2 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y bzip2 | ||
sudo apt-get clean | ||
- name: Cache boost | ||
uses: actions/cache@v2 | ||
id: boost-cache | ||
with: | ||
path: ~/boost | ||
key: boost-${{ matrix.distro }}-1.75.0 | ||
restore-keys: boost-${{ matrix.distro }} | ||
- name: Get Boost | ||
if: steps.boost-cache.outputs.cache-hit != 'true' | ||
run: | | ||
wget --quiet https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.bz2 \ | ||
--output-document=boost.tar.bz2 | ||
mkdir boost | ||
tar -xf boost.tar.bz2 -C boost --strip-components=1 | ||
- name: Build Boost | ||
if: steps.boost-cache.outputs.cache-hit != 'true' | ||
working-directory: boost | ||
run: | | ||
./bootstrap.sh --prefix=$HOME/boost | ||
./b2 \ | ||
hardcode-dll-paths=true dll-path=$HOME/boost/lib \ | ||
link=shared variant=release cxxflags=-w \ | ||
install | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Build | ||
run: | | ||
cmake -B build \ | ||
-DCMAKE_INSTALL_PREFIX=$HOME/thermo4pfm \ | ||
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \ | ||
-DCMAKE_PREFIX_PATH="$HOME/boost" \ | ||
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic" \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} | ||
cmake --build build --parallel 2 | ||
cmake --install build | ||
- name: Test | ||
run: | | ||
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target 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,12 @@ | ||
name: Clang-Format Check | ||
on: [pull_request] | ||
jobs: | ||
formatting-check: | ||
name: Formatting Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run clang-format style check | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: '6' |