Skip to content

Commit

Permalink
More fixes (#174)
Browse files Browse the repository at this point in the history
* Updated compile flag for test.

* Updated setup files for pyDASolvers to remove warnings.

* Fixed more warnings.

* Changed docker test to u1804.

* Changed the test version to 1804
  • Loading branch information
friedenhe authored Sep 20, 2021
1 parent 8b34967 commit 3e706b4
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
code_coverage:
runs-on: ubuntu-20.04
runs-on: ubuntu-18.04
name: Codecov
strategy:
fail-fast: false
Expand All @@ -33,19 +33,19 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.6
- name: Create the docker container and run the tests
run: |
docker pull dafoam/opt-packages:${{env.DOCKER_TAG}}
docker run -i -d -u dafoamuser --name regtest -v $GITHUB_WORKSPACE:${{env.DOCKER_MOUNT_DIR}} dafoam/opt-packages:${{env.DOCKER_TAG}} /bin/bash
docker exec -i regtest /bin/bash -c "rm -rf ${{env.DOCKER_WORKING_DIR}} && cp -r ${{env.DOCKER_MOUNT_DIR}} ${{env.DOCKER_WORKING_DIR}}"
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && pip install coverage"
docker exec regtest sed -i 's/-std=c++11/-std=c++11 -coverage/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Incompressible
docker exec regtest sed -i 's/-lOpenFOAM$(DF_LIB_SUFFIX)/-lOpenFOAM$(DF_LIB_SUFFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Incompressible
docker exec regtest sed -i 's/-lfiniteVolume$(DF_LIB_SUFFIX)/-lfiniteVolume$(DF_LIB_SUFFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Incompressible
docker exec regtest sed -i 's/-std=c++11/-std=c++11 -coverage/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Compressible
docker exec regtest sed -i 's/-lOpenFOAM$(DF_LIB_SUFFIX)/-lOpenFOAM$(DF_LIB_SUFFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Compressible
docker exec regtest sed -i 's/-lfiniteVolume$(DF_LIB_SUFFIX)/-lfiniteVolume$(DF_LIB_SUFFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Compressible
docker exec regtest sed -i 's/-std=c++11/-std=c++11 -coverage/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Solid
docker exec regtest sed -i 's/-lOpenFOAM$(DF_LIB_SUFFIX)/-lOpenFOAM$(DF_LIB_SUFFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Solid
docker exec regtest sed -i 's/-lfiniteVolume$(DF_LIB_SUFFIX)/-lfiniteVolume$(DF_LIB_SUFFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/Make/options_Solid
docker exec -i regtest /bin/bash -c "cd ${{env.DOCKER_WORKING_DIR}}/src && cp -r adjoint adjointAD && cp -r pyDASolvers pyDASolversAD"
if [ "${{matrix.args}}" = "forward" ]; then
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && cd ${{env.DOCKER_WORKING_DIR}} && ./Allmake incompressible"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reg_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
jobs:

reg_tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-18.04
name: Tests
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions src/pyDASolvers/setup_Compressible.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
# All other flags for OpenFOAM, users don't need to touch this
extra_compile_args=[
"-std=c++11",
"-Wno-deprecated-copy",
"-DCompressibleFlow",
"-m64",
"-DOPENFOAM_PLUS=1812",
Expand Down
1 change: 1 addition & 0 deletions src/pyDASolvers/setup_Incompressible.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
# All other flags for OpenFOAM, users don't need to touch this
extra_compile_args=[
"-std=c++11",
"-Wno-deprecated-copy",
"-DIncompressibleFlow",
"-m64",
"-DOPENFOAM_PLUS=1812",
Expand Down
1 change: 1 addition & 0 deletions src/pyDASolvers/setup_Solid.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
# All other flags for OpenFOAM, users don't need to touch this
extra_compile_args=[
"-std=c++11",
"-Wno-deprecated-copy",
"-DSolidDASolver",
"-m64",
"-DOPENFOAM_PLUS=1812",
Expand Down
1 change: 1 addition & 0 deletions src/utilities/coloring/pyColoringCompressible/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
# All other flags for OpenFOAM, users don't need to touch this
extra_compile_args=[
"-std=c++11",
"-Wno-deprecated-copy",
"-DCompressibleFlow",
"-m64",
"-DOPENFOAM_PLUS=1812",
Expand Down
1 change: 1 addition & 0 deletions src/utilities/coloring/pyColoringIncompressible/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
# All other flags for OpenFOAM, users don't need to touch this
extra_compile_args=[
"-std=c++11",
"-Wno-deprecated-copy",
"-DIncompressibleFlow",
"-m64",
"-DOPENFOAM_PLUS=1812",
Expand Down
1 change: 1 addition & 0 deletions src/utilities/coloring/pyColoringSolid/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
# All other flags for OpenFOAM, users don't need to touch this
extra_compile_args=[
"-std=c++11",
"-Wno-deprecated-copy",
"-DSolidDASolver",
"-m64",
"-DOPENFOAM_PLUS=1812",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ EXE_INC = \
-std=c++11 \
-Wno-old-style-cast \
-Wno-conversion-null \
-Wno-deprecated-copy \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ EXE_INC = \
-std=c++11 \
-Wno-old-style-cast \
-Wno-conversion-null \
-Wno-deprecated-copy \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
Expand Down
2 changes: 1 addition & 1 deletion tests/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[coverage:run]
parallel = true
include = /home/dafoamuser/dafoam/packages/miniconda3/lib/python3.7/site-packages/dafoam/pyDAFoam.py, /home/dafoamuser/dafoam/packages/miniconda3/lib/python3.7/site-packages/dafoam/optFuncs.py
include = /home/dafoamuser/dafoam/packages/miniconda3/lib/python3.6/site-packages/dafoam/pyDAFoam.py, /home/dafoamuser/dafoam/packages/miniconda3/lib/python3.6/site-packages/dafoam/optFuncs.py

0 comments on commit 3e706b4

Please sign in to comment.