Skip to content

Commit 35d8335

Browse files
Merge pull request #40 from hsaunders1904/hsaunders1904/attempt_to_reduce_ci_run_time
Attempt to reduce CI run time
2 parents 1006ddf + b5fa448 commit 35d8335

File tree

14 files changed

+56
-43
lines changed

14 files changed

+56
-43
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build-test:
1212
runs-on: ubuntu-latest
1313
container:
14-
image: quay.io/ukaea/hippo:6eb722b71542e6100fd7
14+
image: quay.io/ukaea/hippo:5c52a671f8e9a3f81a74
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -42,7 +42,6 @@ jobs:
4242
shell: bash
4343
run: |
4444
. /opt/openfoam/OpenFOAM-12/etc/bashrc || true
45-
pip install -r requirements.test.txt
4645
./run_tests
4746
4847
- name: Docs

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
repos:
22
- repo: https://github.com/pre-commit/mirrors-clang-format
3-
rev: v16.0.6
3+
rev: v19.1.7
44
hooks:
55
- id: clang-format
66
args: ["--style=file"]
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v4.4.0
8+
rev: v5.0.0
99
hooks:
1010
- id: check-yaml
1111
# Only check for syntax, do not load.
@@ -27,7 +27,7 @@ repos:
2727
# whitespace in the first place.
2828
exclude: "(.*/gold/.*)|(.*/[0-9]+/.*)"
2929
- repo: https://github.com/Lucas-C/pre-commit-hooks
30-
rev: v1.5.4
30+
rev: v1.5.5
3131
hooks:
3232
- id: remove-crlf
3333
- id: forbid-tabs

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ It provides tools for solving coupled conjugate heat transfer problems.
66
Some simple 1 and 2D validation cases can be found in
77
[the tests](https://github.com/aurora-multiphysics/hippo/tree/main/test/tests/multiapps).
88

9+
## Using Hippo
10+
11+
Hippo's documentation is a work in progress,
12+
and can be found [here](https://aurora-multiphysics.github.io/hippo/).
13+
It includes an example of how to set up
14+
a coupled conjugate heat transfer problem.
15+
916
## Install/Build
1017

1118
Note: Only tested with GCC.
@@ -135,10 +142,10 @@ you may run into errors when running Hippo.
135142
Hippo input files that run a MOOSE case do not require a Kernel or variables.
136143
However, MOOSE will still happily go off and calculate a residual.
137144
Since there are no variables defined,
138-
the residual calculation results in a division by vero and an FPE signal.
145+
the residual calculation results in a division by zero and an FPE signal.
139146
OpenFOAM will catch this signal and abort the application.
140147

141-
There are two workarounds for this problem:
148+
Either of these two workarounds will work:
142149

143150
1. Disable trapping for floating point exceptions.
144151
`unset FOAM_SIGFPE && unset FOAM_SETNAN`.
@@ -153,8 +160,3 @@ There are two workarounds for this problem:
153160
[]
154161
[]
155162
```
156-
157-
"Fork hippo" to create a new MOOSE-based application.
158-
159-
For more information see:
160-
[http://mooseframework.org/create-an-app/](http://mooseframework.org/create-an-app/)

doc/content/developer_guide.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ Hippo's CI environment.
1818
This environment does not contain Hippo itself,
1919
as it is used for testing the build.
2020

21+
The Docker image should be built using the
22+
[deploy-docker](https://github.com/aurora-multiphysics/hippo/actions/workflows/deploy-docker.yaml)
23+
GitHub action.
24+
Developers should tag the Docker image with the first 20 characters of
25+
the Git revision they are building the image with.
26+
Once the image has been built and [pushed to Quay.io](#quayio),
27+
a developer should open a PR that updates `.github/ci.yml`
28+
to use the new tag.
29+
Once that PR has passed the CI it can be merged.
30+
The newest version of the Docker image can then be tagged
31+
with `latest` on Quay.io.
32+
2133
### Quay.io
2234

2335
The built docker image is stored under

doc/content/index.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@ A MOOSE multiapp wrapping OpenFOAM for conjugate heat transfer problems.
66

77
## Installation
88

9-
Build instructions can be found in the repository's README.
9+
Build instructions can be found in the repository's
10+
[README](https://github.com/aurora-multiphysics/hippo/blob/main/README.md).
11+
12+
Alternatively, you can use Hippo in a Docker container.
13+
An image with all of Hippo's dependencies pre-installed
14+
can be found on [quay.io](https://quay.io/repository/ukaea/hippo).
15+
You will need to mount and install Hippo within the container.
16+
17+
```shell
18+
$ git clone https://github.com/aurora-multiphysics/hippo.git
19+
$ docker run -it -v $(pwd)/hippo:/opt/hippo quay.io/ukaea/hippo:latest bash
20+
$ make -j
21+
$ hippo-opt --help
22+
```
1023

1124
## Setting Up a Case
1225

docker/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ COPY ./scripts/openfoam-prefs.sh /root/.OpenFOAM/prefs.sh
9999
RUN bash ./scripts/install-openfoam.sh -o /opt/openfoam -s
100100

101101
# Python linting and testing requirements
102-
RUN conda install --yes --file requirements.test.txt \
103-
&& conda install --yes pre-commit
102+
COPY ./requirements.test.txt ./requirements.test.txt
103+
RUN conda install pre-commit --file requirements.test.txt -S --yes
104+
105+
# Pull down MOOSE's 'large_media' submodule for building docs
106+
RUN git -C "${MOOSE_DIR}" submodule update --init large_media
104107

105108
ENTRYPOINT ["/bin/bash", "-c", "source /opt/openfoam/OpenFOAM-12/etc/bashrc && \"$@\"", "-s"]

include/base/FoamProblem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class FoamProblem : public ExternalProblem
1818
virtual void externalSolve() override;
1919
virtual void syncSolutions(Direction /* dir */) override;
2020
virtual bool converged(const unsigned int nl_sys_num) override { return true; }
21-
virtual void addExternalVariables() override{};
21+
virtual void addExternalVariables() override {};
2222
// Want to be able to share the object from here so we don't
2323
// have to pass the args around and problem is available in
2424
// other objects

include/mesh/Foam2MooseMeshGen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FoamPoint
2525
int32_t _gid = -1;
2626

2727
public:
28-
FoamPoint(double x0, double x1, double x2, int32_t id) : _pos{x0, x1, x2}, _gid(id){};
28+
FoamPoint(double x0, double x1, double x2, int32_t id) : _pos{x0, x1, x2}, _gid(id) {};
2929
FoamPoint() {}
3030

3131
libMesh::Point get_point() const { return libMesh::Point(_pos[0], _pos[1], _pos[2]); }

requirements.test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
fluidfoam>=0.2.8
2-
scipy>=1.15.1
2+
scipy

src/main.C

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,13 @@
99

1010
#include "hippoTestApp.h"
1111

12-
#include <MooseInit.h>
13-
#include <Moose.h>
14-
#include <MooseApp.h>
15-
#include <AppFactory.h>
12+
#include <MooseMain.h>
1613

1714
// Create a performance log
1815
PerfLog Moose::perf_log("hippo");
1916

20-
// Begin the main program.
2117
int
2218
main(int argc, char * argv[])
2319
{
24-
// Initialize MPI, solvers and MOOSE
25-
MooseInit init(argc, argv);
26-
27-
// Register this application's MooseApp and any it depends on
28-
hippoTestApp::registerApps();
29-
30-
// Create an instance of the application and store it in a smart pointer for easy cleanup
31-
std::shared_ptr<MooseApp> app = AppFactory::createAppShared("hippoTestApp", argc, argv);
32-
33-
// Execute the application
34-
app->run();
35-
36-
return 0;
20+
return Moose::main<hippoTestApp>(argc, argv);
3721
}

0 commit comments

Comments
 (0)