Commit 1893306 1 parent 755f7a3 commit 1893306 Copy full SHA for 1893306
File tree 3 files changed +24
-10
lines changed
buildconfig/Jenkins/Conda
3 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ pipeline {
368
368
369
369
package_conda("${PLATFORM}", "workbench")
370
370
archive_conda_packages("${PLATFORM}")
371
- package_standalone()
371
+ package_standalone("${PLATFORM}" )
372
372
archive_standalone_package("${PLATFORM}")
373
373
}
374
374
post {
@@ -622,23 +622,23 @@ def generate_git_tag() {
622
622
return git_tag
623
623
}
624
624
625
- def package_standalone() {
625
+ def package_standalone(platform ) {
626
626
packagescript_path = "${CISCRIPT_DIR}/package-standalone"
627
627
if(isUnix()) {
628
- sh "${packagescript_path} ${WORKSPACE} ${package_standalone_options()}"
628
+ sh "${packagescript_path} ${WORKSPACE} ${package_standalone_options(platform )}"
629
629
} else {
630
630
workspace_unix_style = toUnixStylePath("${WORKSPACE}")
631
631
bat "\"${WIN_BASH}\" -ex -c \"${packagescript_path} ${workspace_unix_style}\
632
- ${package_standalone_options()}\""
632
+ ${package_standalone_options(platform )}\""
633
633
}
634
634
}
635
635
636
- def package_standalone_options() {
636
+ def package_standalone_options(platform ) {
637
637
package_options = ""
638
638
if(PACKAGE_SUFFIX.trim() != '') {
639
639
package_options += " --package-suffix ${PACKAGE_SUFFIX}"
640
640
}
641
- return package_options.trim()
641
+ return package_options.trim() + " --platform ${platform}"
642
642
}
643
643
644
644
// Determine whether this build should be marked as a prerelease on GitHub.
Original file line number Diff line number Diff line change 18
18
#
19
19
# Possible parameters:
20
20
# --package-suffix: An optional suffix to pass to the standalone package step.
21
+ # --platform: Target platform, e.g. linux-64
21
22
22
23
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
23
24
source $SCRIPT_DIR /mamba-utils
44
45
45
46
# Parse options
46
47
STANDALONE_PACKAGE_SUFFIX=
48
+ PLATFORM=" "
47
49
while [ ! $# -eq 0 ]
48
50
do
49
51
case " $1 " in
50
52
--package-suffix)
51
53
STANDALONE_PACKAGE_SUFFIX=" $2 "
52
54
shift ;;
55
+ --platform)
56
+ PLATFORM=" $2 "
57
+ shift ;;
53
58
* )
54
59
echo " Argument not accepted: $1 "
55
60
exit 1
59
64
done
60
65
61
66
# Mamba
62
- setup_mamba $WORKSPACE /mambaforge " package-standalone" false " "
67
+ setup_mamba $WORKSPACE /mambaforge " package-standalone" false $PLATFORM
63
68
# Pin conda to known working version. In 24.9 the post-link.bat script doesn't work.
64
69
mamba install --yes mamba=1.5 conda-build conda=24.7
65
70
@@ -77,11 +82,15 @@ PACKAGING_ARGS="-c ${LOCAL_CHANNEL}"
77
82
if [ -n " ${STANDALONE_PACKAGE_SUFFIX} " ]; then
78
83
PACKAGING_ARGS=" ${PACKAGING_ARGS} -s ${STANDALONE_PACKAGE_SUFFIX} "
79
84
fi
85
+
80
86
if [[ $OSTYPE == ' msys' * ]]; then
81
87
rm -fr * .exe
82
88
${PACKAGING_SCRIPTS_DIR} /win/create_package.sh $PACKAGING_ARGS
83
89
elif [[ $OSTYPE == ' darwin' * ]]; then
84
90
rm -fr * .dmg
91
+ if [ -n " ${PLATFORM} " ]; then
92
+ PACKAGING_ARGS=" ${PACKAGING_ARGS} -p ${PLATFORM} "
93
+ fi
85
94
${PACKAGING_SCRIPTS_DIR} /osx/create_bundle.sh $PACKAGING_ARGS
86
95
else
87
96
rm -fr * .tar.xz
Original file line number Diff line number Diff line change @@ -136,17 +136,22 @@ function usage() {
136
136
echo " Options:"
137
137
echo " -c Optional Conda channel overriding the default mantid"
138
138
echo " -s Optional Add a suffix to the output mantid file, has to be Unstable, or Nightly or not used"
139
- echo
139
+ echo " -p Target platform, e.g. osx-64 or osx-arm64 "
140
140
exit $exitcode
141
141
}
142
142
143
143
# # Script begin
144
144
# Optional arguments
145
145
conda_channel=mantid
146
+ platform=" "
146
147
suffix=
147
148
while [ ! $# -eq 0 ]
148
149
do
149
150
case " $1 " in
151
+ -p)
152
+ platform=" $2 "
153
+ shift
154
+ ;;
150
155
-c)
151
156
conda_channel=" $2 "
152
157
shift
@@ -210,7 +215,7 @@ if [[ "$suffix" == "Unstable" ]] || [[ "$suffix" == "Nightly" ]]; then
210
215
fi
211
216
212
217
echo " Creating Conda environment in '$bundle_conda_prefix '"
213
- " $CONDA_EXE " create --quiet --prefix " $bundle_conda_prefix " --copy --platform osx-64 \
218
+ " $CONDA_EXE " create --quiet --prefix " $bundle_conda_prefix " --copy --platform " $platform " \
214
219
--channel " $conda_channel " --channel conda-forge --channel $mantid_channel --yes \
215
220
mantidworkbench \
216
221
jq # used for processing the version string
@@ -240,6 +245,6 @@ create_plist "$bundle_contents" "$bundle_name" "$bundle_icon" "$version"
240
245
# `create-dmg` returns error code by default due to lack of signing - this is suppressed using a command list.
241
246
# Failure of the following `mv` command likely signifies `create-dmg` error.
242
247
export PATH=$PATH :/opt/homebrew/bin/
243
- version_name=" $bundle_name " -" $version "
248
+ version_name=" $bundle_name " -" $platform " - " $ version"
244
249
create-dmg " $BUILD_DIR " /" $bundle_dirname " || true
245
250
mv " ${bundle_name} ${version} .dmg" " ${version_name} .dmg"
You can’t perform that action at this time.
0 commit comments