forked from boutproject/BOUT-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into next-run-id
* next: (310 commits) Note removing support for HDF5 in changelog Better notation for indexing zShift Update note on zShift in grid-files section of manual Print error for HDF5 macros when running bout-v5-macro-upgrader.py Support macros being removed in bout-v5-macro-upgrader.py Remove HDF5 support Removed bout_runners from repo, and redirected to project site Allow test-options-netcdf on Fedora Add missing brackets in test-options-netcdf Skip test-io when using legacy netCDF interface clang-format FCIMap constructor Add braces around conditional body Pass dy by reference Guard OptionsNetCDF test against legacy netcdf Cache index offsets in FCI boundary loop Invert conditional in FCI boundary calculation Convert nested-loop to BOUT_FOR in FCI Make local variables const Pass dy down into FCIMap Remove some unused code from FCI ...
- Loading branch information
Showing
399 changed files
with
8,760 additions
and
48,226 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,50 @@ | ||
name: clang-format-command | ||
on: | ||
repository_dispatch: | ||
types: [clang-format-command] | ||
jobs: | ||
clang-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the pull request branch | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.client_payload.pull_request.head.ref }} | ||
# Fetch the merge base too, or git clang-format won't have anything to compare to! | ||
- run: | | ||
git fetch --no-tags --prune --depth=1 origin ${{ github.event.client_payload.pull_request.base.sha }} | ||
# This also installs git-clang-format | ||
- name: Install clang-format | ||
run: sudo apt install clang-format | ||
|
||
# git-clang-format is a bit annoying and doesn't have a proper "quiet" or "check" mode | ||
# So we have to hope that the "nothing to do" message doesn't change ever | ||
- name: Run clang-format | ||
id: format | ||
run: | | ||
if [[ $(git clang-format-9 --quiet --diff ${{ github.event.client_payload.pull_request.base.sha }}) != "no modified files to format" ]]; then | ||
echo "::set-output name=format::true" | ||
else | ||
echo "::set-output name=format::false" | ||
fi | ||
# Execute clang-format and commit the change to the PR branch | ||
- name: Commit to the PR branch | ||
if: steps.format.outputs.format == 'true' | ||
run: | | ||
git clang-format-9 ${{ github.event.client_payload.pull_request.base.sha }} | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
git commit -am "[clang-format-command] fixes" | ||
git push | ||
- name: Add reaction | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
reaction-type: hooray |
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,51 @@ | ||
name: clang-tidy-review | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
review: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
PETSC_DIR: /usr/lib/petscdir/3.7.7/x86_64-linux-gnu-real | ||
PETSC_ARCH: "" | ||
SLEPC_DIR: /usr/lib/slepcdir/3.7.4/x86_64-linux-gnu-real | ||
SLEPC_ARCH: "" | ||
steps: | ||
- name: Install dependencies | ||
run: sudo apt update && | ||
sudo apt install -y | ||
libfftw3-dev | ||
libnetcdf-dev | ||
libnetcdf-c++4-dev | ||
netcdf-bin | ||
openmpi-bin | ||
libopenmpi-dev | ||
petsc-dev | ||
slepc-dev | ||
liblapack-dev | ||
libparpack2-dev | ||
libsundials-dev | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Create compile_commands.json | ||
run: | | ||
cmake --version | ||
cmake . -B build -DBUILD_SHARED_LIBS=ON \ | ||
-DBOUT_ENABLE_OPENMP=ON \ | ||
-DBOUT_USE_PETSC=ON \ | ||
-DBOUT_USE_SLEPC=ON \ | ||
-DBOUT_USE_SUNDIALS=ON \ | ||
-DBOUT_BUILD_EXAMPLES=ON \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS=On | ||
- name: Run clang-tidy | ||
uses: ZedThree/[email protected] | ||
id: review | ||
with: | ||
build_dir: build | ||
apt_packages: "libfftw3-dev,libnetcdf-c++4-dev,libopenmpi-dev,petsc-dev,slepc-dev,liblapack-dev,libparpack2-dev,libsundials-dev" | ||
clang_tidy_checks: '-*,performance-*,readability-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-*,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers' | ||
|
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,16 @@ | ||
name: Slash Command Dispatch | ||
on: | ||
issue_comment: | ||
types: [created] | ||
jobs: | ||
slashCommandDispatch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Slash Command Dispatch | ||
uses: peter-evans/slash-command-dispatch@v1 | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
reaction-token: ${{ secrets.GITHUB_TOKEN }} | ||
commands: clang-format | ||
issue-type: pull-request |
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,187 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
standard_tests: | ||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
env: | ||
BOUT_TEST_TIMEOUT: "6m" | ||
PETSC_DIR: /usr/lib/petscdir/3.7.7/x86_64-linux-gnu-real | ||
PETSC_ARCH: "" | ||
SLEPC_DIR: /usr/lib/slepcdir/3.7.4/x86_64-linux-gnu-real | ||
SLEPC_ARCH: "" | ||
OMP_NUM_THREADS: ${{ matrix.config.omp_num_threads }} | ||
PYTHONPATH: ${{ github.workspace }}/tools/pylib | ||
OMPI_MCA_rmaps_base_oversubscribe: yes | ||
MPIRUN: mpiexec -np | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Need this to be able to exclude the coverage job | ||
is_master_or_next: | ||
- ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next' || github.base_ref == 'master' || github.base_ref == 'next' }} | ||
config: | ||
- name: "Default options" | ||
os: ubuntu-18.04 | ||
configure_options: "--with-petsc | ||
--with-slepc | ||
--with-sundials=/home/runner/local" | ||
script_flags: "-uim" | ||
|
||
- name: "Optimised, shared, Python" | ||
os: ubuntu-18.04 | ||
configure_options: "--enable-shared | ||
--enable-checks=no | ||
--enable-optimize=3 | ||
--disable-signal | ||
--disable-track | ||
--disable-backtrace | ||
--with-petsc | ||
--with-slepc | ||
--with-sundials=/home/runner/local" | ||
script_flags: "-uim -t shared -t python" | ||
|
||
- name: "Debug, shared" | ||
os: ubuntu-18.04 | ||
configure_options: "--enable-shared | ||
--enable-sigfpe | ||
--enable-debug | ||
--enable-track | ||
--with-petsc | ||
--with-slepc | ||
--with-sundials=/home/runner/local" | ||
script_flags: "-uim" | ||
|
||
- name: "OpenMP, shared" | ||
os: ubuntu-18.04 | ||
configure_options: "--enable-shared | ||
--enable-openmp | ||
--with-petsc | ||
--with-slepc | ||
--with-sundials=/home/runner/local" | ||
script_flags: "-uim" | ||
omp_num_threads: 2 | ||
|
||
- name: "CMake, shared, Ubuntu 20.04" | ||
os: ubuntu-20.04 | ||
cmake_options: "-DBUILD_SHARED_LIBS=ON | ||
-DBOUT_ENABLE_OPENMP=ON | ||
-DBOUT_USE_PETSC=ON | ||
-DBOUT_USE_SLEPC=ON | ||
-DBOUT_USE_SUNDIALS=ON | ||
-DSUNDIALS_ROOT=/home/runner/local" | ||
omp_num_threads: 2 | ||
|
||
- name: "Coverage" | ||
os: ubuntu-18.04 | ||
configure_options: "--enable-shared | ||
--enable-code-coverage | ||
--enable-debug | ||
--enable-track | ||
--with-lapack | ||
--with-petsc | ||
--with-slepc | ||
--with-sundials=/home/runner/local" | ||
script_flags: "-u" | ||
exclude: | ||
# Don't run the coverage tests if the branch isn't master or next | ||
- is_master_or_next: false | ||
config: | ||
name: "Coverage" | ||
|
||
steps: | ||
- name: Job information | ||
run: | | ||
echo Build: ${{ matrix.config.name }}, ${{ matrix.config.os }} | ||
echo Configure options: ${{ matrix.config.configure_options }} | ||
echo CMake options: ${{ matrix.config.cmake_options }} | ||
- name: Install dependencies | ||
run: sudo apt update && | ||
sudo apt install -y | ||
libfftw3-dev | ||
libnetcdf-dev | ||
libnetcdf-c++4-dev | ||
netcdf-bin | ||
python3 | ||
python3-pip | ||
python3-pytest | ||
python3-numpy | ||
python3-scipy | ||
lcov | ||
openmpi-bin | ||
libopenmpi-dev | ||
petsc-dev | ||
slepc-dev | ||
liblapack-dev | ||
libparpack2-dev | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install pip packages | ||
run: | | ||
./.pip_install_for_travis.sh 'cython~=0.29' 'netcdf4~=1.5' 'sympy~=1.5' 'gcovr' 'cmake' 'h5py' | ||
# Add the pip install location to the runner's PATH | ||
echo ~/.local/bin >> $GITHUB_PATH | ||
- name: Cache SUNDIALS build | ||
uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/local | ||
key: bout-sundials-${{ matrix.config.os }} | ||
|
||
- name: Build SUNDIALS | ||
run: ./.build_sundials_for_travis.sh | ||
|
||
- name: Build (configure) | ||
if: ${{ ! contains(matrix.config.name, 'CMake') }} | ||
run: ./.travis_script.sh ${{ matrix.config.script_flags }} | ||
env: | ||
LD_LIBRARY_PATH: /home/runner/local/lib:$LD_LIBRARY_PATH | ||
CONFIGURE_OPTIONS: ${{ matrix.config.configure_options }} | ||
|
||
- name: Build (CMake) | ||
if: ${{ contains(matrix.config.name, 'CMake') }} | ||
run: | | ||
cmake --version | ||
cmake . -B build ${{ matrix.config.cmake_options }} | ||
cmake --build build --target build-check -j 2 | ||
cd build | ||
ctest --output-on-failure --timeout 300 | ||
- name: Capture coverage | ||
if: ${{ matrix.config.name == 'Coverage' }} | ||
# Explicitly run the coverage capture target, because | ||
# travis_script.sh also does the upload, and we're going to do | ||
# that ourselves in the next step | ||
run: | | ||
# Ensure that there is a corresponding .gcda file for every .gcno file | ||
# This is to try and make the coverage report slightly more accurate | ||
# It still won't include, e.g. any solvers we don't build with though | ||
find . -name "*.gcno" -exec sh -c 'touch -a "${1%.gcno}.gcda"' _ {} \; | ||
make code-coverage-capture | ||
- name: Upload coverage | ||
if: ${{ matrix.config.name == 'Coverage' }} | ||
uses: codecov/codecov-action@v1 | ||
|
||
Fedora: | ||
# This is its own job as it doesn't use most of the steps of the | ||
# standard_tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Build Fedora rawhide | ||
run: ./.travis_fedora.sh setup mpich rawhide | ||
shell: bash | ||
env: | ||
TRAVIS_BUILD_DIR: ${{ github.workspace }} |
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
Oops, something went wrong.