forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gitlab CI: Windows Configs (spack#43967)
Add support for Gitlab CI on Windows This PR adds the config changes required to configure and execute Gitlab pipelines running Windows builds on Windows runners using the existing Gitlab CI infrastructure (and newly added Windows infrastructure). * Adds support for generating child pipelines dispatched to Windows runners * Refactors the relevant pre-scripts, scripts, and post scripts to be compatible with Windows * Adds Windows config section describing Windows jobs * Adds VTK as Windows build stack (to be expanded later) * Modifies proj to build on Windows * Refactors Windows rpath symlinking to avoid system libs and externals --------- Co-authored-by: Ryan Krattiger <[email protected]> Co-authored-by: Mike VanDenburgh <[email protected]> Co-authored-by: Todd Gamblin <[email protected]> Co-authored-by: Scott Wittenburg <[email protected]>
- Loading branch information
1 parent
b894f99
commit 81fe460
Showing
16 changed files
with
220 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ci: | ||
pipeline-gen: | ||
- build-job: | ||
after_script:: | ||
- Write-Output "Done" | ||
|
||
before_script:: | ||
- fsutil 8dot3name set C:\ 0 | ||
- . .\share\spack\setup-env.ps1 | ||
- If (Test-Path -path C:\\key\intermediate_ci_signing_key.gpg) { spack.ps1 gpg trust C:\\key\intermediate_ci_signing_key.gpg } | ||
- If (Test-Path -path C:\\key\spack_public_key.gpg) { spack.ps1 gpg trust C:\\key\spack_public_key.gpg } | ||
|
||
script:: | ||
- spack.ps1 env activate --without-view ${SPACK_CONCRETE_ENV_DIR} | ||
- spack.ps1 config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{hash}'" | ||
- mkdir ${SPACK_ARTIFACTS_ROOT}/user_data | ||
- spack.ps1 --backtrace ci rebuild | Tee-Object -FilePath "${env:SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt" 2>&1 | Tee-Object -FilePath "${env:SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt" | ||
image: "ghcr.io/johnwparent/windows-server21h2:sha-c749cf3" |
10 changes: 10 additions & 0 deletions
10
share/spack/gitlab/cloud_pipelines/configs/win64/config.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
config: | ||
build_stage:: | ||
- 'C:/spack stage' | ||
install_tree: | ||
root: "C:/spack install" | ||
# Path lengths on windows doesn't support much padding | ||
padded_length: 0 | ||
# Reduce the projections to only including the hash to avoid path length issues | ||
projections: | ||
all: '{hash}' |
25 changes: 25 additions & 0 deletions
25
share/spack/gitlab/cloud_pipelines/configs/win64/packages.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
packages: | ||
all: | ||
target: [x86_64] | ||
tbb: | ||
require: "intel-tbb" | ||
cmake: | ||
externals: | ||
- spec: [email protected] | ||
prefix: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake" | ||
buildable: False | ||
ninja: | ||
externals: | ||
- spec: [email protected] | ||
prefix: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\Ninja" | ||
buildable: False | ||
wgl: | ||
externals: | ||
- spec: [email protected] plat=x64 | ||
prefix: "C:\\Program Files (x86)\\Windows Kits\\10" | ||
buildable: False | ||
win-sdk: | ||
externals: | ||
- spec: [email protected] plat=x64 | ||
prefix: "C:\\Program Files (x86)\\Windows Kits\\10" | ||
buildable: False |
4 changes: 4 additions & 0 deletions
4
share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/ci.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ci: | ||
pipeline-gen: | ||
- build-job: | ||
tags: [x86_64-win] |
3 changes: 3 additions & 0 deletions
3
share/spack/gitlab/cloud_pipelines/configs/win64/x86_64/packages.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
packages: | ||
all: | ||
target: [x86_64] |
10 changes: 10 additions & 0 deletions
10
share/spack/gitlab/cloud_pipelines/scripts/common/expand_vars.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import argparse | ||
import os | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("input", type=argparse.FileType("r")) | ||
parser.add_argument("out", type=argparse.FileType("w")) | ||
|
||
args = parser.parse_args() | ||
|
||
args.out.write(os.path.expandvars(args.input.read())) |
12 changes: 12 additions & 0 deletions
12
share/spack/gitlab/cloud_pipelines/stacks/windows-vis/spack.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Windows Visualization Stack | ||
# maintainers: | ||
# - John Parent (@johnwparent) | ||
# - Ryan Krattiger (@kwryankrattiger) | ||
|
||
spack: | ||
view: false | ||
specs: | ||
- vtk | ||
|
||
cdash: | ||
build-group: Windows Visualization (Kitware) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,15 +87,14 @@ class Proj(CMakePackage, AutotoolsPackage): | |
when="@6.2:9.1", | ||
) | ||
|
||
patch("proj.cmakelists.5.0.patch", when="@5.0") | ||
patch("proj.cmakelists.5.1.patch", when="@5.1:5.2") | ||
|
||
# https://proj.org/install.html#build-requirements | ||
with when("build_system=cmake"): | ||
# CMake 3.19 refactored the FindTiff module interface, update older proj's | ||
# to be compatible with this "new" interface | ||
# patch replaces the TIFF_LIBRARY variable (no longer used) with TIFF_LIBRARIES | ||
patch("proj-8.1-cmake-3.29-new-tiff-interface.patch", when="+tiff @:9.1.0 ^[email protected]:") | ||
patch("proj-8.1-cmake-3.29-new-tiff-interface.patch", when="+tiff @7:9.1.0 ^[email protected]:") | ||
patch("proj.cmakelists.5.0.patch", when="@5.0") | ||
patch("proj.cmakelists.5.1.patch", when="@5.1:5.2") | ||
conflicts("[email protected]:", when="@:7") | ||
depends_on("[email protected]:", when="@6:", type="build") | ||
depends_on("[email protected]:", when="@5", type="build") | ||
|
Oops, something went wrong.