-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (39 loc) · 1.17 KB
/
check_code_generation.yml
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
name: check tlm_cmd code generation
on:
push:
branches:
- main
- develop
pull_request:
jobs:
check_code_generate:
strategy:
fail-fast: false
matrix:
user:
- mobc
- subobc
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: prepare code-generator settings
working-directory: ./code-generator
run: |
cp "./settings_${{ matrix.user }}.json" ./settings.json
# FIXME: subobc の生成コードには commit hash が焼かれていて現状だと diff が出てしまうため,とりあえずスキップする
- name: skip subobc code generation
working-directory: ./code-generator
run: |
jq '.is_main_obc = 0' < settings.json > settings_tmp.json
mv settings_tmp.json settings.json
- name: run code-generator
working-directory: ./code-generator
run: |
python GenerateC2ACode.py
- name: check diff
run: |
git add .
if ! git diff --exit-code --cached; then
echo "threre are some diff after code generation"
exit 1
fi