Skip to content

Commit

Permalink
Update ANTLR version in gh action workflow files. (babelfish-for-post…
Browse files Browse the repository at this point in the history
…gresql#677)

This commit updates the antlr version used by Babelfish from 4.9.2 to
4.9.3. The 4.9.2 version contains a CMakeLists.txt file that uses the
git:// protocol to fetch a particular repository, which will not be
supported starting March 15. In the 4.9.3 version the git:// protocol
was replaced with the https:// protocol, which works correctly

Signed-off-by: Sertay Sener <seners@amazon.com>
  • Loading branch information
seneramz authored and nasbyj committed Mar 31, 2022
1 parent 2d70e54 commit 2755f80
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 46 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/dotnet-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/isolation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/odbc-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/python-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/python/isolationtest/specParserVisitorImpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2755f80

Please sign in to comment.