Skip to content

Commit

Permalink
Rename tool.log to setup-conda.log
Browse files Browse the repository at this point in the history
  • Loading branch information
j-woz committed Dec 6, 2024
1 parent f2d0515 commit a794e73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ jobs:
run: |
dev/github-actions/check setup-conda.sh ${{ matrix.os }}
- name: Save tool.log
- name: Save setup-conda.log
uses: actions/upload-artifact@v4
with:
name: tool-log
path: tool.log
name: setup-conda-log
path: setup-conda.log

- name: Check tool.log
- name: Check setup-conda.log
run: |
grep "setup-conda: SUCCESS" tool.log
grep "setup-conda: SUCCESS" setup-conda.log
- name: Build Anaconda package
run: |
Expand Down
22 changes: 11 additions & 11 deletions dev/github-actions/setup-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ set -eu
# SETUP CONDA
# Sets up system tools for an Anaconda Swift/T build
# For any matrix.os
# Produces artifact tool.log, which is checked by subsequent steps
# Produces artifact setup-conda.log, which is checked by subsequent steps

MATRIX_OS=$1

START=$SECONDS

echo "dev/github-actions/setup-conda.sh: START" \
$(date "+%Y-%m-%d %H:%M") \
>> tool.log
>> setup-conda.log

log()
{
Expand All @@ -21,18 +21,18 @@ log()

log "Installing dependencies for OS=$MATRIX_OS ..."
# Create initial timestamp:
log "Start..." >> tool.log
log "Start..." >> setup-conda.log

# Set up tools:
case $MATRIX_OS in
"ubuntu-latest")
log "apt install..." >> tool.log
log "apt install..." >> setup-conda.log
TOOL=( sudo apt-get install --yes )
;;
macos-*)
TOOL=( brew install )
log "brew update..." >> tool.log
brew update 2>&1 >> tool.log
log "brew update..." >> setup-conda.log
brew update 2>&1 >> setup-conda.log
;;
*)
log "unknown OS: $MATRIX_OS"
Expand Down Expand Up @@ -77,15 +77,15 @@ esac
if (
set -eux
${TOOL[@]} ${PKGS[@]}
) 2>&1 >> tool.log
) 2>&1 >> setup-conda.log
then
COUNT=${#PKGS[@]}
T=$(( SECONDS - START ))
log "Installed $COUNT packages in $T seconds."
else
log "FAILED to install packages!"
log "tool.log:"
cat tool.log
log "setup-conda.log:"
cat setup-conda.log
exit 1
fi

Expand Down Expand Up @@ -128,6 +128,6 @@ echo ${BINS[@]} | fmt -w 1 >> $GITHUB_PATH
{
echo PATHS:
echo ${BINS[@]} | fmt -w 1
} >> tool.log
} >> setup-conda.log

log "SUCCESS" >> tool.log
log "SUCCESS" >> setup-conda.log

0 comments on commit a794e73

Please sign in to comment.