Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ParaView
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Utkarsh Ayachit
ParaView
Commits
febb3fe2
Commit
febb3fe2
authored
3 years ago
by
Ben Boeckel
Browse files
Options
Downloads
Patches
Plain Diff
ci: limit builds through the machine load
This allows other jobs to cooperatively schedule with a build.
parent
ba7c8ff2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab/ci/ctest_build.cmake
+15
-1
15 additions, 1 deletion
.gitlab/ci/ctest_build.cmake
with
15 additions
and
1 deletion
.gitlab/ci/ctest_build.cmake
+
15
−
1
View file @
febb3fe2
...
...
@@ -6,6 +6,20 @@ ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
# Pick up from where the configure left off.
ctest_start
(
APPEND
)
include
(
ProcessorCount
)
ProcessorCount
(
nproc
)
if
(
NOT
"$ENV{CTEST_MAX_PARALLELISM}"
STREQUAL
""
)
if
(
nproc GREATER
"$ENV{CTEST_MAX_PARALLELISM}"
)
set
(
nproc
"$ENV{CTEST_MAX_PARALLELISM}"
)
endif
()
endif
()
if
(
CTEST_CMAKE_GENERATOR STREQUAL
"Unix Makefiles"
)
set
(
CTEST_BUILD_FLAGS
"-j
${
nproc
}
-l
${
nproc
}
"
)
elseif
(
CTEST_CMAKE_GENERATOR MATCHES
"Ninja"
)
set
(
CTEST_BUILD_FLAGS
"-l
${
nproc
}
"
)
endif
()
set
(
targets_to_build
"all"
)
foreach
(
target IN LISTS targets_to_build
)
...
...
@@ -16,7 +30,7 @@ foreach (target IN LISTS targets_to_build)
if
(
CTEST_CMAKE_GENERATOR MATCHES
"Make"
)
# Drop the `-i` flag without remorse.
set
(
CTEST_BUILD_COMMAND
"make
-j 4
${
CTEST_BUILD_FLAGS
}
"
)
set
(
CTEST_BUILD_COMMAND
"make
${
CTEST_BUILD_FLAGS
}
"
)
if
(
NOT target STREQUAL
"all"
)
set
(
CTEST_BUILD_COMMAND
"
${
CTEST_BUILD_COMMAND
}
${
target
}
"
)
...
...
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