diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da94f1de25..220706b314 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,21 +25,23 @@ jobs: make install make check cd contrib && make && sudo make install - - name: Copy ANTLR jar file - run: | - cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ - sudo cp antlr-4.9.3-complete.jar /usr/local/lib - name: Compile ANTLR + id: compile-antlr + if: always() && steps.postgres.outcome == 'success' run: | + ANTLR_VERSION=4.9.3 + + cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ + sudo cp "antlr-$ANTLR_VERSION-complete.jar" /usr/local/lib cd .. - wget http://www.antlr.org/download/antlr4-cpp-runtime-4.9.3-source.zip - unzip -d antlr4 antlr4-cpp-runtime-4.9.3-source.zip + wget "http://www.antlr.org/download/antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" + unzip -d antlr4 "antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" cd antlr4 - mkdir build && cd build - cmake .. -D ANTLR_JAR_LOCATION=/usr/local/lib/antlr-4.9.3-complete.jar -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True + mkdir build && cd build + cmake .. -D ANTLR_JAR_LOCATION="/usr/local/lib/antlr-$ANTLR_VERSION-complete.jar" -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True make sudo make install - cp /usr/local/lib/libantlr4-runtime.so.4.9.3 ~/postgres/lib/ + cp "/usr/local/lib/libantlr4-runtime.so.$ANTLR_VERSION" ~/postgres/lib/ - name: Set env variables and build extensions run: | export PG_CONFIG=~/postgres/bin/pg_config diff --git a/.github/workflows/dotnet-framework.yml b/.github/workflows/dotnet-framework.yml index d94638cb88..e21fd6230a 100644 --- a/.github/workflows/dotnet-framework.yml +++ b/.github/workflows/dotnet-framework.yml @@ -8,6 +8,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Clone, build, and run tests for Postgres engine + id: postgres + if: always() run: | cd .. git clone https://github.com/babelfish-for-postgresql/postgresql_modified_for_babelfish.git @@ -18,21 +20,23 @@ jobs: make -j 4 2>error.txt make install cd contrib && make && sudo make install - - name: Copy ANTLR jar file - run: | - cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ - sudo cp antlr-4.9.3-complete.jar /usr/local/lib - name: Compile ANTLR + id: compile-antlr + if: always() && steps.postgres.outcome == 'success' run: | + ANTLR_VERSION=4.9.3 + + cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ + sudo cp "antlr-$ANTLR_VERSION-complete.jar" /usr/local/lib cd .. - wget http://www.antlr.org/download/antlr4-cpp-runtime-4.9.3-source.zip - unzip -d antlr4 antlr4-cpp-runtime-4.9.3-source.zip + wget "http://www.antlr.org/download/antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" + unzip -d antlr4 "antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" cd antlr4 - mkdir build && cd build - cmake .. -D ANTLR_JAR_LOCATION=/usr/local/lib/antlr-4.9.3-complete.jar -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True + mkdir build && cd build + cmake .. -D ANTLR_JAR_LOCATION="/usr/local/lib/antlr-$ANTLR_VERSION-complete.jar" -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True make sudo make install - cp /usr/local/lib/libantlr4-runtime.so.4.9.3 ~/postgres/lib/ + cp "/usr/local/lib/libantlr4-runtime.so.$ANTLR_VERSION" ~/postgres/lib/ - name: Set env variables and build extensions run: | export PG_CONFIG=~/postgres/bin/pg_config diff --git a/.github/workflows/isolation-tests.yml b/.github/workflows/isolation-tests.yml index 210d98ba2b..baabcb7bc5 100644 --- a/.github/workflows/isolation-tests.yml +++ b/.github/workflows/isolation-tests.yml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Clone, build, and run tests for Postgres engine + id: postgres + if: always() run: | cd .. git clone https://github.com/babelfish-for-postgresql/postgresql_modified_for_babelfish.git @@ -22,21 +24,23 @@ jobs: make -j 4 2>error.txt make install cd contrib && make && sudo make install - - name: Copy ANTLR jar file - run: | - cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ - sudo cp antlr-4.9.3-complete.jar /usr/local/lib - name: Compile ANTLR + id: compile-antlr + if: always() && steps.postgres.outcome == 'success' run: | + ANTLR_VERSION=4.9.3 + + cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ + sudo cp "antlr-$ANTLR_VERSION-complete.jar" /usr/local/lib cd .. - wget http://www.antlr.org/download/antlr4-cpp-runtime-4.9.3-source.zip - unzip -d antlr4 antlr4-cpp-runtime-4.9.3-source.zip + wget "http://www.antlr.org/download/antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" + unzip -d antlr4 "antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" cd antlr4 - mkdir build && cd build - cmake .. -D ANTLR_JAR_LOCATION=/usr/local/lib/antlr-4.9.3-complete.jar -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True + mkdir build && cd build + cmake .. -D ANTLR_JAR_LOCATION="/usr/local/lib/antlr-$ANTLR_VERSION-complete.jar" -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True make sudo make install - cp /usr/local/lib/libantlr4-runtime.so.4.9.3 ~/postgres/lib/ + cp "/usr/local/lib/libantlr4-runtime.so.$ANTLR_VERSION" ~/postgres/lib/ - name: Set env variables and build extensions run: | export PG_CONFIG=~/postgres/bin/pg_config diff --git a/.github/workflows/odbc-framework.yml b/.github/workflows/odbc-framework.yml index d1ff48b9d3..277469a9fe 100644 --- a/.github/workflows/odbc-framework.yml +++ b/.github/workflows/odbc-framework.yml @@ -8,6 +8,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Clone, build, and run tests for Postgres engine + id: postgres + if: always() run: | cd .. git clone https://github.com/babelfish-for-postgresql/postgresql_modified_for_babelfish.git @@ -18,21 +20,23 @@ jobs: make -j 4 2>error.txt make install cd contrib && make && sudo make install - - name: Copy ANTLR jar file - run: | - cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ - sudo cp antlr-4.9.3-complete.jar /usr/local/lib - name: Compile ANTLR + id: compile-antlr + if: always() && steps.postgres.outcome == 'success' run: | + ANTLR_VERSION=4.9.3 + + cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ + sudo cp "antlr-$ANTLR_VERSION-complete.jar" /usr/local/lib cd .. - wget http://www.antlr.org/download/antlr4-cpp-runtime-4.9.3-source.zip - unzip -d antlr4 antlr4-cpp-runtime-4.9.3-source.zip + wget "http://www.antlr.org/download/antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" + unzip -d antlr4 "antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" cd antlr4 - mkdir build && cd build - cmake .. -D ANTLR_JAR_LOCATION=/usr/local/lib/antlr-4.9.3-complete.jar -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True + mkdir build && cd build + cmake .. -D ANTLR_JAR_LOCATION="/usr/local/lib/antlr-$ANTLR_VERSION-complete.jar" -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True make sudo make install - cp /usr/local/lib/libantlr4-runtime.so.4.9.3 ~/postgres/lib/ + cp "/usr/local/lib/libantlr4-runtime.so.$ANTLR_VERSION" ~/postgres/lib/ - name: Set env variables and build extensions run: | export PG_CONFIG=~/postgres/bin/pg_config diff --git a/.github/workflows/python-framework.yml b/.github/workflows/python-framework.yml index 5c17f7cd9b..d80005a8a0 100644 --- a/.github/workflows/python-framework.yml +++ b/.github/workflows/python-framework.yml @@ -8,6 +8,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Clone, build, and run tests for Postgres engine + id: postgres + if: always() run: | cd .. git clone https://github.com/babelfish-for-postgresql/postgresql_modified_for_babelfish.git @@ -18,21 +20,23 @@ jobs: make -j 4 2>error.txt make install cd contrib && make && sudo make install - - name: Copy ANTLR jar file - run: | - cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ - sudo cp antlr-4.9.3-complete.jar /usr/local/lib - name: Compile ANTLR + id: compile-antlr + if: always() && steps.postgres.outcome == 'success' run: | + ANTLR_VERSION=4.9.3 + + cd contrib/babelfishpg_tsql/antlr/thirdparty/antlr/ + sudo cp "antlr-$ANTLR_VERSION-complete.jar" /usr/local/lib cd .. - wget http://www.antlr.org/download/antlr4-cpp-runtime-4.9.3-source.zip - unzip -d antlr4 antlr4-cpp-runtime-4.9.3-source.zip + wget "http://www.antlr.org/download/antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" + unzip -d antlr4 "antlr4-cpp-runtime-$ANTLR_VERSION-source.zip" cd antlr4 - mkdir build && cd build - cmake .. -D ANTLR_JAR_LOCATION=/usr/local/lib/antlr-4.9.3-complete.jar -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True + mkdir build && cd build + cmake .. -D ANTLR_JAR_LOCATION="/usr/local/lib/antlr-$ANTLR_VERSION-complete.jar" -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_DEMO=True make sudo make install - cp /usr/local/lib/libantlr4-runtime.so.4.9.3 ~/postgres/lib/ + cp "/usr/local/lib/libantlr4-runtime.so.$ANTLR_VERSION" ~/postgres/lib/ - name: Set env variables and build extensions run: | export PG_CONFIG=~/postgres/bin/pg_config diff --git a/test/python/isolationtest/specParserVisitorImpl.py b/test/python/isolationtest/specParserVisitorImpl.py index 2df644199b..b376331cb2 100644 --- a/test/python/isolationtest/specParserVisitorImpl.py +++ b/test/python/isolationtest/specParserVisitorImpl.py @@ -2,7 +2,7 @@ from .parser.specParserVisitor import specParserVisitor -# Generated from specParser.g4 by ANTLR 4.9.2 +# Generated from specParser.g4 by ANTLR 4.9.3 from antlr4 import * from .parser.specParser import specParser