|
| 1 | +name: Nightly Build |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 0 * * *' |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + name: ${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}} |
| 10 | + runs-on: ${{matrix.os}}-latest |
| 11 | + environment: CI |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + name: [linux-gcc, linux-clang] |
| 16 | + buildtype: [debug] |
| 17 | + include: |
| 18 | + - name: linux-gcc |
| 19 | + family: linux |
| 20 | + os: ubuntu |
| 21 | + compiler: gcc |
| 22 | + - name: linux-clang |
| 23 | + family: linux |
| 24 | + os: ubuntu |
| 25 | + compiler: clang |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v3 |
| 28 | + with: |
| 29 | + ref: master |
| 30 | + submodules: true |
| 31 | + |
| 32 | + - name: Setup Clang |
| 33 | + uses: egor-tensin/setup-clang@v1 |
| 34 | + if: ${{matrix.compiler}} == clang |
| 35 | + with: |
| 36 | + version: latest |
| 37 | + platform: x64 |
| 38 | + |
| 39 | + - name: Setup ccache |
| 40 | + uses: hendrikmuhs/ccache-action@v1.2 |
| 41 | + with: |
| 42 | + variant: sccache |
| 43 | + key: ${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}} |
| 44 | + max-size: 1000M |
| 45 | + |
| 46 | + - name: Install Valgrind |
| 47 | + run: sudo apt install valgrind |
| 48 | + |
| 49 | + - name: Get latest CMake |
| 50 | + uses: lukka/get-cmake@latest |
| 51 | + |
| 52 | + - name: Run vcpkg |
| 53 | + uses: lukka/run-vcpkg@v10 |
| 54 | + with: |
| 55 | + appendedCacheKey: ${{matrix.name}}${{matrix.buildtype}} |
| 56 | + |
| 57 | + - name: Run CTest workflow |
| 58 | + run: | |
| 59 | + export DOGEN_BUILD_PROVIDER="github" |
| 60 | + export DOGEN_BUILD_COMMIT="${GITHUB_SHA}" |
| 61 | + export DOGEN_BUILD_NUMBER="${GITHUB_RUN_NUMBER}" |
| 62 | + export DOGEN_BUILD_TIMESTAMP=`date "+%Y/%m/%d %H:%M:%S"` |
| 63 | + export preset=${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}} |
| 64 | + export cmake_args="build_group=Nightly,preset=${preset}" |
| 65 | + cmake_args="${cmake_args},code_coverage=1" |
| 66 | + ctest -VV --preset ${preset} --script "CTest.cmake,${cmake_args}" |
| 67 | +
|
| 68 | + - name: Gitter |
| 69 | + if: always() |
| 70 | + uses: juztcode/gitter-github-action@v2 |
| 71 | + with: |
| 72 | + room-id: ${{secrets.GITTER_ROOM_ID}} |
| 73 | + token: ${{secrets.GITTER_TOKEN}} |
| 74 | + text: ${{github.workflow}} - ${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}} - ${{job.status}} |
0 commit comments