Skip to content

Commit c96f6a9

Browse files
committed
Merge branch 'master' into github_action_mac
2 parents 9a415c6 + d0d31c3 commit c96f6a9

25 files changed

+137
-140
lines changed

dev/conda/README.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ Setup:
8282
create the "exported" Swift/T source tree in `$TMP/distro`,
8383
where `$TMP` defaults to `/tmp`.
8484
This source code location is hard-coded into `meta.yaml`.
85+
** Thus, the working Swift/T clone and the copy in `$TMP/distro` must be
86+
identical! Version numbers are pulled from the working clone.
8587

8688
Loop:
8789

@@ -138,6 +140,8 @@ $ anaconda login
138140
$ anaconda upload $PKG
139141
----
140142

143+
Use `dev/conda/upload.sh` to automate this.
144+
141145
== Dependencies
142146

143147
`r-rinside`::

dev/conda/build-generic.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,19 @@ echo ENABLE_R=$ENABLE_R
4040
echo "ENABLE_R: $ENABLE_R"
4141
} > $RECIPE_DIR/build-generic.log
4242

43-
# Cf. helpers.zsh
4443
if [[ $PLATFORM =~ osx-* ]]
4544
then
4645
NULL=""
4746
ZT=""
4847
if [[ $PLATFORM =~ osx-arm64 ]]
4948
then
50-
export MPICH_CC=clang
51-
export MPICH_CXX=clang++
49+
# These variables affect the mpicc/mpicxx wrappers
50+
export MPICH_CC=clang
51+
export MPICH_CXX=clang++
5252
fi
5353
else
54-
NULL="--null" ZT="--zero-terminated"
54+
NULL="--null"
55+
ZT="--zero-terminated"
5556
fi
5657
printenv ${NULL} | sort ${ZT} | tr '\0' '\n' > \
5758
$RECIPE_DIR/build-env.log

dev/conda/conda-build.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Options:
2727
END
2828
}
2929

30-
C="" R=""
31-
zparseopts -D -E -F h=HELP C=C r=R
30+
C="" R="" R_VERSION=""
31+
zparseopts -D -E -F h=HELP C=C r:=R
3232

3333
if (( ${#HELP} )) {
3434
help
@@ -37,20 +37,28 @@ if (( ${#HELP} )) {
3737

3838
# Get this directory (absolute):
3939
DEV_CONDA=${0:A:h}
40+
source $DEV_CONDA/helpers.zsh
4041

4142
# The Swift/T Git clone:
4243
SWIFT_T_TOP=${DEV_CONDA:h:h}
4344
TMP=${TMP:-/tmp}
4445

4546
source $SWIFT_T_TOP/turbine/code/scripts/helpers.zsh
46-
source $DEV_CONDA/helpers.zsh
47+
# Sets SWIFT_T_VERSION:
48+
source $SWIFT_T_TOP/dev/get-versions.sh
49+
export SWIFT_T_VERSION
50+
# Sets PYTHON_VERSION:
51+
source $DEV_CONDA/get-python-version.sh
52+
# Optionally set R_VERSION from user argument:
53+
if (( ${#R} )) export R_VERSION=${R[2]}
4754

4855
if (( ${#PLATFORM:-} == 0 )) {
4956
log "unset: PLATFORM"
5057
log " This script should be called by a conda-platform.sh"
5158
return 1
5259
}
5360

61+
log "VERSION: $SWIFT_T_VERSION"
5462
log "PLATFORM: $PLATFORM $*"
5563

5664
# This is passed into meta.yaml:
@@ -114,7 +122,7 @@ m4 -P -I $DEV_CONDA $COMMON_M4 $SETTINGS_SED > settings.sed
114122

115123
if (( ${#C} )) {
116124
log "configure-only: exit."
117-
exit
125+
return
118126
}
119127

120128
# Backup the old log

dev/conda/conda-platform.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/zsh
2+
set -eu
3+
4+
# CONDA PLATFORM
5+
# Dependency files are in the PLATFORM directory
6+
# Generated scripts and log files are put in the PLATFORM directory
7+
# Arguments:
8+
# -C configure-only- generate meta.yaml and settings.sed, then stop
9+
# -r R_VERSION for the R version
10+
# PLATFORM: The PLATFORM directory
11+
12+
C="" R=""
13+
zparseopts -D -E -F h=HELP C=C r:=R
14+
if (( ${#*} != 1 )) {
15+
print "conda-platform.sh: Provide PLATFORM!"
16+
return 1
17+
}
18+
export PLATFORM=$1
19+
20+
# The Swift/T Conda script directory (absolute):
21+
DEV_CONDA=${0:A:h}
22+
23+
if [[ ! -d $DEV_CONDA/$PLATFORM ]] {
24+
printf "conda-platform.sh: No such platform: '%s'\n" $PLATFORM
25+
return 1
26+
}
27+
28+
cd $DEV_CONDA/$PLATFORM
29+
$DEV_CONDA/conda-build.sh $HELP $C $R

dev/conda/linux-64/conda-platform.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

dev/conda/linux-aarch64/conda-platform.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

dev/conda/meta-template.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@ COMMENT(
33
# Will be filtered into PLATFORM/meta.yaml by conda-build.sh:m4
44
)
55

6-
# Date that this meta.yaml was filtered:
6+
# Date that this meta.yaml was filtered from meta-template.yaml:
77
# DATE: getenv(DATE)
88

9-
{% set name = "getenv(PKG_NAME)" %}
10-
{% set version = "1.6.4" %}
11-
{% set major = version.rpartition('.')[0] %}
12-
{% set sha256 = 'f5b26bb1ac427c271e19dff2146101f7c4da03652d66426a291e96638ba15c03' %}
9+
{% set name = "getenv(PKG_NAME)" %}
10+
{% set version = "getenv(SWIFT_T_VERSION)" %}
11+
{% set major = version.rpartition('.')[0] %}
1312

1413
package:
15-
name: {{ name|lower }}
14+
name: {{ name|lower }}
1615
version: {{ version }}
17-
sha256: {{ sha256 }}
1816

1917
source:
2018
path: getenv(DISTRO)/swift-t-{{ version }}/swift-t-{{ version }}

dev/conda/osx-64/conda-platform.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

dev/conda/osx-arm64/conda-platform.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

dev/conda/pkgs-R.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ COMMENT( inside build-generic.sh )m4_dnl
77
COMMENT( Retain indentation )m4_dnl
88
m4_ifelse(getenv(PLATFORM),`osx-arm64',
99
` - swift-t::emews-rinside',
10-
` - r'
10+
` - r=getenv(R_VERSION)'
1111
)m4_dnl
1212
# pkgs-R.yaml: STOP

0 commit comments

Comments
 (0)