Skip to content

Commit 0acc761

Browse files
committed
Make artifact for download from GitHub
1 parent ffa20a1 commit 0acc761

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

.github/workflows/conda.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,20 @@ jobs:
7070
7171
- name: Build Anaconda package
7272
run: |
73-
dev/github-actions/check dev/jenkins/anaconda.sh -p ${{ matrix.python-version }}
73+
dev/github-actions/check dev/jenkins/anaconda.sh -a -p ${{ matrix.python-version }}
7474
7575
- name: Save anaconda.log
7676
uses: actions/upload-artifact@v4
7777
with:
7878
name: anaconda-log-${{ matrix.os }}-py${{ matrix.python-version }}
7979
path: anaconda.log
8080

81+
- name: Save Anaconda package
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: anaconda-pkg-${{ matrix.os }}-py${{ matrix.python-version }}
85+
path: PKG.conda
86+
8187
- name: Check anaconda.log
8288
run: |
8389
# Returns error code if not found, stopping GitHub workflow

dev/jenkins/anaconda.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ if [[ ${WORKSPACE:-0} == 0 ]] abort "Set WORKSPACE!"
6262
help()
6363
{
6464
cat <<EOF
65+
-a Artifact- copy package back to ./PKG.conda
66+
used to make an artifact in GitHub Actions
6567
-b disable bootstrapping during make-release-pkg
68+
runs faster if after a successful bootstrap
6669
-c CONDA_TIMESTAMP default "$CONDA_TIMESTAMP"
6770
-p PYTHON_VERSION default "$PYTHON_VERSION"
6871
-r R_VERSION install R, default does not
@@ -78,10 +81,11 @@ zparseopts h=HELP
7881
if (( ${#HELP} )) help
7982

8083
# Main argument processing
84+
A="" # May become "-a"
8185
B="" # May become "-b"
8286
R="" # May become ( -r R_VERSION )
8387
USE_R="" # May become "-r"
84-
zparseopts -D -E -F b=B c:=CT p:=PV r:=R u+=UNINSTALL
88+
zparseopts -D -E -F a=A b=B c:=CT p:=PV r:=R u+=UNINSTALL
8589
if (( ${#PV} )) PYTHON_VERSION=${PV[2]}
8690
if (( ${#CT} )) CONDA_TIMESTAMP=${CT[2]}
8791
if (( ${#R} )) USE_R="-r"
@@ -270,21 +274,21 @@ check-pkg()
270274
REPODATA=$BLD_DIR/repodata.json
271275
log "CHECKING PACKAGE in $BLD_DIR ..."
272276

273-
if ! BZ2=$( python $SWIFT_T/dev/conda/find-pkg.py $REPODATA )
277+
if ! PKG_FILE=$( python $SWIFT_T/dev/conda/find-pkg.py $REPODATA )
274278
then
275279
print
276280
log "CHECKING PACKAGE FAILED!"
277281
print
278282
return 1
279283
fi
280-
PKG=$BLD_DIR/$BZ2
281-
log "CHECKING PACKAGE at $PKG ..."
282-
if ! ls -l $PKG
284+
PKG_PATH=$BLD_DIR/$PKG_FILE
285+
log "CHECKING PKG at $PKG_PATH ..."
286+
if ! ls -l $PKG_PATH
283287
then
284-
log "Could not find the PKG at: $PKG"
288+
log "Could not find the PKG at: $PKG_PATH"
285289
return 1
286290
fi
287-
checksum $PKG
291+
checksum $PKG_PATH
288292
print
289293
}
290294

@@ -312,7 +316,7 @@ log-success()
312316
# Record success if on GitHub:
313317
{
314318
log "SUCCESS"
315-
log "PKG=$PKG"
319+
log "PKG=$PKG_PATH"
316320
} | tee -a anaconda.log
317321
}
318322
}
@@ -339,8 +343,10 @@ check-pkg
339343
do-activate $WORKSPACE/sfw/Miniconda-install
340344

341345
# Install the new package into the install environment!
342-
task $SWIFT_T/dev/conda/conda-install.sh $USE_R $PKG
346+
task $SWIFT_T/dev/conda/conda-install.sh $USE_R $PKG_PATH
343347

344348
try-swift-t
345349

350+
if (( ${#A} )) cp -v $PKG_PATH PKG.conda
351+
346352
log-success

0 commit comments

Comments
 (0)