Skip to content

Commit

Permalink
cache thrift
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjmh committed Sep 30, 2024
1 parent fb3b4a3 commit ff6771b
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
name: Build with spark-version ${{ matrix.spark-profile }}

steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -22,20 +23,27 @@ jobs:
- name: Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
path: |
~/.m2/repository
/usr/local/bin/thrift
key: ${{ runner.os }}-maven
restore-keys: |
${{ runner.os }}-maven
- name: setup-thrift
run: |
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
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 }}

0 comments on commit ff6771b

Please sign in to comment.