@@ -24,25 +24,21 @@ runs:
2424 if [[ -f $APAMA_CACHE_TAR ]]; then
2525 echo Unpacking Apama installation from cache at $APAMA_CACHE_TAR
2626
27- echo 1 $_SAG_INSTALL_PATH
2827 mkdir $_SAG_INSTALL_PATH
29- echo 2
3028 cd $_SAG_INSTALL_PATH
31- echo 3
32- which tar
33- tar -xf $APAMA_CACHE_TAR
34- echo 4
35- ls
29+ time tar -xf $APAMA_CACHE_TAR
3630
3731 # Check it unpacked correctly
38- ls $_SAG_INSTALL_PATH/Apama > /dev/null
32+ ls $_SAG_INSTALL_PATH/Apama
3933 else
4034 echo No installation found in cache $APAMA_CACHE_TAR
4135 # Cache miss - need to install it
4236 mkdir ../apama-installer
4337 cd ../apama-installer
4438 DOWNLOAD_URL=https://downloads.apamacommunity.com/apama/${{ inputs.apama-version }}/apama_${{ inputs.apama-version }}_$DOWNLOAD_PLATFORM.zip
4539 echo Downloading from $DOWNLOAD_URL
40+ # First use head to check the URL is valid (gives a more helpful message if it doesn't)
41+ curl --retry 2 --head $DOWNLOAD_URL
4642 curl --retry 2 --output apama-installer.zip $DOWNLOAD_URL
4743
4844 unzip -q apama-installer.zip
@@ -104,10 +100,10 @@ runs:
104100 # Ideally we'd just run this in a cmd shell, but can't since it wouldn't work on Linux, and GH composite
105101 # action steps don't yet support "if".
106102 # Can't do this as part of the bash shell above, as Windows Git Bash pollutes the PATH environment.
103+ # Python to the rescue!
107104 import os
108- if os.name== 'nt':
105+ if os.name == 'nt': # Windows
109106 print('Adding apama_env.bat environment to GITHUB_ENV')
110107 cmd = r'cmd /c "%APAMA_HOME%\bin\apama_env.bat && set >> %GITHUB_ENV%"'
111- print('Executing: %s' % cmd)
112108 os.system(cmd)
113109
0 commit comments