blob: 81173a24b33ae7d6a0428169c98bf3a92b22957e [file] [log] [blame]
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
# CPP compiling is too slow, so let's do it in parallel with testing other modules.
# As there is no Java client, we just use one JDK.
name: Clients_except_Java CI with Maven
on:
push:
branches:
- master
- "rel/*"
pull_request:
branches:
- master
- "rel/*"
# allow manually run the action:
workflow_dispatch:
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
jobs:
build:
strategy:
fail-fast: false
max-parallel: 20
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: 11
- name: Install CPP Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
shell: bash
run: sudo apt-get update && sudo apt-get install libboost-all-dev
- name: Install CPP Dependencies (Mac)`
if: matrix.os == 'macos-latest'
shell: bash
run: |
brew install boost
brew install bison
echo 'export PATH=/usr/local/opt/bison/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile && export LDFLAGS="-L/usr/local/opt/bison/lib"
brew install openssl
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: client-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
- name: Test with Maven
run: mvn -B clean integration-test -P compile-cpp -Dtsfile.test.skip=true -Djdbc.test.skip=true -Diotdb.test.skip=true -Dtest.port.closed=true -pl server,client-cpp,example/client-cpp-example -am
build-win:
strategy:
fail-fast: false
max-parallel: 20
matrix:
os: [windows-2019]
runs-on: ${{ matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: client-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
- name: Install Win_Flex_Bison
run: mkdir D:\a\cpp ; `
Invoke-WebRequest https://github.com/lexxmark/winflexbison/releases/download/v2.5.24/win_flex_bison-2.5.24.zip -OutFile D:\a\cpp\win_flex_bison.zip ; `
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";D:\a\cpp", "User") ; `
- name: Download Boost
run: choco install boost-msvc-14.2
- name: Install Boost
run: cd C:\local\boost_1_74_0 ; `
.\bootstrap.bat ; `
.\b2.exe
- name: Install OpenSSL
run: choco install openssl
- name: Add Flex and Bison Path and OpenSSL
shell: bash
run: cd /d/a/cpp && unzip win_flex_bison.zip && mv win_flex.exe flex.exe && mv win_bison.exe bison.exe && echo 'export PATH=/d/a/cpp:$PATH' >> ~/.bash_profile && source ~/.bash_profile
- name: Test with Maven
shell: bash
run: source ~/.bash_profile && mvn -B clean integration-test -P compile-cpp -Dboost.include.dir=/c/local/boost_1_74_0 -Dboost.library.dir=/c/local/boost_1_74_0/stage/lib -Dtsfile.test.skip=true -Djdbc.test.skip=true -Diotdb.test.skip=true -Dtest.port.closed=true -Denforcer.skip=true -pl server,client-cpp,example/client-cpp-example -am