-
Notifications
You must be signed in to change notification settings - Fork 128
141 lines (128 loc) · 4.31 KB
/
ubuntu.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
140
141
name: "ubuntu"
permissions: {}
on:
push:
branches: [ '**']
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '27 4 * * 2'
workflow_dispatch:
inputs:
attestation:
description: 'Generate attestation for binary artifacts'
required: false
default: false
type: boolean
jobs:
ubuntu:
name: ubuntu Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# focal has Qt 5.12, end of standard support 4/2025, end of life 4/2030.
#- IMAGE: 'focal'
# SCRIPT: './tools/build_and_test_cmake.sh'
- IMAGE: 'jammy'
CMAKE_PREFIX_PATH: '/usr/lib/x86_64-linux-gnu/cmake/Qt6'
SCRIPT: './tools/build_and_test_cmake.sh'
- IMAGE: 'jammy'
CMAKE_PREFIX_PATH: '/usr/lib/x86_64-linux-gnu/cmake/Qt6'
SCRIPT: './tools/build_and_test_cmake.sh'
TOOLS: 'clang'
- IMAGE: 'noble'
CMAKE_PREFIX_PATH: '/usr/lib/x86_64-linux-gnu/cmake/Qt6'
SCRIPT: './tools/build_and_test_cmake.sh'
- IMAGE: 'noble'
CMAKE_PREFIX_PATH: '/usr/lib/x86_64-linux-gnu/cmake/Qt6'
SCRIPT: './tools/build_and_test_cmake.sh'
TOOLS: 'clang'
- IMAGE: 'noble'
CMAKE_PREFIX_PATH: '/usr/lib/x86_64-linux-gnu/cmake/Qt6'
SCRIPT: './tools/build_extra_tests.sh'
container:
image: gpsbabel-docker.jfrog.io/tsteven4/gpsbabel_build_environment_${{ matrix.IMAGE }}
env:
LC_ALL: 'C.UTF-8'
JOB_CMAKE_PREFIX_PATH: ${{ matrix.CMAKE_PREFIX_PATH }}
JOB_TOOLS: ${{ matrix.TOOLS }}
JOB_SCRIPT: ${{ matrix.SCRIPT }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: build_and_test
run: |
# when using containers manually whitelist the checkout directory to allow git commands to work
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
if [ -n "${JOB_CMAKE_PREFIX_PATH}" ]; then
CMAKE_PREFIX_PATH="${JOB_CMAKE_PREFIX_PATH}"
export CMAKE_PREFIX_PATH
fi
if [ "${JOB_TOOLS}" = "clang" ]; then
CC=clang
export CC
CXX=clang++
export CXX
fi
"${JOB_SCRIPT}"
coverage:
name: coverage Build
runs-on: ubuntu-latest
steps:
- name: install
run: |
sudo apt-get update
sudo apt-get install gcovr lcov libusb-1.0-0-dev libgl-dev qt6-base-dev libqt6core5compat6-dev libqt6serialport6-dev qt6-webengine-dev qt6-webengine-dev-tools ninja-build
- name: Checkout repository
uses: actions/checkout@v4
- name: script
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
./tools/travis_script_linux_coverage
snap:
name: snap Build
permissions:
id-token: write
contents: write
attestations: write
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap.outputs.snap }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build
uses: snapcore/action-build@v1
id: build-snap
# Make sure the snap is installable
- name: Test
run: |
sudo snap install --dangerous ${{ steps.build-snap.outputs.snap }}
export GBTEMP=$(pwd)/gbtemp
mkdir -p "$GBTEMP"
/snap/bin/gpsbabel -D3 || true
./testo -p /snap/bin/gpsbabel
- name: Generate artifact attestation
if: ${{ inputs.attestation }}
uses: actions/attest-build-provenance@v2
with:
subject-path: ${{ steps.build-snap.outputs.snap }}
- name: Deploy
# This only handles continous releases now, for other events artifacts may be saved in
# the 'Upload Artifacts' step.
if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' )
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: Continuous-Linux
run: |
./tools/uploadtool/upload_github.sh ${{ steps.build-snap.outputs.snap }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build-snap.outputs.snap }}
path: ${{ steps.build-snap.outputs.snap }}
retention-days: 7