Skip to content

[ISSUE-4351] Add github action for building #2

[ISSUE-4351] Add github action for building

[ISSUE-4351] Add github action for building #2

Workflow file for this run

name: Build Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
spark-profile: [ 'spark-2.3','spark-2.4','spark-3.1' ]
name: Build with spark-version ${{ matrix.spark-profile }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.m2/repository
/usr/local/bin/thrift
key: ${{ runner.os }}-maven
restore-keys: |
${{ runner.os }}-maven
- name: setup-thrift
run: |
if [ ! -f "/usr/local/bin/thrift" ];then
echo "build thrift binary"
sudo apt-get update -qq
sudo apt-get install -qq protobuf-compiler
sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
wget -qO- https://archive.apache.org/dist/thrift/0.20.0/thrift-0.20.0.tar.gz | tar zxf -
cd thrift-0.20.0/
chmod +x ./configure
./configure --disable-libs
sudo make -j4 install
else
echo "use cache thrift binary"
fi
- name: install
run: |
mvn clean install -DskipTests -Pbuild-with-format -P${{ matrix.spark-profile }}