Skip to content

Commit

Permalink
Merge pull request #2783 from boutproject/master-into-next
Browse files Browse the repository at this point in the history
Master into next
  • Loading branch information
dschwoerer authored Oct 18, 2023
2 parents 3af0045 + 2fa93cd commit bd75280
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 22 deletions.
7 changes: 4 additions & 3 deletions .build_petsc_for_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
set -e

if test $BUILD_PETSC ; then
if [[ ! -d $HOME/local/petsc/include/petsc ]]; then
if [[ ! -d $HOME/local/petsc/include/petsc ]] || test $1 ; then
echo "****************************************"
echo "Building PETSc"
echo "****************************************"

git clone -b release https://gitlab.com/petsc/petsc.git petsc --depth=1
branch=${1:-release}
git clone -b $branch https://gitlab.com/petsc/petsc.git petsc --depth=1

unset PETSC_DIR
unset PETSC_ARCH
Expand All @@ -34,7 +35,7 @@ if test $BUILD_PETSC ; then
echo "Building SLEPc"
echo "****************************************"

git clone -b release https://gitlab.com/slepc/slepc.git slepc --depth=1
git clone -b $branch https://gitlab.com/slepc/slepc.git slepc --depth=1

pushd slepc
unset SLEPC_DIR
Expand Down
1 change: 1 addition & 0 deletions .ci_fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ then
test . != ".$3" && version="$3" || version=rawhide
time $cmd pull registry.fedoraproject.org/fedora:$version
time $cmd create --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
--shm-size 256M \
--name mobydick registry.fedoraproject.org/fedora:$version \
/tmp/BOUT-dev/.ci_fedora.sh $mpi
time $cmd cp ${TRAVIS_BUILD_DIR:-$(pwd)} mobydick:/tmp/BOUT-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/black-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
ls
$HOME/.local/bin/black tests/ tools/ $(grep -EIlr '^#!.*python.*$' bin/ tests/ tools/ src/ | grep -v _boutpp_build)
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Apply black changes"
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
run: git clang-format origin/${{ github.base_ref }}

- name: Commit to the PR branch
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Apply clang-format changes"
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
submodules: true

- name: Run clang-tidy
uses: ZedThree/clang-tidy-review@v0.13.1
uses: ZedThree/clang-tidy-review@v0.14.0
id: review
with:
build_dir: build
Expand All @@ -46,4 +46,4 @@ jobs:
-DBOUT_UPDATE_GIT_SUBMODULE=OFF
- name: Upload clang-tidy fixes
uses: ZedThree/clang-tidy-review/upload@v0.13.1
uses: ZedThree/clang-tidy-review/upload@v0.14.0
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,22 @@ jobs:
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@master
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@879dcbb708d40f8b8679d4f7941b938a086e23a7
uses: docker/metadata-action@master
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
prefix=${{ matrix.mpi }}-${{matrix.metric3d.tag_prefix}}${{ matrix.config.tag_postfix }}-
- name: Build and push Docker image
uses: docker/build-push-action@0f847266c302569530c95bfa228489494c43b002
uses: docker/build-push-action@master
with:
build-args: |
BASE=${{ matrix.mpi }}-${{ matrix.metric3d.base_prefix }}${{ matrix.config.base_postfix }}-main
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
- name: Install dependencies
run: python -m pip install --upgrade pip &&
pip install --upgrade build &&
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
- name: Install dependencies
run: python -m pip install --upgrade pip &&
pip install --upgrade build &&
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
- name: Install dependencies
run: python -m pip install --upgrade pip &&
pip install --upgrade build &&
Expand Down
42 changes: 39 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Tests
on: [push, pull_request]
on:
push:
pull_request:
schedule:
# run sunday moring
- cron: '30 6 * * 0'

defaults:
run:
Expand Down Expand Up @@ -30,10 +35,29 @@ jobs:
# 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' }}
is_cron:
- ${{ github.event_name == 'cron' }}
config:
- name: "CMake, PETSc unreleased"
os: ubuntu-20.04
cmake_options: "-DBUILD_SHARED_LIBS=ON
-DBOUT_ENABLE_METRIC_3D=ON
-DBOUT_ENABLE_OPENMP=ON
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_ENABLE_PYTHON=ON
-DSUNDIALS_ROOT=/home/runner/local
-DPETSC_DIR=/home/runner/local/petsc
-DSLEPC_DIR=/home/runner/local/slepc"
build_petsc: -petsc-main
build_petsc_branch: main
on_cron: true

- name: "Default options, Ubuntu 20.04"
os: ubuntu-20.04
cmake_options: ""
on_cron: false

- name: "Optimised, static"
os: ubuntu-20.04
Expand All @@ -47,6 +71,7 @@ jobs:
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DSUNDIALS_ROOT=/home/runner/local"
on_cron: false

- name: "Debug, shared"
os: ubuntu-20.04
Expand All @@ -58,6 +83,7 @@ jobs:
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DSUNDIALS_ROOT=/home/runner/local"
on_cron: false

- name: "Shared, release, Ubuntu 20.04"
os: ubuntu-20.04
Expand All @@ -70,6 +96,7 @@ jobs:
-DBOUT_BUILD_DOCS=OFF
-DSUNDIALS_ROOT=/home/runner/local"
omp_num_threads: 2
on_cron: false

- name: "Shared, OpenMP, 3D metrics"
os: ubuntu-latest
Expand All @@ -82,6 +109,7 @@ jobs:
-DBOUT_ENABLE_PYTHON=ON
-DSUNDIALS_ROOT=/home/runner/local"
omp_num_threads: 2
on_cron: false

- name: "CMake, new PETSc"
os: ubuntu-20.04
Expand All @@ -95,8 +123,8 @@ jobs:
-DSUNDIALS_ROOT=/home/runner/local
-DPETSC_DIR=/home/runner/local/petsc
-DSLEPC_DIR=/home/runner/local/slepc"

build_petsc: -petsc
on_cron: false

- name: "Coverage"
os: ubuntu-20.04
Expand All @@ -111,11 +139,15 @@ jobs:
-DBOUT_ENABLE_PYTHON=ON
-DSUNDIALS_ROOT=/home/runner/local"
unit_only: YES
on_cron: false
exclude:
# Don't run the coverage tests if the branch isn't master or next
- is_master_or_next: false
config:
name: "Coverage"
- is_cron: true
config:
on_cron: false

steps:
- name: Job information
Expand Down Expand Up @@ -147,6 +179,10 @@ jobs:
with:
submodules: true

- uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install pip packages
run: |
./.pip_install_for_ci.sh 'cython~=0.29' 'netcdf4~=1.5' 'sympy~=1.5' 'gcovr' 'cmake' zoidberg fastcov
Expand All @@ -163,7 +199,7 @@ jobs:
run: ./.build_sundials_for_ci.sh

- name: Build PETSc
run: BUILD_PETSC=${{ matrix.config.build_petsc }} ./.build_petsc_for_ci.sh
run: BUILD_PETSC=${{ matrix.config.build_petsc }} ./.build_petsc_for_ci.sh ${{ matrix.config.build_petsc_branch }}

- name: Build BOUT++
run: UNIT_ONLY=${{ matrix.config.unit_only }} ./.ci_with_cmake.sh ${{ matrix.config.cmake_options }}
Expand Down
4 changes: 3 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ sphinx:

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.8
install:
- requirements: manual/sphinx/requirements.txt


build:
os: ubuntu-22.04
tools:
python: "3.8"
apt_packages:
- mpich
- libmpich-dev
Expand Down
2 changes: 1 addition & 1 deletion externalpackages/fmt
Submodule fmt updated 83 files
+8 −0 .github/dependabot.yml
+3 −2 .github/pull_request_template.md
+30 −0 .github/workflows/cifuzz.yml
+12 −1 .github/workflows/doc.yml
+42 −11 .github/workflows/linux.yml
+20 −2 .github/workflows/macos.yml
+65 −0 .github/workflows/scorecard.yml
+59 −14 .github/workflows/windows.yml
+99 −48 CMakeLists.txt
+5,282 −0 ChangeLog.md
+0 −4,738 ChangeLog.rst
+1 −1 LICENSE
+60 −39 README.rst
+11 −2 doc/CMakeLists.txt
+299 −186 doc/api.rst
+6 −7 doc/build.py
+1 −1 doc/index.rst
+138 −12 doc/syntax.rst
+1 −1 include/fmt/args.h
+471 −345 include/fmt/chrono.h
+28 −89 include/fmt/color.h
+46 −114 include/fmt/compile.h
+921 −1,275 include/fmt/core.h
+104 −1,035 include/fmt/format-inl.h
+1,874 −770 include/fmt/format.h
+0 −2 include/fmt/locale.h
+45 −75 include/fmt/os.h
+95 −86 include/fmt/ostream.h
+211 −193 include/fmt/printf.h
+319 −174 include/fmt/ranges.h
+468 −8 include/fmt/std.h
+80 −58 include/fmt/xchar.h
+38 −29 src/fmt.cc
+15 −77 src/format.cc
+101 −71 src/os.cc
+3 −3 support/Vagrantfile
+0 −43 support/appveyor-build.py
+0 −31 support/appveyor.yml
+0 −1 support/bazel/.bazelrc
+1 −1 support/bazel/.bazelversion
+1 −2 support/bazel/BUILD.bazel
+5 −4 support/bazel/README.md
+1 −1 support/build.gradle
+0 −54 support/cmake/cxx14.cmake
+4 −1 support/cmake/fmt-config.cmake.in
+7 −1 support/manage.py
+0 −159 support/rst2md.py
+32 −7 test/CMakeLists.txt
+1 −1 test/add-subdirectory-test/CMakeLists.txt
+1 −1 test/args-test.cc
+406 −33 test/chrono-test.cc
+4 −4 test/compile-error-test/CMakeLists.txt
+2 −1 test/compile-fp-test.cc
+32 −39 test/compile-test.cc
+125 −242 test/core-test.cc
+18 −0 test/detect-stdfs.cc
+2 −0 test/enforce-checks-test.cc
+1 −1 test/find-package-test/CMakeLists.txt
+204 −92 test/format-impl-test.cc
+333 −370 test/format-test.cc
+1 −1 test/fuzzing/CMakeLists.txt
+2 −2 test/fuzzing/one-arg.cc
+2 −2 test/fuzzing/two-args.cc
+3 −1 test/gtest-extra-test.cc
+1 −6 test/gtest-extra.h
+1 −7 test/gtest/CMakeLists.txt
+2 −2 test/gtest/gmock-gtest-all.cc
+2 −2 test/mock-allocator.h
+36 −88 test/module-test.cc
+24 −69 test/os-test.cc
+50 −57 test/ostream-test.cc
+2 −8 test/posix-mock-test.cc
+0 −2 test/posix-mock.h
+14 −37 test/printf-test.cc
+194 −69 test/ranges-test.cc
+1 −1 test/scan-test.cc
+17 −14 test/scan.h
+1 −1 test/static-export-test/CMakeLists.txt
+250 −2 test/std-test.cc
+4 −4 test/unicode-test.cc
+1 −2 test/util.cc
+2 −6 test/util.h
+226 −98 test/xchar-test.cc
2 changes: 1 addition & 1 deletion externalpackages/googletest
2 changes: 1 addition & 1 deletion externalpackages/mpark.variant
2 changes: 1 addition & 1 deletion tools/pylib/boutconfig/__init__.py.cin
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ for k, v in config.items():
has = {}
for k in config:
if k.startswith("has_"):
has[k[4:]] = _yesno[config[k]]
has[k[4:]] = _yesno[config[k].upper()]


def isMetric2D():
Expand Down

0 comments on commit bd75280

Please sign in to comment.