Skip to content

Commit

Permalink
Merge branch 'upstream-master' into core/improve-master-slave-constra…
Browse files Browse the repository at this point in the history
…ints
  • Loading branch information
matekelemen committed Jan 18, 2024
2 parents 72007d1 + fbc4184 commit a9a5da1
Show file tree
Hide file tree
Showing 464 changed files with 490,563 additions and 13,116 deletions.
10 changes: 7 additions & 3 deletions .github/get_files_changed_in_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

def get_files_changed_in_pr(pr_number: int) -> list[str]:
# from: https://stackoverflow.com/questions/25071579/list-all-files-changed-in-a-pull-request-in-git-github

modified_files: list[str] = []

try:
process_output: str = subprocess.run(
[
Expand All @@ -19,14 +22,15 @@ def get_files_changed_in_pr(pr_number: int) -> list[str]:
],
check=True,
capture_output=True,
text=True
text=True,
).stdout

return process_output.splitlines()
modified_files = process_output.splitlines()

except Exception as e:
print(f"An error occured while getting the modified files: {e}")
return []

return modified_files


if __name__ == "__main__":
Expand Down
57 changes: 48 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ permissions:
jobs:
changed-files:
runs-on: ubuntu-latest
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-defining-outputs-for-a-job
outputs:
files: ${{ steps.get_files.outputs.changed_files }}
steps:
Expand All @@ -53,6 +54,8 @@ jobs:
compiler: [gcc, clang]
env:
KRATOS_BUILD_TYPE: ${{ matrix.build-type }}
KRATOS_CI_CHANGED_FILES: ${{needs.changed-files.outputs.files}}
KRATOS_CI_APPLICATIONS: ".github/workflows/ci_apps_linux.json"
OMPI_MCA_rmaps_base_oversubscribe: 1 # Allow oversubscription for MPI (needed for OpenMPI >= 3.0)
OMPI_MCA_btl_vader_single_copy_mechanism: none # suppressing some annoying OpenMPI messages

Expand All @@ -66,8 +69,9 @@ jobs:
# - name: Installing dependencies
# => must be added to the docker container to avoid reinstalling it in every CI run

- name: Print changed files
run: echo "${{needs.changed-files.outputs.files}}"
- name: CI configuration
shell: bash
run: python3 kratos/python_scripts/testing/ci_utilities.py

- name: Build
shell: bash
Expand All @@ -88,6 +92,7 @@ jobs:
fi
source /opt/intel/oneapi/setvars.sh
cp .github/workflows/configure.sh configure.sh
python3 kratos/python_scripts/testing/ci_utilities.py
bash configure.sh
- name: Running python tests
Expand Down Expand Up @@ -159,18 +164,25 @@ jobs:
windows:
runs-on: windows-2022
needs: changed-files
env:
KRATOS_BUILD_TYPE: Custom
KRATOS_CI_CHANGED_FILES: ${{needs.changed-files.outputs.files}}
KRATOS_CI_APPLICATIONS: ".github/workflows/ci_apps_windows.json"

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'

- name: CI configuration
shell: bash
run: python3 kratos/python_scripts/testing/ci_utilities.py

- name: Download boost
run: |
$url = "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.gz"
$url = "https://archives.boost.io/release/1.74.0/source/boost_1_74_0.tar.gz"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
Expand All @@ -188,6 +200,7 @@ jobs:
shell: cmd
run: |
copy .\.github\workflows\configure.cmd
python kratos/python_scripts/testing/ci_utilities.py
configure.cmd
- name: Running python tests
Expand All @@ -199,8 +212,11 @@ jobs:
centos:
runs-on: ubuntu-latest
needs: changed-files
env:
KRATOS_BUILD_TYPE: Custom
KRATOS_CI_CHANGED_FILES: ${{needs.changed-files.outputs.files}}
KRATOS_CI_APPLICATIONS: ".github/workflows/ci_apps_centos.json"

container:
image: kratosmultiphysics/kratos-image-ci-centos7:latest
Expand All @@ -212,6 +228,10 @@ jobs:
# - name: Installing dependencies
# => must be added to the docker container to avoid reinstalling it in every CI run

- name: CI configuration
shell: bash
run: python3.8 kratos/python_scripts/testing/ci_utilities.py

- name: Build
run: |
export KRATOS_CMAKE_CXX_FLAGS="-Werror -Wno-deprecated-declarations -Wignored-qualifiers"
Expand All @@ -227,8 +247,11 @@ jobs:
ubuntu-core-without-unity:
runs-on: ubuntu-latest
needs: changed-files
env:
KRATOS_BUILD_TYPE: Custom
KRATOS_CI_CHANGED_FILES: ${{needs.changed-files.outputs.files}}
KRATOS_CI_APPLICATIONS: "ONLY_CORE"
OMPI_MCA_rmaps_base_oversubscribe: 1 # Allow oversubscription for MPI (needed for OpenMPI >= 3.0)

container:
Expand All @@ -244,6 +267,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: CI configuration
shell: bash
run: python3 kratos/python_scripts/testing/ci_utilities.py

- name: Cache Build
id: cache-build
uses: actions/cache@v3
Expand Down Expand Up @@ -280,8 +307,7 @@ jobs:
-DTRILINOS_INCLUDE_DIR="/usr/include/trilinos" \
-DTRILINOS_LIBRARY_DIR="/usr/lib/x86_64-linux-gnu" \
-DTRILINOS_LIBRARY_PREFIX="trilinos_" \
-DKRATOS_USE_PCH=ON \
-DINSTALL_RUNKRATOS=OFF
-DKRATOS_USE_PCH=ON
# Build
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target install -- -j2
Expand Down Expand Up @@ -350,18 +376,25 @@ jobs:
windows-core-without-unity:
runs-on: windows-2022
needs: changed-files
env:
KRATOS_BUILD_TYPE: Custom
KRATOS_CI_CHANGED_FILES: ${{needs.changed-files.outputs.files}}
KRATOS_CI_APPLICATIONS: "ONLY_CORE"

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'

- name: CI configuration
shell: bash
run: python3 kratos/python_scripts/testing/ci_utilities.py

- name: Download boost
run: |
$url = "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.gz"
$url = "https://archives.boost.io/release/1.74.0/source/boost_1_74_0.tar.gz"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
Expand Down Expand Up @@ -396,7 +429,6 @@ jobs:
-H"%KRATOS_SOURCE%" ^
-B"%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" ^
-DBOOST_ROOT="%TEMP%\boost" ^
-DINSTALL_RUNKRATOS=OFF ^
-DCMAKE_CXX_FLAGS="/Od /we4661 /we4804 /WX /wd4996" ^
-DKRATOS_USE_PCH=ON ^
-DFORCE_LOCAL_ZLIB_COMPILATION=ON || goto :error
Expand Down Expand Up @@ -512,8 +544,11 @@ jobs:
ubuntu-intel:
runs-on: ubuntu-latest
needs: changed-files
env:
KRATOS_BUILD_TYPE: Custom
KRATOS_CI_CHANGED_FILES: ${{needs.changed-files.outputs.files}}
KRATOS_CI_APPLICATIONS: ".github/workflows/ci_apps_intel.json"
OMPI_MCA_rmaps_base_oversubscribe: 1 # Allow oversubscription for MPI (needed for OpenMPI >= 3.0)
OMPI_MCA_btl_vader_single_copy_mechanism: none # suppressing some annoying OpenMPI messages

Expand All @@ -527,6 +562,10 @@ jobs:
# - name: Installing dependencies
# => must be added to the docker container to avoid reinstalling it in every CI run

- name: CI configuration
shell: bash
run: python3 kratos/python_scripts/testing/ci_utilities.py

- name: Build
shell: bash
run: |
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci_apps_centos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
"FluidDynamicsApplication",
"MappingApplication",
"StructuralMechanicsApplication",
"MeshingApplication",
"LinearSolversApplication",
"ConstitutiveLawsApplication",
"CoSimulationApplication"
]
1 change: 1 addition & 0 deletions .github/workflows/ci_apps_intel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
35 changes: 35 additions & 0 deletions .github/workflows/ci_apps_linux.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
"ConvectionDiffusionApplication",
"LinearSolversApplication",
"StructuralMechanicsApplication",
"FluidDynamicsApplication",
"FluidDynamicsBiomedicalApplication",
"MeshMovingApplication",
"DEMApplication",
"CSharpWrapperApplication",
"MetisApplication",
"TrilinosApplication",
"ShapeOptimizationApplication",
"CoSimulationApplication",
"CableNetApplication",
"RANSApplication",
"MappingApplication",
"FSIApplication",
"MeshingApplication",
"CompressiblePotentialFlowApplication",
"HDF5Application",
"ContactStructuralMechanicsApplication",
"IgaApplication",
"ParticleMechanicsApplication",
"ChimeraApplication",
"StatisticsApplication",
"SwimmingDEMApplication",
"ConstitutiveLawsApplication",
"RomApplication",
"ShallowWaterApplication",
"GeoMechanicsApplication",
"DamApplication",
"PoromechanicsApplication",
"OptimizationApplication",
"MedApplication"
]
29 changes: 29 additions & 0 deletions .github/workflows/ci_apps_windows.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
"CableNetApplication",
"ConvectionDiffusionApplication",
"FluidDynamicsApplication",
"FluidDynamicsBiomedicalApplication",
"FSIApplication",
"MeshingApplication",
"MeshMovingApplication",
"LinearSolversApplication",
"StructuralMechanicsApplication",
"DEMApplication",
"ChimeraApplication",
"IgaApplication",
"ParticleMechanicsApplication",
"MappingApplication",
"CoSimulationApplication",
"StatisticsApplication",
"SwimmingDEMApplication",
"ShapeOptimizationApplication",
"ConstitutiveLawsApplication",
"RANSApplication",
"CompressiblePotentialFlowApplication",
"RomApplication",
"ShallowWaterApplication",
"GeoMechanicsApplication",
"DamApplication",
"PoromechanicsApplication",
"OptimizationApplication"
]
2 changes: 1 addition & 1 deletion .github/workflows/configure.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\CableNetApplicatio
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ConvectionDiffusionApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\FluidDynamicsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\FluidDynamicsBiomedicalApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\FluidDynamicsHydraulicsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\FSIApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\MeshingApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\MeshMovingApplication;
Expand Down Expand Up @@ -45,7 +46,6 @@ cmake ^
-H"%KRATOS_SOURCE%" ^
-B"%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" ^
-DBOOST_ROOT="%TEMP%\boost" ^
-DINSTALL_RUNKRATOS=OFF ^
-DCMAKE_CXX_FLAGS="/Od /we4661 /we4804 /WX /wd4996" ^
-DFORCE_LOCAL_ZLIB_COMPILATION=ON ^
-DCMAKE_UNITY_BUILD=ON || goto :error
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ add_app ${KRATOS_APP_DIR}/LinearSolversApplication;
add_app ${KRATOS_APP_DIR}/StructuralMechanicsApplication;
add_app ${KRATOS_APP_DIR}/FluidDynamicsApplication;
add_app ${KRATOS_APP_DIR}/FluidDynamicsBiomedicalApplication;
add_app ${KRATOS_APP_DIR}/FluidDynamicsHydraulicsApplication;
add_app ${KRATOS_APP_DIR}/MeshMovingApplication;
add_app ${KRATOS_APP_DIR}/DEMApplication;
add_app ${KRATOS_APP_DIR}/CSharpWrapperApplication;
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/intel_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ echo "Kratos build type is ${KRATOS_BUILD_TYPE}"
# Configure
cmake -H"${KRATOS_SOURCE}" -B"${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" \
${KRATOS_CMAKE_OPTIONS_FLAGS} \
-DINSTALL_RUNKRATOS=OFF \
-DUSE_MPI=ON \
-DPYTHON_EXECUTABLE="/usr/bin/python3.10" \
-DCMAKE_CXX_FLAGS="${KRATOS_CMAKE_CXX_FLAGS} -O3 -Wall -Werror-all -diag-disable 1478 -diag-disable 1786" \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
shell: bash
run: cp -r statik_content/Page_files/* main/docs/
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4
- name: Create navigation menus
shell: bash
run: cd main/docs && python3 process_pages.py -t web
Expand All @@ -51,7 +51,7 @@ jobs:
source: ./main/docs
destination: ./main/docs/_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ./main/docs/_site

Expand All @@ -65,4 +65,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'

- name: Download boost
run: |
$url = "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.gz"
$url = "https://archives.boost.io/release/1.74.0/source/boost_1_74_0.tar.gz"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
Expand Down
Loading

0 comments on commit a9a5da1

Please sign in to comment.