-
Notifications
You must be signed in to change notification settings - Fork 97
66 lines (59 loc) · 1.74 KB
/
generator.yaml
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
name: Generated artifacts
on:
workflow_dispatch:
push:
branches:
- master
- staging
tags:
- "*"
pull_request:
paths:
- "generator/**"
- "spec/**"
- "c/test/**"
- "java/build.gradle"
- "java/test/**"
- "rust/sbp/tests/**"
jobs:
generation:
name: Generated artifacts
runs-on: ubuntu-20.04
container:
image: swiftnav/libsbp-build:2023-12-18
options: --user root
volumes:
- ${{ github.workspace }}:/mnt/workspace
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set safe git directory
run: |
git config --global --add safe.directory /__w/libsbp/libsbp
- name: Generate tests
run: |
rm c/test/auto_check_*.c c/test/cpp/auto_check_*.cc java/test/auto_check_*.java rust/sbp/tests/integration/auto_check_*.rs
make gen-c gen-java gen-rust gen-jsonschema gen-haskell gen-python gen-javascript gen-protobuf
make quicktype
- name: Check generated tests are up to date
run: |
git add c/test/ rust/sbp/tests/
git diff --cached --exit-code
git diff --exit-code
- name: Generate javadocs for java
run: make javadocs # emits java/build/docs/javadoc, not used
- name: Generate pdf
id: pdf
run: |
make pdf
cp docs/sbp.pdf .
echo "::set-output name=artifact_name::sbp.pdf"
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.pdf.outputs.artifact_name }}
path: ${{ steps.pdf.outputs.artifact_name }}
# - name: Check generated pdf
# run: |
# git diff --name-only --exit-code