This repository was archived by the owner on Nov 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (81 loc) · 2.75 KB
/
nightly-linux.yml
File metadata and controls
93 lines (81 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Nightly Build
on:
schedule:
- cron: '0 0 * * *'
jobs:
check_changes:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: check latest commit is less than a day
id: should_run
continue-on-error: true
run: |
export latest_commit="`git log -1 --format='%H'`"
echo "Latest commit: ${latest_commit}"
test -z $(git rev-list --after="24 hours" ${latest_commit}) && echo "should_run=false" >> $GITHUB_OUTPUT
build:
needs: [check_changes]
if: ${{ needs.check_changes.outputs.should_run != 'false' }}
name: ${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}}
runs-on: ubuntu-latest
environment: CI
strategy:
fail-fast: false
matrix:
name: [linux-gcc, linux-clang]
buildtype: [debug]
include:
- name: linux-gcc
family: linux
compiler: gcc
- name: linux-clang
family: linux
compiler: clang
steps:
- uses: actions/checkout@v3
with:
ref: master
submodules: true
- name: Setup Clang
uses: egor-tensin/setup-clang@v1
if: ${{matrix.compiler}} == clang
with:
version: latest
platform: x64
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
key: ${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}}
max-size: 1000M
- name: Install Valgrind
run: sudo apt install valgrind
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Run vcpkg
uses: lukka/run-vcpkg@v10
with:
appendedCacheKey: ${{matrix.name}}${{matrix.buildtype}}
- name: Run CTest workflow
run: |
export DOGEN_BUILD_PROVIDER="github"
export DOGEN_BUILD_COMMIT="${GITHUB_SHA}"
export DOGEN_BUILD_NUMBER="${GITHUB_RUN_NUMBER}"
export DOGEN_BUILD_TIMESTAMP=`date "+%Y/%m/%d %H:%M:%S"`
export preset=${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}}
export cmake_args="build_group=Nightly,preset=${preset}"
cmake_args="${cmake_args},code_coverage=1"
ctest -VV --preset ${preset} --script "CTest.cmake,${cmake_args}"
- name: Gitter
if: always()
uses: juztcode/gitter-github-action@v2
with:
room-id: ${{secrets.GITTER_ROOM_ID}}
token: ${{secrets.GITTER_TOKEN}}
text: ${{github.workflow}} - ${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}} - ${{job.status}}