Fix install for ANTLR contrib script and CI dependency caching. (#4196)
authorMathias Preiner <mathias.preiner@gmail.com>
Wed, 1 Apr 2020 04:31:13 +0000 (21:31 -0700)
committerGitHub <noreply@github.com>
Wed, 1 Apr 2020 04:31:13 +0000 (21:31 -0700)
.github/workflows/ci.yml
contrib/get-antlr-3.4

index 99654b7949055067a13fa9ece938ded53b2487f8..705e0679d511f381b780dd25f03e47ad18ad1b57 100644 (file)
@@ -87,7 +87,7 @@ jobs:
       uses: actions/cache@v1
       with:
         path: deps/install
-        key: ${{ runner.os }}-deps-${{ hashFiles('contrib/get-**.sh') }}-${{ hashFiles('.github/workflows/ci.yml') }}
+        key: ${{ runner.os }}-deps-${{ hashFiles('contrib/get-**') }}-${{ hashFiles('.github/workflows/ci.yml') }}
 
     - name: Setup Dependencies
       if: steps.restore-deps.outputs.cache-hit != 'true'
index 9ab0695b7d364b8a485e16cfdcda190d7c9aabbe..bc75e833976459fdec26ab2b1edc7cb53b133826 100755 (executable)
@@ -26,15 +26,15 @@ if [ -z "${MACHINE_TYPE}" ]; then
   MACHINE_TYPE=$(${CONFIG_GUESS_SCRIPT} | sed 's,-.*,,')
 fi
 
-mkdir -p "$ANTLR_HOME_DIR/share/java"
+mkdir -p "$INSTALL_DIR/share/java"
 webget \
   "https://www.antlr3.org/download/antlr-3.4-complete.jar" \
-  "$ANTLR_HOME_DIR/share/java/antlr-3.4-complete.jar"
+  "$INSTALL_DIR/share/java/antlr-3.4-complete.jar"
 
 mkdir -p "$ANTLR_HOME_DIR/bin"
 tee "$ANTLR_HOME_DIR/bin/antlr3" <<EOF
 #!/usr/bin/env bash
-export CLASSPATH=$ANTLR_HOME_DIR/share/java/antlr-3.4-complete.jar:\$CLASSPATH
+export CLASSPATH=$INSTALL_DIR/share/java/antlr-3.4-complete.jar:\$CLASSPATH
 exec java org.antlr.Tool "\$@"
 EOF
 chmod a+x "$ANTLR_HOME_DIR/bin/antlr3"