Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs-feliks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Feliks Kiszkurno
ogs-feliks
Commits
2fb0d64e
Unverified
Commit
2fb0d64e
authored
7 months ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
[py] .envrc.ps1 for Windows.
parent
2a23de40
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+22
-11
22 additions, 11 deletions
CMakeLists.txt
Tests/Python/test_simulator_mesh_interface.py
+10
-1
10 additions, 1 deletion
Tests/Python/test_simulator_mesh_interface.py
scripts/ci/extends/template-build-win.yml
+2
-1
2 additions, 1 deletion
scripts/ci/extends/template-build-win.yml
with
34 additions
and
13 deletions
CMakeLists.txt
+
22
−
11
View file @
2fb0d64e
...
...
@@ -234,19 +234,30 @@ if(OGS_WRITE_BENCHMARK_COMMANDS)
endif
()
# cmake-lint: disable=E1126
set
(
_envrc_content
"[ -d
\"
${
PROJECT_BINARY_DIR
}
/.venv
\"
] && source
${
PROJECT_BINARY_DIR
}
/.venv/bin/activate"
"export PATH=$PATH:
${
PROJECT_BINARY_DIR
}
/
${
CMAKE_INSTALL_BINDIR
}
"
"export OGS_USE_PATH=1"
"export PYTHONPATH=
${
PROJECT_BINARY_DIR
}
/site-packages:$PYTHONPATH"
)
if
(
TFEL_WITH_PYTHON
)
set
(
_envrc_content
"
${
_envrc_content
}
"
"export PYTHONPATH=
${
TFEL_WITH_PYTHON
}
:$PYTHONPATH"
if
(
WIN32
)
set
(
_envrc_file_ending
".ps1"
)
set
(
_envrc_content
"$Env:PYTHONPATH +=
\"
;
${
PROJECT_BINARY_DIR
}
/site-packages
\"
"
"$Env:PATH +=
\"
;
${
PROJECT_BINARY_DIR
}
/
${
CMAKE_INSTALL_BINDIR
}
\"
"
"$Env:PATH +=
\"
;C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler
\"
"
"$Env:OGS_USE_PATH =
\"
1
\"
"
)
string
(
REPLACE
";$"
"
\n
$"
_envrc_content
"
${
_envrc_content
}
"
)
else
()
set
(
_envrc_content
"[ -d
\"
${
PROJECT_BINARY_DIR
}
/.venv
\"
] && source
${
PROJECT_BINARY_DIR
}
/.venv/bin/activate"
"export PATH=$PATH:
${
PROJECT_BINARY_DIR
}
/
${
CMAKE_INSTALL_BINDIR
}
"
"export OGS_USE_PATH=1"
"export PYTHONPATH=
${
PROJECT_BINARY_DIR
}
/site-packages:$PYTHONPATH"
)
if
(
TFEL_WITH_PYTHON
)
set
(
_envrc_content
"
${
_envrc_content
}
"
"export PYTHONPATH=
${
TFEL_WITH_PYTHON
}
:$PYTHONPATH"
)
endif
()
string
(
REPLACE
";"
"
\n
"
_envrc_content
"
${
_envrc_content
}
"
)
endif
()
string
(
REPLACE
";"
"
\n
"
_envrc_content
"
${
_envrc_content
}
"
)
file
(
CONFIGURE OUTPUT .envrc CONTENT
"
${
_envrc_content
}
"
)
file
(
CONFIGURE OUTPUT .envrc
${
_envrc_file_ending
}
CONTENT
"
${
_envrc_content
}
"
)
check_header_compilation
()
...
...
This diff is collapsed.
Click to expand it.
Tests/Python/test_simulator_mesh_interface.py
+
10
−
1
View file @
2fb0d64e
import
os
import
platform
import
sys
import
tempfile
from
pathlib
import
Path
import
numpy
as
np
import
ogs
.mesh
as
mesh
# noqa: F401
import
ogs
import
pytest
...
...
@@ -81,6 +82,14 @@ def checkCells(cells, celltypes, points):
@pytest.mark.skipif
(
"
OGS_USE_PATH
"
in
os
.
environ
,
reason
=
"
Works in wheel only.
"
)
def
test_simulator
():
if
platform
.
system
()
==
"
Windows
"
and
ogs
.
OGS_USE_MKL
==
"
ON
"
:
os
.
add_dll_directory
(
Path
(
"
C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler
"
)
)
import
ogs.mesh
as
mesh
# noqa: F401
from
ogs
import
simulator
current_dir
=
Path
(
__file__
).
parent
.
resolve
()
...
...
This diff is collapsed.
Click to expand it.
scripts/ci/extends/template-build-win.yml
+
2
−
1
View file @
2fb0d64e
...
...
@@ -12,7 +12,7 @@
-
$log_file = $build_directory_full + "\make.txt"
-
(rm -r -fo $build_directory_full)
-
cmd /c if not exist $build_directory_full mkdir $build_directory_full
-
mkdir build
# We are inside the OGS source directory, now. This "build" dir will be, too.
-
mkdir build
# We are inside the OGS source directory, now. This "build" dir will be, too.
# Create symlink https://stackoverflow.com/a/34905638/80480
-
cmd /c mklink /D $artifacts_dir $env:CI_PROJECT_DIR\$build_directory_full
-
$cmake_cmd = "cmake --preset=$env:CMAKE_PRESET --log-level=VERBOSE -Wno-dev $env:CMAKE_ARGS"
...
...
@@ -23,6 +23,7 @@
if (Test-Path $build_directory_full\.venv\Scripts\Activate.ps1) {
Invoke-Expression $build_directory_full\.venv\Scripts\Activate.ps1
}
-
Invoke-Expression $build_directory_full\.envrc.ps1
-
cmake --build --preset=$env:CMAKE_PRESET --target package | Tee-Object -FilePath $log_file
-
if($env:BUILD_TESTS -eq "true") { cmake --build --preset=$env:CMAKE_PRESET --target tests }
-
$ctest_group = "Experimental"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment