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 20
Expand file tree
/
Copy pathnightly-create-fullgen-branch.yml
More file actions
89 lines (80 loc) · 2.83 KB
/
nightly-create-fullgen-branch.yml
File metadata and controls
89 lines (80 loc) · 2.83 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
name: Nightly Create Fullgen Branch
on:
schedule:
- cron: '0 0 * * *'
jobs:
check_changes:
runs-on: ubuntu-latest
name: Check latest master 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]
buildtype: [release]
include:
- name: linux-gcc
family: linux
compiler: gcc
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
key: ${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}}
max-size: 1000M
- 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
env:
WITH_FULL_GENERATION: ON
preset: ${{matrix.family}}-${{matrix.compiler}}-${{matrix.buildtype}}
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 DOGEN_BUILD_DATE=`date "+%Y%m%d"`
export cmake_args="build_group=Nightly,preset=${preset},with_full_generation=ON"
cmake_args="${cmake_args},build_postfix=fg,code_coverage=1"
ctest -VV --preset ${preset} --script "CTest.cmake,${cmake_args}"
git config user.name 'MASD bot'
git config user.email marco.craveiro+masdbot@gmail.com
git branch -d fullgen || true
git push origin --delete fullgen || true
git checkout -b fullgen
git add -A 1>/dev/null
git commit -m 'Generated code.' 1>/dev/null
git push origin fullgen
- name: Gitter
if: always()
uses: juztcode/gitter-github-action@v2
with:
room-id: ${{secrets.GITTER_ROOM_ID}}
token: ${{secrets.GITTER_TOKEN}}
text: ${{github.workflow}} - ${{job.status}}