Build with Unit Tests #806
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: Build with Unit Tests | |
on: [push, pull_request] | |
jobs: | |
caffa-x64: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
include: | |
- os: ubuntu-22.04 | |
triplet: x64-linux | |
steps: | |
- name: Install gRPC | |
run: sudo apt-get install libgrpc++-dev libprotoc-dev protobuf-compiler-grpc libboost-all-dev | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build Caffa with Unit Tests | |
uses: lukka/run-cmake@v3 | |
with: | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
cmakeAppendedArgs: '-DCAFFA_GRPC_INTERFACE=ON -DCAFFA_BUILD_UNIT_TESTS=ON -DCAFFA_BUILD_EXAMPLES=ON' | |
buildDirectory: ${{ github.workspace }}/cmakebuild | |
buildWithCMakeArgs: '--config Release' | |
- name: Run Unit Tests Linux | |
shell: bash | |
run: | | |
cmakebuild/bin/caffaCore_UnitTests | |
cmakebuild/bin/caffaIoCore_UnitTests | |
cmakebuild/bin/caffaProjectDataModel_UnitTests | |
cmakebuild/bin/caffaGrpcInterface_UnitTests -V debug | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install Python modules | |
run: | | |
python -m pip install --upgrade pip | |
pip install grpcio-tools setuptools pytest | |
- name: Run pytest | |
run: | | |
cmakebuild/bin/caffaGrpcInterface_ExampleServer & | |
cd Bindings/Python/caffa | |
python -m pytest --log-cli-level=DEBUG | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | |
- name: Build with Gradle | |
run: | | |
cmakebuild/bin/caffaGrpcInterface_ExampleServer & | |
cd Bindings/Java | |
gradle wrapper | |
./gradlew build | |