Threading dual graph #1796
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI (Windows) | |
| on: | |
| push: | |
| branches: | |
| - release | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| windows-build: | |
| name: Windows vcpkg build | |
| runs-on: windows-2022 | |
| permissions: | |
| packages: write | |
| env: | |
| USERNAME: FEniCS | |
| VCPKG_EXE: C:/vcpkg/vcpkg | |
| FEED_URL: https://nuget.pkg.github.com/FEniCS/index.json | |
| VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/FEniCS/index.json,readwrite" | |
| steps: | |
| - name: Add NuGet sources | |
| shell: pwsh | |
| run: | | |
| .$(${{ env.VCPKG_EXE }} fetch nuget) ` | |
| sources add ` | |
| -Source "${{ env.FEED_URL }}" ` | |
| -StorePasswordInClearText ` | |
| -Name GitHubPackages ` | |
| -UserName "${{ env.USERNAME }}" ` | |
| -Password "${{ secrets.GITHUB_TOKEN }}" | |
| .$(${{ env.VCPKG_EXE }} fetch nuget) ` | |
| setapikey "${{ secrets.GITHUB_TOKEN }}" ` | |
| -Source "${{ env.FEED_URL }}" | |
| - name: Checkout DOLFINx | |
| uses: actions/checkout@v6 | |
| with: | |
| path: dolfinx-src | |
| - name: Load environment variables | |
| run: | | |
| cat dolfinx-src/.github/workflows/fenicsx-refs.env >> $env:GITHUB_ENV | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Checkout UFL | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: "fenics/ufl" | |
| path: ufl | |
| ref: ${{ env.ufl_ref }} | |
| - name: Install UFL | |
| working-directory: ufl | |
| run: pip install . | |
| - name: Checkout Basix | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: "fenics/basix" | |
| path: basix | |
| ref: ${{ env.basix_ref }} | |
| - name: Insert add_dll_directory calls into Basix | |
| working-directory: basix/python/basix | |
| run: | | |
| (Get-Content __init__.py).Replace('# WINDOWSDLL', 'import os; os.add_dll_directory("D:/a/dolfinx/basix-install/bin")') | Set-Content __init__.py | |
| Get-Content __init__.py | |
| - name: Install Basix (C++) | |
| working-directory: basix/cpp | |
| run: | | |
| cmake -DINSTALL_RUNTIME_DEPENDENCIES=ON -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -B build-dir -S . | |
| cmake --build build-dir --config Release | |
| cmake --install build-dir --config Release --prefix "D:/a/dolfinx/basix-install" | |
| echo "D:/a/dolfinx/basix-install/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
| - name: Install Basix Python build dependencies | |
| run: | | |
| python -m pip install scikit-build-core[pyproject] setuptools wheel nanobind | |
| - name: Install Basix (Python) | |
| working-directory: basix/python | |
| run: | | |
| python -m pip -v install --check-build-dependencies --no-build-isolation --no-cache-dir .[ci] --config-settings=cmake.args=-DBasix_DIR="D:/a/dolfinx/basix-install/lib/cmake/basix" --config-settings=cmake.build-type="Release" | |
| - name: Checkout FFCx | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: "fenics/ffcx" | |
| path: ffcx | |
| ref: ${{ env.ffcx_ref }} | |
| - name: Install UFCx header | |
| working-directory: ffcx | |
| run: | | |
| cmake -B build-dir -S cmake/ | |
| cmake --build build-dir --config Release | |
| cmake --install build-dir --config Release --prefix D:/a/dolfinx/ufcx-install | |
| - name: Install FFCx | |
| working-directory: ffcx | |
| run: | | |
| pip install . | |
| - name: Insert add_dll_directory calls into DOLFINx | |
| working-directory: dolfinx-src/python/dolfinx | |
| run: | | |
| (Get-Content __init__.py).Replace('# WINDOWSDLL', 'import os; os.add_dll_directory("D:/a/dolfinx/dolfinx-install/bin"); os.add_dll_directory("C:/Program Files (x86)/Intel/oneAPI/mpi/latest/opt/mpi/libfabric/bin")') | Set-Content __init__.py | |
| Get-Content __init__.py | |
| - uses: mpi4py/setup-mpi@v1.4.1 | |
| with: | |
| mpi: "intelmpi" | |
| - name: Install DOLFINx (C++) | |
| working-directory: dolfinx-src/cpp | |
| run: | | |
| cmake -DBUILD_TESTING=ON -DINSTALL_RUNTIME_DEPENDENCIES=ON -DDOLFINX_BASIX_PYTHON=OFF -DBasix_DIR="D:/a/dolfinx/basix-install/lib/cmake/basix" -DDOLFINX_UFCX_PYTHON=OFF -Dufcx_DIR="D:/a/dolfinx/ufcx-install/share/ufcx/cmake" -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_OVERLAY_PORTS=".vcpkg-overlay" -B build-dir -S . | |
| cmake --build build-dir --config Release | |
| cmake --install build-dir --config Release --prefix D:/a/dolfinx/dolfinx-install | |
| echo "D:/a/dolfinx/dolfinx-install/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 | |
| - name: Run tests, skip la_matrix (C++, serial) | |
| working-directory: dolfinx-src/cpp/build-dir/test/Release | |
| run: | | |
| ls | |
| mpiexec -n 1 ./unittests "~[la_matrix]" | |
| # - name: Run tests, skip la_matrix, geometry_compat, create_box (C++, MPI, np=3) | |
| # working-directory: dolfinx-src/cpp/build-dir/test/Release | |
| # run: | | |
| # mpiexec -n 3 ./unittests "~[la_matrix]" | |
| - name: Install DOLFINx Python build dependencies | |
| working-directory: dolfinx-src/python | |
| run: | | |
| pip install scikit-build-core | |
| python -m pip install --no-binary mpi4py (python -m scikit_build_core.build requires | Out-String | ConvertFrom-Json) | |
| - name: Install DOLFINx (Python) | |
| working-directory: dolfinx-src/python | |
| run: | | |
| pip -v install --check-build-dependencies --no-build-isolation .[test] --config-settings=cmake.build-type="Release" --config-settings=cmake.args=-DBasix_DIR="D:/a/dolfinx/basix-install/lib/cmake/basix" --config-settings=cmake.args=-Dufcx_DIR="D:/a/dolfinx/ufcx-install/share/ufcx/cmake" --config-settings=cmake.args=-DDOLFINX_DIR="D:/a/dolfinx/dolfinx-install/lib/cmake/dolfinx" --config-settings=cmake.args=-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" --config-settings=cmake.args=-DVCPKG_OVERLAY_PORTS="../cpp/.vcpkg-overlay" | |
| - name: Run tests, skip test_mixed_topology_partitioning (Python, serial) | |
| working-directory: dolfinx-src/python/test | |
| run: | | |
| pip install pytest-xdist | |
| python -m pytest -n auto -m "not petsc4py and not adios2" -k "not test_mixed_topology_partitioning" unit/ | |
| # - name: Run tests, skip test_mixed_topology_partitioning (Python, MPI, np=3) | |
| # working-directory: dolfinx-src/python/test | |
| # run: | | |
| # mpiexec -n 3 python -m pytest -m "not petsc4py and not adios2" -k "not test_mixed_topology_partitioning" unit/ | |
| # - name: Run Python demos (serial) | |
| # working-directory: dolfinx-src/python/demo | |
| # run: | | |
| # python3 -m pytest -n auto -m serial --durations=10 test.py | |
| # - name: Run Python demos (MPI, np=3) | |
| # working-directory: dolfinx-src/python/demo | |
| # run: | | |
| # python3 -m pytest -m mpi --num-proc=3 test.py |