gcontini
2021-05-19 90ff59fbd8e41b457576116e87a6a79c44b678ed
.github/workflows/cpp.yml
@@ -1,21 +1,46 @@
name: CI
on:
  push:
name: Github_CI
on:
   push:
jobs:
  build-windows:
    runs-on: windows-2019
   build-windows:
      runs-on: ${{ matrix.os }}
      strategy:
        fail-fast: false
        matrix:
          build_type: ["Debug", "Release"]
          os: ["windows-2019", "windows-2016"]
          static: ["true","false"]
    steps:
    - uses: actions/checkout@v1
    - name: Setup Boost (Windows / Linux latest)
      shell: bash
      run: echo "BOOST_ROOT=$BOOST_ROOT_1_72_0" >> $GITHUB_ENV
    - name: Compile & Test
      run: |
        mkdir -p build
        cd build
        cmake -G "Visual Studio 16 2019" -DBUILD_TESTING:BOOL=OFF -DLCC_PROJECT_NAME:STRING=geode ..
        cmake --build . --config Debug
      shell: bash
      steps:
      -  uses: actions/checkout@v1
      -  name: Setup
         shell: bash
         run: env
      -  name: install boost
         shell: bash
         run: |
            choco install -y boost-msvc-14.2
            echo "BOOST_ROOT=C:/local/boost_1_74_0" >> $GITHUB_ENV
      -  name: Compile
         run: |
            cd build
            cmake .. -A x64 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DSTATIC_RUNTIME:BOOL=${{matrix.static}} -DLCC_PROJECT_NAME:STRING=test -DCMAKE_INSTALL_PREFIX=C:/licensecc
            cmake --build . --target install --config ${{ matrix.build_type }}
         shell: bash
      -  name: Test
         run: |
            cd build
            ctest -C ${{ matrix.build_type }}
         shell: bash
         env:
            CTEST_OUTPUT_ON_FAILURE: 1
            VIRTUAL_ENV: VM
      -  name: Inspector
         run: C:/licensecc/bin/test/lccinspector.exe
         shell: bash
      - name: On Failure print logs
        if: ${{ failure() }}
        run: |
           type $env:temp/open-license.log