-
-
Notifications
You must be signed in to change notification settings - Fork 821
73 lines (64 loc) · 3.18 KB
/
code-quality.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
#
# Actions for check the code quality
# See also https://github.com/actions/runner-images
#
name: "Code Quality"
on: [push]
jobs:
#
# Coveralls
#
coveralls:
name: "Coveralls"
runs-on: ubuntu-latest
if: "!contains(github.actor, 'transifex')"
steps:
- name: Install dependencies
run: |
sudo apt remove php7.* -y
sudo apt remove php8.* -y
sudo apt update
# using force-overwrite due to
# https://github.com/actions/virtual-environments/issues/2703
#sudo ACCEPT_EULA=Y apt upgrade -o Dpkg::Options::="--force-overwrite" --yes
#sudo apt install -y qtbase5-private-dev qtscript5-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev libqt5opengl5-dev qtmultimedia5-dev libqt5multimedia5-plugins libqt5serialport5 libqt5serialport5-dev qtpositioning5-dev libgps-dev libqt5positioning5 libqt5positioning5-plugins qtwebengine5-dev libqt5charts5-dev zlib1g-dev libgl1-mesa-dev libdrm-dev cmake lcov libexiv2-dev libnlopt-cxx-dev
sudo apt install -y qt6-base-private-dev qt6-multimedia-dev qt6-positioning-dev qt6-tools-dev qt6-tools-dev-tools qt6-base-dev-tools qt6-qpa-plugins qt6-image-formats-plugins qt6-l10n-tools qt6-webengine-dev qt6-webengine-dev-tools libqt6charts6-dev libqt6charts6 libqt6opengl6-dev libqt6positioning6-plugins libqt6serialport6-dev qt6-base-dev libqt6webenginecore6-bin libqt6webengine6-data libexiv2-dev libnlopt-cxx-dev zlib1g-dev libgl1-mesa-dev libdrm-dev libglx-dev libxkbcommon-x11-dev libgps-dev zlib1g-dev libgl1-mesa-dev libdrm-dev cmake lcov libexiv2-dev libnlopt-cxx-dev
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure CMake
shell: bash
run: |
mkdir -p ../../../.stellarium/ephem
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On -DENABLE_NLS=Off ${{ github.workspace }}
- name: Compile
working-directory: build
run: make -j3
- name: Download JPL DE430 ephemeris
uses: carlosperate/download-file-action@v2
with:
file-url: 'https://github.com/Stellarium/stellarium-data/releases/download/qt-5.6/linux_p1550p2650.430'
file-name: 'linux_p1550p2650.430'
location: '../../../.stellarium/ephem'
- name: Download JPL DE440 ephemeris
uses: carlosperate/download-file-action@v2
with:
file-url: 'https://github.com/Stellarium/stellarium-data/releases/download/qt-5.6/linux_p1550p2650.440'
file-name: 'linux_p1550p2650.440'
location: '../../../.stellarium/ephem'
- name: Make coverage
uses: coactions/setup-xvfb@v1
with:
working-directory: build
run: make coverage
# Remove unnecessary data from final report
- name: Coverage data cleanup
working-directory: build
run: lcov --gcov-tool "/usr/bin/gcov" --remove coverage.info '*_autogen/*' '*/ui_*.h' '*/qrc_*.cpp' '*/build/*' '*/qt5/*' '*/qt6/*' '/usr/*' '*gmock*' --output-file coverage.info
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
format: lcov
file: ${{ github.workspace }}/build/coverage.info
github-token: ${{ secrets.GITHUB_TOKEN }}