-
Notifications
You must be signed in to change notification settings - Fork 803
139 lines (138 loc) · 4.76 KB
/
ci-tests.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: ci-tests
on: [push]
permissions: {}
jobs:
ci_tests_ubuntu-22:
runs-on: ubuntu-22.04
name: Ubuntu-22.04 CI Tests
env:
TZ: America/Los_Angeles
steps:
- name: Checkout
uses: actions/checkout@v3
- run: sudo apt-get update
- name: Install additional dependencies
run: sudo apt-get install -y gettext cmake libxslt-dev xsltproc ninja-build libboost-all-dev libgtk-3-dev guile-2.2-dev libgwengui-gtk3-dev libaqbanking-dev libofx-dev libdbi-dev libdbd-sqlite3 libwebkit2gtk-4.0-dev googletest
- name: Install language packs.
run: sudo apt-get --reinstall install -y language-pack-en language-pack-fr
- run: |
echo "ROOT_DIR=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV
- name: Create Directories
run: |
pwd
mkdir $ROOT_DIR/inst
mkdir build
- name: Configure GnuCash
run: |
cd build
cmake -G Ninja -DWITH_PYTHON=ON -DCMAKE_INSTALL_PREFIX=$ROOT_DIR/inst $GITHUB_WORKSPACE
- name: Build and Test GnuCash
run: |
cd build
ninja
ninja distcheck
env:
CTEST_OUTPUT_ON_FAILURE: On
- uses: actions/upload-artifact@v3
if: failure()
with:
name: TestLog
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
ci_tests_ASAN:
runs-on: ubuntu-latest
name: Address Sanitizer CI Tests
continue-on-error: true
env:
TZ: America/Los_Angeles
steps:
- name: Checkout
uses: actions/checkout@v3
- run: sudo apt-get update
- name: Install additional dependencies
run: sudo apt-get install -y gettext cmake libxslt-dev xsltproc ninja-build libboost-all-dev libgtk-3-dev guile-2.2-dev libgwengui-gtk3-dev libaqbanking-dev libofx-dev libdbi-dev libdbd-sqlite3 libwebkit2gtk-4.0-dev googletest
- name: Install language packs.
run: sudo apt-get --reinstall install -y language-pack-en language-pack-fr
- run: |
echo "ROOT_DIR=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV
- name: Create Directories
run: |
pwd
mkdir $ROOT_DIR/inst
mkdir build
- name: Configure GnuCash
run: |
cd build
cmake -G Ninja -DWITH_PYTHON=ON -DCMAKE_INSTALL_PREFIX=$ROOT_DIR/inst $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Asan
- name: Build and Test GnuCash
run: |
cd build
ninja
ninja check
env:
CTEST_OUTPUT_ON_FAILURE: On
- uses: actions/upload-artifact@v3
if: failure()
with:
name: TestLog
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
ci_tests_Coverage:
runs-on: ubuntu-latest
name: Address Sanitizer CI Tests
continue-on-error: true
env:
TZ: America/Los_Angeles
steps:
- name: Checkout
uses: actions/checkout@v3
- run: sudo apt-get update
- name: Install additional dependencies
run: sudo apt-get install -y gettext cmake libxslt-dev xsltproc ninja-build libboost-all-dev libgtk-3-dev guile-2.2-dev libgwengui-gtk3-dev libaqbanking-dev libofx-dev libdbi-dev libdbd-sqlite3 libwebkit2gtk-4.0-dev googletest
- name: Install language packs.
run: sudo apt-get --reinstall install -y language-pack-en language-pack-fr
- run: |
echo "ROOT_DIR=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV
- name: Create Directories
run: |
pwd
mkdir $ROOT_DIR/inst
mkdir build
- name: Configure GnuCash
run: |
cd build
cmake -G Ninja -DWITH_PYTHON=ON -DCMAKE_INSTALL_PREFIX=$ROOT_DIR/inst $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON
- name: Build and Test GnuCash
run: |
cd build
ninja
ninja lcov-initialize
ninja check
ninja lcov-collect
ninja lcov-generate-html
env:
CTEST_OUTPUT_ON_FAILURE: On
- uses: actions/upload-pages-artifact@v3
if: success()
run: |
mkdir build/github-pages
mv build/Coverage-HTML build/github-pages/
chmod -v -R +rX "build/github-pages" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload pages
uses: actions/upload-pages-artifact@v2
if: success()
with:
path: ${{ github.workspace }}/build/github-pages
deploy-coverage:
needs: ci_tests_Coverage
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Publish
id: deployment
uses: actions/deploy-pages@v2