Skip to content

Commit d935fa1

Browse files
authored
Merge pull request #2604 from boutproject/v5.0.0-rc
BOUT++ v5.0.0 release candidate
2 parents ea1f962 + 779ed3c commit d935fa1

File tree

1,476 files changed

+109016
-107948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,476 files changed

+109016
-107948
lines changed

.ci_fedora.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/sh
2+
## Copied script from arpack-ng. Please submit fixes also to
3+
## arpack-ng (if applicable)
4+
## -e : Make sure all errors cause the script to fail
5+
## -x be verbose; write what we are doing, as we do it
6+
set -ex
7+
## Should we init a container?
8+
if [ ".$1" = .setup ] || [ ".$1" = .podman ]
9+
then
10+
# fedora
11+
# note: when you PR, docker-cp provides, in the container, the branch associated with the PR (not master where there's nothing new)
12+
# 1. docker create --name mobydick IMAGE CMD <=> create a container (= instance of image) but container is NOT yet started
13+
# 2. docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp <=> copy git repository (CI worker, checkout-ed on PR branch) into the container
14+
# note: docker-cp works only if copy from/to containers (not images)
15+
# 3. docker start -a mobydick <=> start to run the container (initialized with docker-cp)
16+
if test $1 = podman ; then
17+
cmd=podman
18+
else
19+
cmd="sudo docker"
20+
fi
21+
test . != ".$2" && mpi="$2" || mpi=openmpi
22+
test . != ".$3" && version="$3" || version=latest
23+
time $cmd pull registry.fedoraproject.org/fedora:$version
24+
time $cmd create --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
25+
--name mobydick registry.fedoraproject.org/fedora:$version \
26+
/tmp/BOUT-dev/.ci_fedora.sh $mpi
27+
time $cmd cp ${TRAVIS_BUILD_DIR} mobydick:/tmp
28+
time $cmd start -a mobydick
29+
exit 0
30+
fi
31+
32+
test . != ".$1" && mpi="$1" || mpi=openmpi
33+
34+
## If we are called as root, setup everything
35+
if [ $UID -eq 0 ]
36+
then
37+
cat /etc/os-release
38+
# Ignore weak depencies
39+
echo "install_weak_deps=False" >> /etc/dnf/dnf.conf
40+
time dnf -y install dnf-plugins-core python3-pip cmake
41+
# Allow to override packages - see #2073
42+
time dnf copr enable -y davidsch/fixes4bout || :
43+
time dnf -y upgrade
44+
time dnf -y builddep bout++
45+
useradd test
46+
cp -a /tmp/BOUT-dev /home/test/
47+
chown -R test /home/test
48+
chmod u+rwX /home/test -R
49+
sudo -u test ${0/\/tmp/\/home\/test} $mpi
50+
## If we are called as normal user, run test
51+
else
52+
pip install --user zoidberg
53+
. /etc/profile.d/modules.sh
54+
module load mpi/${1}-x86_64
55+
export OMPI_MCA_rmaps_base_oversubscribe=yes
56+
export TRAVIS=true
57+
export FLEXIBLAS=NETLIB
58+
cd
59+
cd BOUT-dev
60+
echo "starting configure"
61+
time cmake -DBOUT_USE_PETSC=ON -S . -B build
62+
time make -C build build-check -j 2
63+
time make -C build check
64+
fi

.travis_script.sh renamed to .ci_script.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ MMS=0
1010
TESTS=0
1111
MAIN_TARGET=
1212
UPDATE_SCRIPT=0
13+
CONFIGURE_SHELL=
1314

1415
usage() {
1516
echo "$0 options are: "
@@ -19,7 +20,7 @@ usage() {
1920
}
2021

2122
#Handle input flags
22-
while getopts "cuimt:5" arg;
23+
while getopts "cuimt:5s:" arg;
2324
do
2425
case $arg in
2526
c) ### Run the coverage-post job tasks
@@ -43,13 +44,16 @@ do
4344
5) ### Run the update to version 5 script
4445
UPDATE_SCRIPT=1
4546
;;
47+
s) ### Use specific shell to configure
48+
CONFIGURE_SHELL="$OPTARG"
49+
;;
4650
*) ### Show usage message
4751
usage
4852
;;
4953
esac
5054
done
5155

52-
./.build_sundials_for_travis.sh
56+
./.build_sundials_for_ci.sh
5357

5458
if test $UPDATE_SCRIPT -gt 0
5559
then
@@ -71,7 +75,7 @@ echo "****************************************"
7175
echo "Configuring with $CONFIGURE_OPTIONS"
7276
echo "****************************************"
7377
conf=0
74-
time ./configure $CONFIGURE_OPTIONS MAKEFLAGS="$MAKEFLAGS" || conf=$?
78+
time $CONFIGURE_SHELL ./configure $CONFIGURE_OPTIONS MAKEFLAGS="$MAKEFLAGS" || conf=$?
7579
if test $conf -gt 0
7680
then
7781
RED_FG="\033[031m"
@@ -113,11 +117,6 @@ do
113117
fi
114118
done
115119

116-
if [[ ${TESTS} == 1 ]]
117-
then
118-
time make build-check
119-
fi
120-
121120
if [[ ${UNIT} == 1 ]]
122121
then
123122
time make check-unit-tests

.ci_with_cmake.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,23 @@ cd ../examples/make-script
1313
PATH=../../build/bin:$PATH make
1414
./test --help
1515
cd -
16-
make install -j 2
16+
# Test bout++Config.cmake
17+
cd ../examples/conduction
18+
cmake . -B build -DCMAKE_PREFIX_PATH=../../build
19+
cmake --build build
20+
./build/conduction
1721
cd -
22+
23+
make install -j 2
24+
rm -rf build
25+
# Test installation with plain `make`
26+
cd ../examples/make-script
1827
rm test
1928
PATH=../../installed/bin:$PATH make
2029
./test --help
30+
cd -
31+
# Test installation with CMake
32+
cd ../examples/conduction
33+
cmake . -B build -DCMAKE_PREFIX_PATH=../../installed
34+
cmake --build build
35+
./build/conduction

.clang-format

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ IndentCaseLabels: false
7676
# IndentPPDirectives: None
7777
IndentWidth: 2
7878
IndentWrappedFunctionNames: false
79+
# requires clang-format 15+
80+
# InsertBraces: true
7981
KeepEmptyLinesAtTheStartOfBlocks: true
8082
MacroBlockBegin: ''
8183
MacroBlockEnd: ''
@@ -91,7 +93,7 @@ PenaltyBreakString: 1000
9193
PenaltyExcessCharacter: 1000000
9294
PenaltyReturnTypeOnItsOwnLine: 60
9395
PointerAlignment: Left
94-
ReflowComments: true
96+
ReflowComments: false
9597
SortIncludes: true
9698
# SortUsingDeclarations: true
9799
SpaceAfterCStyleCast: false
@@ -105,7 +107,8 @@ SpacesInContainerLiterals: true
105107
SpacesInCStyleCastParentheses: false
106108
SpacesInParentheses: false
107109
SpacesInSquareBrackets: false
108-
Standard: Cpp11
110+
StatementMacros:
111+
- BOUT_OMP
112+
Standard: c++14
109113
TabWidth: 8
110114
UseTab: Never
111-
...

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Clang-format whole repo
2+
d8f14fdddb5ca0fbb32d8e2bf5ac2960d6ac5ce6
3+
ed2117e6d6826a98b6988e2f18c0c34e408563b6

.github/workflows/black-fix.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: black
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.py'
7+
- 'bin/**'
8+
- '**/runtest'
9+
- '**/run'
10+
- 'tests/integrated/test_suite'
11+
- 'tests/requirements/*'
12+
- 'tools/tokamak_grids/**'
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
black:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
ref: ${{ github.head_ref }}
26+
27+
- name: Install black
28+
run: |
29+
sudo apt update -y
30+
sudo apt -y install python3-pip python3-setuptools python3-wheel
31+
pip3 install black
32+
33+
- name: Version
34+
run: |
35+
python3 --version
36+
$HOME/.local/bin/black --version
37+
38+
- name: Run black
39+
run: |
40+
pwd
41+
ls
42+
$HOME/.local/bin/black tests/ tools/ $(grep -EIlr '^#!.*python.*$' bin/ tests/ tools/ src/ | grep -v _boutpp_build)
43+
44+
- uses: stefanzweifel/git-auto-commit-action@v4
45+
with:
46+
commit_message: "Apply black changes"

.github/workflows/clang-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
# Checkout the pull request branch, also include all history
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
with:
1616
ref: ${{ github.head_ref }}
1717
fetch-depth: 0

.github/workflows/clang-tidy-review.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
paths:
66
- '**.cxx'
77
- '**.hxx'
8+
branches-ignore:
9+
# Release candidate branches tend to have big PRs which causes all sorts of problems
10+
- 'v*rc'
811

912
concurrency:
1013
group: ${{ github.workflow }}-${{ github.ref }}
@@ -14,7 +17,7 @@ jobs:
1417
review:
1518
runs-on: ubuntu-latest
1619
steps:
17-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
1821
with:
1922
submodules: true
2023

@@ -29,13 +32,15 @@ jobs:
2932
# the unit tests until they're fixed or ignored upstream
3033
exclude: "tests/unit/*cxx"
3134
cmake_command: |
32-
git config --global --add safe.directory '*' &&
35+
pip install cmake && \
36+
cmake --version && \
37+
git config --global --add safe.directory "$GITHUB_WORKSPACE" && \
3338
cmake . -B build -DBUILD_SHARED_LIBS=ON \
34-
-DBOUT_ENABLE_OPENMP=ON \
3539
-DBOUT_USE_PETSC=ON \
3640
-DBOUT_USE_SLEPC=ON \
3741
-DBOUT_USE_SUNDIALS=ON \
3842
-DBOUT_BUILD_EXAMPLES=ON \
3943
-DBOUT_BUILD_DOCS=OFF \
4044
-DBOUT_ENABLE_PYTHON=OFF \
41-
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
45+
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \
46+
-DBOUT_UPDATE_GIT_SUBMODULE=OFF

0 commit comments

Comments
 (0)