Test with Ruby 3.3 on CI #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
jobs: | |
spark: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- ruby: 3.3 | |
hexspace_mode: sasl | |
beeline: -u jdbc:hive2://localhost:10000 | |
- ruby: 3.2 | |
hexspace_mode: sasl | |
beeline: -u jdbc:hive2://localhost:10000 | |
- ruby: 3.1 | |
hexspace_mode: nosasl | |
hiveconf: --hiveconf hive.server2.authentication=NOSASL | |
beeline: -u "jdbc:hive2://localhost:10000/;auth=noSasl" -n anonymous | |
- ruby: "3.0" | |
hexspace_mode: http | |
hiveconf: --hiveconf hive.server2.transport.mode=http | |
beeline: -u "jdbc:hive2://localhost:10001/?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice" | |
env: | |
HEXSPACE_MODE: ${{ matrix.hexspace_mode }} | |
SPARK_VERSION: 3.4.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- uses: actions/cache@v3 | |
with: | |
path: ~/spark | |
key: spark-${{ env.SPARK_VERSION }} | |
id: cache-spark | |
- name: Download Spark | |
if: steps.cache-spark.outputs.cache-hit != 'true' | |
run: | | |
wget -q https://archive.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-hadoop3.tgz | |
tar xzf spark-$SPARK_VERSION-bin-hadoop3.tgz | |
mv spark-$SPARK_VERSION-bin-hadoop3 ~/spark | |
- run: ~/spark/sbin/start-thriftserver.sh ${{ matrix.hiveconf }} && sleep 20 | |
- run: ~/spark/bin/beeline ${{ matrix.beeline }} -e 'CREATE DATABASE hexspace_test;' | |
- run: bundle exec rake test | |
hive: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- ruby: "3.0" | |
hexspace_mode: sasl | |
beeline: -u jdbc:hive2://localhost:10000 | |
env: | |
HADOOP_HEAPSIZE: 2048 | |
HADOOP_VERSION: 3.3.5 | |
HEXSPACE_MODE: ${{ matrix.hexspace_mode }} | |
HIVE_VERSION: 3.1.3 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- uses: actions/cache@v3 | |
with: | |
path: ~/hadoop | |
key: hadoop-${{ env.HADOOP_VERSION }} | |
id: cache-hadoop | |
- name: Download Hadoop | |
if: steps.cache-hadoop.outputs.cache-hit != 'true' | |
run: | | |
wget -q https://apache.osuosl.org/hadoop/common/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz | |
tar xzf hadoop-$HADOOP_VERSION.tar.gz | |
mv hadoop-$HADOOP_VERSION ~/hadoop | |
- uses: actions/cache@v3 | |
with: | |
path: ~/hive | |
key: hive-${{ env.HIVE_VERSION }}-hadoop-${{ env.HADOOP_VERSION }} | |
id: cache-hive | |
- name: Download Hive | |
if: steps.cache-hive.outputs.cache-hit != 'true' | |
run: | | |
wget -q https://apache.osuosl.org/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz | |
tar xzf apache-hive-$HIVE_VERSION-bin.tar.gz | |
mv apache-hive-$HIVE_VERSION-bin ~/hive | |
# same fix as Homebrew | |
rm ~/hive/lib/guava-19.0.jar | |
ln -s ~/hadoop/share/hadoop/common/lib/guava-27.0-jre.jar ~/hive/lib | |
- run: echo "$HOME/hadoop/bin" >> $GITHUB_PATH | |
- run: ~/hive/bin/schematool -dbType derby -initSchema | |
- run: | | |
mkdir /tmp/warehouse | |
~/hive/bin/hiveserver2 --hiveconf hive.metastore.warehouse.dir=/tmp/warehouse --hiveconf hive.root.logger=INFO,console ${{ matrix.hiveconf }} & | |
sleep 120 | |
# - run: ~/hive/bin/beeline ${{ matrix.beeline }} -e 'CREATE DATABASE hexspace_test;' | |
# - run: bundle exec rake test |