Skip to content

Commit

Permalink
move long bash script into its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Nov 2, 2023
1 parent 19dcff3 commit 01b0c0c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
23 changes: 23 additions & 0 deletions .github/scripts/configure_odbc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set -e
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
g++ \
unixodbc-dev \
libsasl2-modules-gssapi-mit \
unzip

sudo apt-get install -y curl
rm -rf /tmp && mkdir /tmp

curl -OL "https://databricks.com/wp-content/uploads/drivers-2020/SimbaSparkODBC-2.6.16.1019-Debian-64bit.zip"

unzip SimbaSparkODBC-2.6.16.1019-Debian-64bit.zip -d /tmp/
sudo dpkg -i /tmp/SimbaSparkODBC-*/*.deb
echo "--------------------------------------------"
sudo sh -c echo "[Simba]\nDriver = /opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini

rm -rf /tmp
sudo dpkg -l | grep Simba # confirm that the driver is installed

sudo ldd /opt/simba/spark/lib/64/libsparkodbc_sb64.so
echo "--------------------------------------------"
odbcinst -j
24 changes: 1 addition & 23 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,29 +235,7 @@ jobs:
- name: Configure ODBC
if: ${{ matrix.test != 'spark-databricks-http' }}
run: |
set -e
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
g++ \
unixodbc-dev \
libsasl2-modules-gssapi-mit \
unzip
sudo apt-get install -y curl
rm -rf /tmp && mkdir /tmp
curl -OL "https://databricks.com/wp-content/uploads/drivers-2020/SimbaSparkODBC-2.6.16.1019-Debian-64bit.zip" \
unzip SimbaSparkODBC-2.6.16.1019-Debian-64bit.zip -d /tmp/
sudo dpkg -i /tmp/SimbaSparkODBC-*/*.deb
echo "--------------------------------------------"
sudo sh -c echo "[Simba]\nDriver = /opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini \
rm -rf /tmp
sudo dpkg -l | grep Simba # confirm that the driver is installed
sudo ldd /opt/simba/spark/lib/64/libsparkodbc_sb64.so
echo "--------------------------------------------"
odbcinst -j
./.github/scripts/configure_odbc.sh
- name: Run tox for Spark ${{ matrix.test }}
run: tox -e integration-${{ matrix.test }}

0 comments on commit 01b0c0c

Please sign in to comment.