Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpcdf
obs
osc-plugins
Commits
44860d76
Commit
44860d76
authored
Nov 29, 2019
by
Lorenz Huedepohl
Browse files
Macros %latest_intel and %latest_gcc in prjconf of software:dist
parent
ef6b515c
Pipeline
#67006
passed with stage
in 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mpcdf_common.py
View file @
44860d76
...
...
@@ -306,6 +306,12 @@ def get_microarchitecture(project):
raise
Exception
(
"Unknown micro-architecture '{0}'"
.
format
(
microarch
))
def
package_sort_key
(
string
):
name
,
version
=
string
.
split
(
"_"
,
1
)
version
=
version
.
split
(
"_"
)
return
(
name
,)
+
tuple
(
map
(
int
,
version
))
def
mpcdf_enable_repositories
(
api_url
,
project
,
package
,
verbose
=
False
,
filter_repos
=
None
):
from
itertools
import
product
import
sys
...
...
@@ -355,13 +361,8 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
default_mpis
=
try_get_attribute
(
None
,
"default_mpi"
)
default_cudas
=
try_get_attribute
(
None
,
"default_cuda"
)
def
sort_key
(
string
):
name
,
version
=
string
.
split
(
"_"
,
1
)
version
=
version
.
split
(
"_"
)
return
(
name
,)
+
tuple
(
map
(
int
,
version
))
latest_intel
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"intel"
)),
key
=
sort_key
)[
-
1
]
latest_gcc
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"gcc"
)),
key
=
sort_key
)[
-
1
]
latest_intel
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"intel"
)),
key
=
package_sort_key
)[
-
1
]
latest_gcc
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"gcc"
)),
key
=
package_sort_key
)[
-
1
]
def
enable
(
name
):
if
any
(
filtered_repo
in
name
for
filtered_repo
in
filter_repos
):
...
...
mpcdf_refresh_aggregates.py
View file @
44860d76
...
...
@@ -94,6 +94,12 @@ def do_mpcdf_refresh_aggregates(self, subcmd, opts, *args):
values
=
mpcdf_common
.
get_attribute_values
(
apiurl
,
project
,
None
,
attribute
)
macros
[
target
].
append
(
"%available_{0} {1}"
.
format
(
name
,
","
.
join
(
sorted
(
values
))))
all_compilers
=
mpcdf_common
.
get_attribute_values
(
apiurl
,
project
,
None
,
"MPCDF:compiler_modules"
)
latest_intel
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"intel"
)),
key
=
mpcdf_common
.
package_sort_key
)[
-
1
]
latest_gcc
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"gcc"
)),
key
=
mpcdf_common
.
package_sort_key
)[
-
1
]
macros
[
target
].
append
(
"%latest_intel "
+
latest_intel
)
macros
[
target
].
append
(
"%latest_gcc "
+
latest_gcc
)
for
repo
in
osc
.
core
.
get_repositories_of_project
(
apiurl
,
project
):
aggregatename
=
"zz_aggregate_"
+
project
.
replace
(
":"
,
"-"
)
+
"_"
+
repo
refresh_aggregate
(
aggregatename
,
project
,
repo
,
target
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment