Define code style for spark and java and add code format check to CI #36
Workflow file for this run
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: GraphAr Java CI | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'cpp/include/**' | ||
- 'java/**' | ||
- '.github/workflows/java.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'cpp/include/**' | ||
- 'java/**' | ||
- '.github/workflows/java.yml' | ||
concurrency: | ||
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
jobs: | ||
GraphAr-java: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install dependencies | ||
run: | | ||
# install the latest arrow deb to test arrow | ||
wget -c https://apache.jfrog.io/artifactory/arrow/"$(lsb_release --id --short | tr 'A-Z' 'a-z')"/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb \ | ||
-P /tmp/ | ||
sudo apt-get install -y /tmp/apache-arrow-apt-source-latest-"$(lsb_release --codename --short)".deb | ||
sudo apt-get update -y | ||
sudo apt install -y libarrow-dev libarrow-dataset-dev libarrow-acero-dev libparquet-dev | ||
sudo apt-get install libcurl4-openssl-dev -y | ||
sudo apt-get install llvm-11 clang-11 lld-11 libclang-11-dev libz-dev -y | ||
- name: Code Format Check | ||
run: | | ||
export JAVA_HOME=${JAVA_HOME_11_X64} | ||
pushd java | ||
mvn spotless:check | ||
popd | ||
- name: Build and Install cpp | ||
run: | | ||
mkdir build | ||
pushd build | ||
cmake ../cpp | ||
make -j$(nproc) | ||
sudo make install | ||
popd | ||
- name: Run test | ||
run: | | ||
export JAVA_HOME=${JAVA_HOME_11_X64} | ||
export LLVM11_HOME=/usr/lib/llvm-11 | ||
pushd java | ||
mvn test -Dspotless.check.skip=true | ||
popd |