-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (75 loc) · 2.01 KB
/
build.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
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
name: Build, Test, Lint, Coverage, and Documentation
on:
push:
branches: [ "main" ]
pull_request:
branches: ["main"]
types:
- opened
- synchronize
- reopened
jobs:
build:
runs-on: ubuntu-latest
container: nguy8tri/huskysat:latest
steps:
- uses: actions/checkout@v4
- name: Build all (Twice)
run: (make compile || make compile)
test:
runs-on: ubuntu-latest
container: nguy8tri/huskysat:latest
steps:
- uses: actions/checkout@v4
- name: Test (Twice)
run: (make test || make test)
lint:
runs-on: ubuntu-latest
container: nguy8tri/huskysat:latest
steps:
- uses: actions/checkout@v4
- name: Stylecheck
run: make google_stylecheck
- name: Test Stylecheck
run: make google_stylecheck_test
- name: Line Endings
uses: erclu/check-crlf@v1
coverage:
runs-on: ubuntu-latest
container: nguy8tri/huskysat:latest
steps:
- uses: actions/checkout@v4
- name: Coverage (Twice)
run: (make coverage || make coverage)
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: Coverage Report
path: build/documentation/coverage
documentation:
runs-on: ubuntu-latest
container: nguy8tri/huskysat:latest
needs: [build, lint, coverage]
steps:
- uses: actions/checkout@v4
- name: Coverage
run: make coverage
- name: Doxygen
run: make doxygen_generate
- name: Install rsync
run: apt install -y rsync
- name: Set Target Folder in documentation
id: set-folder
run: |
if [ "${{ github.ref_name }}" = "main" ]; then
echo "TARGET_FOLDER=." >> $GITHUB_ENV
else
echo "TARGET_FOLDER=${{ github.ref_name }}" >> $GITHUB_ENV
fi
shell: bash
- name: Upload Pages Artifact
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: documentation
folder: build/documentation/
target-folder: ${{ env.TARGET_FOLDER }}