-
-
Notifications
You must be signed in to change notification settings - Fork 690
176 lines (158 loc) · 5.45 KB
/
ci-linux.yml
File metadata and controls
176 lines (158 loc) · 5.45 KB
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: CI for Linux
on:
workflow_call:
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-linux-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
linux:
runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
env:
CC: ${{ matrix.compiler }}
GCC_VER: 14
CLANG_VER: 22
TEST: test
SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE
LOG_DIR: ${{ github.workspace }}/logs
TERM: xterm
DISPLAY: ":99"
DEBIAN_FRONTEND: noninteractive
strategy:
fail-fast: false
matrix:
features: [tiny, normal, huge]
compiler: [clang, gcc]
extra: [[]]
# Only use non-native architecture when features != huge.
# features=huge tries to install python3-dev, which fails to install
# for the non-native architecture.
architecture: [native]
include:
- features: tiny
compiler: clang
extra: [nogui]
- features: tiny
compiler: gcc
extra: [nogui, syn_test_execs]
- features: tiny
compiler: gcc
extra: [nogui]
architecture: arm64
- features: normal
shadow: ./src/shadow
compiler: gcc
architecture: i386
- features: huge
coverage: true
- features: huge
compiler: clang
interface: dynamic
python3: stable-abi
- features: huge
compiler: gcc
coverage: true
interface: dynamic
extra: [uchar, testgui]
- features: huge
compiler: gcc
coverage: true
extra: [unittests]
- features: huge
compiler: gcc
coverage: true
extra: [unittests]
architecture: arm64
- features: normal
compiler: gcc
extra: [vimtags, proto, preproc_indent, encoding, codestyle]
- features: huge
compiler: gcc
extra: [no_x11_wl]
steps:
- name: Checkout repository from GitHub
uses: actions/checkout@v6
- name: Build
timeout-minutes: 15
uses: ./.github/actions/build_vim_on_linux
with:
features: ${{ matrix.features }}
compiler: ${{ matrix.compiler }}
architecture: ${{ matrix.architecture }}
extra: ${{ toJSON(matrix.extra) }}
shadow: ${{ matrix.shadow }}
interface: ${{ matrix.interface }}
lua_ver: ${{ matrix.lua_ver }}
python3: ${{ matrix.python3 }}
coverage: ${{ matrix.coverage }}
- name: Test
timeout-minutes: 20
run: make ${SHADOWOPT} ${TEST}
# Enable to debug failing tests live and ssh into the CI runners
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
- name: Upload failed test artifacts
if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
- name: Vim tags
if: contains(matrix.extra, 'vimtags')
run: |
# This will exit with an error code if the generated vim tags differs from source.
(
cd runtime/doc
git diff --exit-code -- tags
make html; rm *.html tags.ref;
test -f errors.log && exit 3;
true
)
- name: Generate Proto files
if: contains(matrix.extra, 'proto')
run: |
# This will exit with an error code if the generated proto files differ from source
(
git diff --exit-code -- src/proto/
true
)
- name: Check Source Code style
if: contains(matrix.extra, 'codestyle')
run: |
make -C src/testdir codestyle
- name: Check preprocessor indent
if: contains(matrix.extra, 'preproc_indent')
run: |
# This will exit with an error code if the files differ from source
(
"${SRCDIR}"/vim -u NONE --not-a-term -esNX +"cd runtime/tools" -S preproc_indent.vim
git diff --exit-code -- src/*.[ch] src/xxd/xxd.c
true
)
- name: Check encoding of utf-8 runtime files
if: contains(matrix.extra, 'encoding')
run: |
# This will exit with an error code if utf-8 runtime files are not in utf-8 encoding
(
find . -type f -name "*utf-8*.vim" -exec sh -c \
'iconv -f utf-8 -t utf-8 "$1" >/dev/null 2>&1 || echo "non utf-8 encoding detected in $1"' \
find-sh {} \; |grep "non utf-8 encoding" && exit 3
true
)
- name: Generate gcov files
if: matrix.coverage
run: |
cd "${SRCDIR}"
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
uses: codecov/codecov-action@v6
with:
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ join(matrix.extra, '-') }}
token: ${{ secrets.CODECOV_TOKEN }}