blob: df1041851de90a1b5f573eb7d70de56cc7e4a853 [file] [log] [blame]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +01001name: GitHub CI
2
Bram Moolenaarb5b77372020-12-18 13:31:31 +01003on:
4 push:
5 branches: ['**']
6 pull_request:
Bram Moolenaar8ea05de2020-12-17 20:27:26 +01007
Yegappan Lakshmanan7f4a6282021-12-25 11:20:30 +00008# Cancels all previous workflow runs for pull requests that have not completed.
9concurrency:
10 # The concurrency group contains the workflow name and the branch name for
11 # pull requests or the commit hash for any other events.
12 group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
13 cancel-in-progress: true
14
Alex311df6b2022-09-26 15:52:46 +010015permissions:
16 contents: read # to fetch code (actions/checkout)
17
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010018jobs:
19 linux:
Philip H9be736f2023-04-21 19:51:22 +010020 runs-on: ubuntu-22.04
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010021
22 env:
23 CC: ${{ matrix.compiler }}
Philip H7268e532023-05-16 20:11:02 +010024 GCC_VER: 13
Philip H22a22522024-08-02 19:45:52 +020025 CLANG_VER: 19
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010026 TEST: test
27 SRCDIR: ./src
28 LEAK_CFLAGS: -DEXITFREE
29 LOG_DIR: ${{ github.workspace }}/logs
30 TERM: xterm
31 DISPLAY: ':99'
Bram Moolenaar9aff9702020-12-21 13:37:28 +010032 DEBIAN_FRONTEND: noninteractive
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010033
34 strategy:
35 fail-fast: false
36 matrix:
Naruhiko Nishinob7af5a02022-10-09 13:28:36 +010037 features: [tiny, normal, huge]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010038 compiler: [clang, gcc]
ichizok3e1e63d2023-08-29 22:16:34 +020039 extra: [[]]
James McCoya4245a12023-09-05 07:41:23 +020040 # Only use non-native architecture when features != huge.
41 # features=huge tries to install python3-dev, which fails to install
42 # for the non-native architecture.
43 architecture: [native]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010044 include:
45 - features: tiny
46 compiler: clang
ichizok3e1e63d2023-08-29 22:16:34 +020047 extra: [nogui]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010048 - features: tiny
49 compiler: gcc
ichizok3e1e63d2023-08-29 22:16:34 +020050 extra: [nogui]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010051 - features: normal
52 shadow: ./src/shadow
James McCoya4245a12023-09-05 07:41:23 +020053 compiler: gcc
54 architecture: i386
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010055 - features: huge
56 coverage: true
57 - features: huge
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +020058 compiler: clang
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +020059 interface: dynamic
60 python3: stable-abi
61 - features: huge
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010062 compiler: gcc
63 coverage: true
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +020064 interface: dynamic
ichizok3e1e63d2023-08-29 22:16:34 +020065 extra: [uchar, testgui]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010066 - features: huge
67 compiler: clang
Christian Brabandt6efb1982023-08-10 05:44:25 +020068 # Lua5.1 is the most widely used version (since it's what LuaJIT is
69 # compatible with), so ensure it works
ichizok3e1e63d2023-08-29 22:16:34 +020070 lua_ver: '5.1'
71 extra: [asan]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010072 - features: huge
73 compiler: gcc
74 coverage: true
ichizok3e1e63d2023-08-29 22:16:34 +020075 extra: [unittests]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010076 - features: normal
77 compiler: gcc
ichizok3e1e63d2023-08-29 22:16:34 +020078 extra: [vimtags]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010079
80 steps:
Philip Hbfaa24f2022-06-01 21:26:34 +010081 - name: Checkout repository from github
dependabot[bot]213c3232023-09-11 19:43:33 +020082 uses: actions/checkout@v4
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010083
Peter Simonyi9cc95aa2023-12-01 12:07:42 -050084 - name: Check Filelist (for packaging)
85 run: |
86 # If any files in the repository are not listed in Filelist this will
87 # exit with an error code and list the missing entries.
88 make -f ci/unlisted.make
89
James McCoya4245a12023-09-05 07:41:23 +020090 - run: sudo dpkg --add-architecture i386
91 if: matrix.architecture == 'i386'
92
Philip H0a3d3692024-01-31 20:04:22 +010093 - name: Uninstall snap
94 run: |
95 sudo bash ci/remove_snap.sh
96
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010097 - name: Install packages
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010098 run: |
Philip H04e89432024-04-24 19:55:11 +020099 # This is added by default, and it is often broken, but we don't need anything from it
100 sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
ichizok10504762022-01-15 13:37:14 +0000101 PKGS=( \
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100102 gettext \
James McCoya4245a12023-09-05 07:41:23 +0200103 libgtk2.0-dev:${{ matrix.architecture }} \
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100104 desktop-file-utils \
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200105 libtool-bin \
James McCoya4245a12023-09-05 07:41:23 +0200106 libncurses-dev:${{ matrix.architecture }} \
107 libxt-dev:${{ matrix.architecture }} \
James McCoy4e527a22024-08-31 17:13:10 +0200108 locales-all \
ichizok10504762022-01-15 13:37:14 +0000109 )
110 if ${{ matrix.features == 'huge' }}; then
ichizok3e1e63d2023-08-29 22:16:34 +0200111 LUA_VER=${{ matrix.lua_ver || '5.4' }}
ichizok10504762022-01-15 13:37:14 +0000112 PKGS+=( \
113 autoconf \
Yegappan Lakshmanan58f39d82023-08-27 11:14:44 +0200114 gdb \
ichizok10504762022-01-15 13:37:14 +0000115 lcov \
116 libcanberra-dev \
117 libperl-dev \
Philip H9be736f2023-04-21 19:51:22 +0100118 python2-dev \
ichizok10504762022-01-15 13:37:14 +0000119 python3-dev \
ichizok3e1e63d2023-08-29 22:16:34 +0200120 liblua${LUA_VER}-dev \
121 lua${LUA_VER} \
ichizok10504762022-01-15 13:37:14 +0000122 ruby-dev \
123 tcl-dev \
124 cscope \
125 libsodium-dev \
Christian Brabandte085dfd2023-09-30 12:49:18 +0200126 attr \
127 libattr1-dev
ichizok10504762022-01-15 13:37:14 +0000128 )
129 fi
Philip H0fdd1852024-02-28 23:25:08 +0100130 sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y "${PKGS[@]}"
Bram Moolenaar9aff9702020-12-21 13:37:28 +0100131
Philip H9be736f2023-04-21 19:51:22 +0100132 - name: Install gcc-${{ env.GCC_VER }}
Philip Hd2edee52022-04-16 20:04:30 +0100133 if: matrix.compiler == 'gcc'
134 run: |
Philip H4b9fc822024-04-26 18:45:41 +0200135 # ubuntu-toolchain-r/test PPA for gcc-13 compiler
136 sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
137 sudo apt-get update -y
James McCoya4245a12023-09-05 07:41:23 +0200138 sudo apt-get install -y gcc-${{ env.GCC_VER }}:${{ matrix.architecture }}
Philip H7268e532023-05-16 20:11:02 +0100139 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 100
140 sudo update-alternatives --set gcc /usr/bin/gcc-${{ env.GCC_VER }}
Philip Hd2edee52022-04-16 20:04:30 +0100141
Philip H9be736f2023-04-21 19:51:22 +0100142 - name: Install clang-${{ env.CLANG_VER }}
Bram Moolenaar9aff9702020-12-21 13:37:28 +0100143 if: matrix.compiler == 'clang'
144 run: |
145 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
146 . /etc/lsb-release
Philip H9be736f2023-04-21 19:51:22 +0100147 sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-${{ env.CLANG_VER }} main"
148 sudo apt-get install -y clang-${{ env.CLANG_VER }} llvm-${{ env.CLANG_VER }}
149 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VER }} 100
150 sudo update-alternatives --set clang /usr/bin/clang-${{ env.CLANG_VER }}
151 sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${{ env.CLANG_VER }} 100
152 sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-${{ env.CLANG_VER }} 100
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100153
154 - name: Set up environment
155 run: |
156 mkdir -p "${LOG_DIR}"
157 mkdir -p "${HOME}/bin"
158 echo "${HOME}/bin" >> $GITHUB_PATH
159 (
160 echo "LINUX_VERSION=$(uname -r)"
161 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100162 echo "TMPDIR=${{ runner.temp }}"
163
164 case "${{ matrix.features }}" in
Naruhiko Nishinob7af5a02022-10-09 13:28:36 +0100165 tiny)
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100166 echo "TEST=testtiny"
167 if ${{ contains(matrix.extra, 'nogui') }}; then
168 echo "CONFOPT=--disable-gui"
169 fi
170 ;;
171 normal)
172 ;;
173 huge)
Christian Brabandt203c7222024-10-29 20:21:42 +0100174 echo "TEST=scripttests test_libvterm indenttest syntaxtest"
ichizok3e1e63d2023-08-29 22:16:34 +0200175 INTERFACE=${{ matrix.interface || 'yes' }}
176 if ${{ matrix.python3 == 'stable-abi' }}; then
177 PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200178 fi
ichizok3e1e63d2023-08-29 22:16:34 +0200179 echo "CONFOPT=--enable-perlinterp=${INTERFACE} --enable-pythoninterp=${INTERFACE} --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100180 ;;
181 esac
182
183 if ${{ matrix.coverage == true }}; then
ichizok3e1e63d2023-08-29 22:16:34 +0200184 CFLAGS="${CFLAGS} --coverage -DUSE_GCOV_FLUSH"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100185 echo "LDFLAGS=--coverage"
186 fi
ichizok3e1e63d2023-08-29 22:16:34 +0200187 if ${{ contains(matrix.extra, 'uchar') }}; then
188 CFLAGS="${CFLAGS} -funsigned-char"
James McCoy2e258bd2021-10-05 19:44:04 +0100189 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100190 if ${{ contains(matrix.extra, 'testgui') }}; then
191 echo "TEST=-C src testgui"
192 fi
193 if ${{ contains(matrix.extra, 'unittests') }}; then
194 echo "TEST=unittests"
195 fi
196 if ${{ contains(matrix.extra, 'asan') }}; then
Christian Brabandtce35ee82024-10-27 21:15:50 +0100197 echo "SANITIZER_CFLAGS=-g -O0 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
198 echo "ASAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/asan"
199 echo "UBSAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/ubsan"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100200 echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
201 fi
202 if ${{ contains(matrix.extra, 'vimtags') }}; then
203 echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
204 fi
ichizok3e1e63d2023-08-29 22:16:34 +0200205 echo "CFLAGS=${CFLAGS}"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100206 ) >> $GITHUB_ENV
207
208 - name: Set up system
209 run: |
210 if [[ ${CC} = clang ]]; then
211 # Use llvm-cov instead of gcov when compiler is clang.
212 ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
213 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100214 sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
215 sudo usermod -a -G audio "${USER}"
216 sudo bash ci/setup-xvfb.sh
217
Zdenek Dohnalba913b12023-08-15 22:34:45 +0200218 - name: Set up snd-dummy
Philip Hd2af6c62023-08-17 23:45:08 +0200219 if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
Philip He741f032023-05-11 15:22:58 +0100220 env:
221 DEST_DIR: ${{ env.TMPDIR }}/linux-modules-extra-${{ env.LINUX_VERSION }}
Philip Hd2af6c62023-08-17 23:45:08 +0200222 uses: tecolicom/actions-use-apt-tools@main
223 with:
224 tools: linux-modules-extra-${{ env.LINUX_VERSION }}
225 path: "${DEST_DIR}"
226
227 - name: modprobe snd-dummy
228 if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
Philip He741f032023-05-11 15:22:58 +0100229 run: |
Philip He741f032023-05-11 15:22:58 +0100230 sudo depmod --verbose
Christian Brabandta66feb52023-09-16 18:29:42 +0200231 sudo modprobe --verbose snd-dummy || true
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100232
233 - name: Check autoconf
234 if: contains(matrix.extra, 'unittests')
235 run: |
236 make -C src autoconf
237
238 - name: Set up shadow dir
239 if: matrix.shadow
240 run: |
241 make -C src shadow
242 echo "SRCDIR=${{ matrix.shadow }}" >> $GITHUB_ENV
243 echo "SHADOWOPT=-C ${{ matrix.shadow }}" >> $GITHUB_ENV
244
245 - name: Configure
246 run: |
247 ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
248 # Append various warning flags to CFLAGS.
Bram Moolenaar9aff9702020-12-21 13:37:28 +0100249 sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
250 sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
ichizokdee78e12021-12-09 21:08:01 +0000251 if [[ ${CC} = clang ]]; then
252 # Suppress some warnings produced by clang 12 and later.
253 sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
254 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100255
256 - name: Build
257 if: (!contains(matrix.extra, 'unittests'))
258 run: |
259 make ${SHADOWOPT} -j${NPROC}
260
261 - name: Check version
262 if: (!contains(matrix.extra, 'unittests'))
263 run: |
264 "${SRCDIR}"/vim --version
265 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
266 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
267
268 - name: Test
Christian Brabandt07a2b612023-08-18 01:18:22 +0200269 timeout-minutes: 25
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100270 run: |
Christian Brabandt203c7222024-10-29 20:21:42 +0100271 do_test() { echo "$*"; sg audio "sg $(id -gn) '$*'"; }
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100272 do_test make ${SHADOWOPT} ${TEST}
273
Christian Brabandt8314de82024-05-15 21:48:11 +0200274 - if: ${{ !cancelled() }}
275 uses: ./.github/actions/screendump
276
Yee Cheng Chin8b202032023-09-02 16:03:04 +0200277 - name: Vim tags
278 if: contains(matrix.extra, 'vimtags')
279 run: |
280 # This will exit with an error code if the generated vim tags differs from source.
Christian Brabandt8102a4c2024-01-14 18:24:05 +0000281 (
282 cd runtime/doc
283 git diff --exit-code -- tags
284 make html; rm *.html tags.ref;
285 test -f errors.log && exit 3;
Christian Brabandt9c581912024-01-15 22:38:48 +0100286 true
Christian Brabandt8102a4c2024-01-14 18:24:05 +0000287 )
Yee Cheng Chin8b202032023-09-02 16:03:04 +0200288
ichizok0d47ad42022-01-11 13:05:26 +0000289 - name: Generate gcov files
ichizok41ee5b12022-02-12 10:13:13 +0000290 if: matrix.coverage
Bram Moolenaare5492602020-12-22 19:05:33 +0100291 run: |
292 cd "${SRCDIR}"
ichizok0d47ad42022-01-11 13:05:26 +0000293 find . -type f -name '*.gcno' -exec gcov -pb {} + || true
294
295 - name: Codecov
Philip H982ded62023-06-22 18:12:46 +0100296 timeout-minutes: 20
ichizok41ee5b12022-02-12 10:13:13 +0000297 if: matrix.coverage
dependabot[bot]ea7f2f22024-02-06 10:46:10 +0100298 uses: codecov/codecov-action@v4
ichizok0d47ad42022-01-11 13:05:26 +0000299 with:
ichizok41ee5b12022-02-12 10:13:13 +0000300 flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
K.Takatabd2f45a2024-02-10 02:18:11 +0900301 token: ${{ secrets.CODECOV_TOKEN }}
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100302
303 - name: ASan logs
304 if: contains(matrix.extra, 'asan') && !cancelled()
305 run: |
ichizok41ee5b12022-02-12 10:13:13 +0000306 for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
Christian Brabandtce35ee82024-10-27 21:15:50 +0100307 echo "$f"
ichizok0d47ad42022-01-11 13:05:26 +0000308 asan_symbolize -l "$f"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100309 false # in order to fail a job
310 done
311
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100312 macos:
rhysde93d5ca2024-02-01 21:22:14 +0100313 runs-on: ${{ matrix.runner }}
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100314
315 env:
ichizok48c01962021-12-11 17:34:19 +0000316 CC: clang
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100317 TEST: test
318 SRCDIR: ./src
319 LEAK_CFLAGS: -DEXITFREE
320 TERM: xterm
321
322 strategy:
323 fail-fast: false
324 matrix:
ichizok48c01962021-12-11 17:34:19 +0000325 features: [tiny, normal, huge]
Philip H.5d64e282024-10-02 19:21:52 +0200326 runner: [macos-13, macos-14]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100327
328 steps:
Philip Hbfaa24f2022-06-01 21:26:34 +0100329 - name: Checkout repository from github
dependabot[bot]213c3232023-09-11 19:43:33 +0200330 uses: actions/checkout@v4
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100331
Yee Cheng Chin49f2ba62024-02-14 20:34:58 +0100332 - name: Install packages
333 if: matrix.features == 'huge'
rhysde93d5ca2024-02-01 21:22:14 +0100334 run: |
335 brew install lua libtool
Yee Cheng Chin49f2ba62024-02-14 20:34:58 +0100336 echo "LUA_PREFIX=$(brew --prefix)" >> $GITHUB_ENV
337
338 - name: Grant microphone access for macos-14
ichizokc8330b82024-05-04 01:22:35 +0900339 if: matrix.features == 'huge' && matrix.runner == 'macos-14'
Yee Cheng Chin49f2ba62024-02-14 20:34:58 +0100340 run: |
341 # Temporary fix to fix microphone permission issues for macos-14 when playing sound.
342 sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
rhysde93d5ca2024-02-01 21:22:14 +0100343
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100344 - name: Set up environment
345 run: |
346 (
347 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
348 case "${{ matrix.features }}" in
349 tiny)
350 echo "TEST=testtiny"
351 echo "CONFOPT=--disable-gui"
352 ;;
ichizok48c01962021-12-11 17:34:19 +0000353 normal)
354 ;;
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100355 huge)
Philip Hd094e582022-10-16 14:53:34 +0100356 echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100357 ;;
358 esac
359 ) >> $GITHUB_ENV
360
361 - name: Configure
362 run: |
363 ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
364 # Append various warning flags to CFLAGS.
365 # BSD sed needs backup extension specified.
366 sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
367 # On macOS, the entity of gcc is clang.
368 sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
ichizokdee78e12021-12-09 21:08:01 +0000369 # Suppress some warnings produced by clang 12 and later.
370 if clang --version | grep -qs 'Apple clang version \(1[3-9]\|[2-9]\)\.'; then
371 sed -i.bak -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
372 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100373
374 - name: Build
Bram Moolenaar9aff9702020-12-21 13:37:28 +0100375 env:
Bram Moolenaared1e4c92020-12-28 15:46:47 +0100376 LC_ALL: C
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100377 run: |
378 make -j${NPROC}
379
380 - name: Check version
381 run: |
382 "${SRCDIR}"/vim --version
383 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
384 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
385
Linda_pp72a1f452024-02-20 04:55:55 +0900386 - name: Install packages for testing
387 run: |
388 # Apple diff is broken. Use GNU diff instead. See #14032.
389 brew install diffutils
390
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100391 - name: Test
Millybaab7c02024-10-28 21:56:14 +0100392 timeout-minutes: 25
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100393 run: |
394 make ${TEST}
395
Christian Brabandt8314de82024-05-15 21:48:11 +0200396 - if: ${{ !cancelled() }}
397 uses: ./.github/actions/screendump
398
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100399 windows:
Philip H361f9d22022-06-14 11:35:21 +0100400 runs-on: windows-2022
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100401
402 env:
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100403 # Interfaces
404 # Lua
405 LUA_VER: 54
406 LUA_VER_DOT: '5.4'
Philip H18f75932022-02-12 10:53:07 +0000407 LUA_RELEASE: 5.4.2
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100408 LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
409 LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
410 LUA_DIR: D:\Lua
Christian Brabandt2890c0b2022-05-02 10:34:15 +0100411 # do not want \L to end up in pathdef.c and compiler complaining about unknown escape sequences \l
412 LUA_DIR_SLASH: D:/Lua
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100413 # Python 2
414 PYTHON_VER: 27
415 PYTHON_VER_DOT: '2.7'
Philip H361f9d22022-06-14 11:35:21 +0100416 PYTHON_DIR: 'C:\Python27'
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100417 # Python 3
Philip Hef91ae42022-12-30 17:41:17 +0000418 PYTHON3_VER: 311
419 PYTHON3_VER_DOT: '3.11'
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100420 # Other dependencies
421 # winpty
422 WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
ichizok2f147162023-04-26 15:43:39 +0100423 # libsodium
Restorer8e37daf2024-03-22 18:34:52 +0000424 SODIUM_VER: '1.0.19'
Restorerfbeea682024-04-22 18:48:43 +0000425 # SODIUM_MSVC_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-msvc.zip
426 SODIUM_MSVC_URL: https://github.com/jedisct1/libsodium/releases/download/%SODIUM_VER%-RELEASE/libsodium-%SODIUM_VER%-msvc.zip
ichizok2f147162023-04-26 15:43:39 +0100427 SODIUM_MSVC_VER: v143
Restorerfbeea682024-04-22 18:48:43 +0000428 # SODIUM_MINGW_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-mingw.tar.gz
429 SODIUM_MINGW_URL: https://github.com/jedisct1/libsodium/releases/download/%SODIUM_VER%-RELEASE/libsodium-%SODIUM_VER%-mingw.tar.gz
Restorer8e37daf2024-03-22 18:34:52 +0000430 SODIUM_MINGW_VER: 26
RestorerZ96509102024-07-11 21:14:15 +0200431 # Gettext-tools, iconv and libraries
432 GETTEXT32_URL: https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-32.zip
433 GETTEXT64_URL: https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-64.zip
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100434 # Escape sequences
435 COL_RED: "\x1b[31m"
436 COL_GREEN: "\x1b[32m"
437 COL_YELLOW: "\x1b[33m"
438 COL_RESET: "\x1b[m"
439
440 strategy:
441 fail-fast: false
442 matrix:
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100443 include:
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200444 - { features: HUGE, toolchain: msvc, VIMDLL: no, GUI: no, arch: x64, python3: stable }
445 - { features: HUGE, toolchain: mingw, VIMDLL: yes, GUI: yes, arch: x86, python3: stable, coverage: yes }
K.Takata2da11a42022-09-10 13:03:12 +0100446 - { features: HUGE, toolchain: msvc, VIMDLL: no, GUI: yes, arch: x86 }
447 - { features: HUGE, toolchain: mingw, VIMDLL: yes, GUI: no, arch: x64, coverage: yes }
448 - { features: NORMAL, toolchain: msvc, VIMDLL: yes, GUI: no, arch: x86 }
449 - { features: NORMAL, toolchain: mingw, VIMDLL: no, GUI: yes, arch: x64 }
450 - { features: TINY, toolchain: msvc, VIMDLL: yes, GUI: yes, arch: x64 }
451 - { features: TINY, toolchain: mingw, VIMDLL: no, GUI: no, arch: x86 }
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100452
453 steps:
Bram Moolenaar53f7fcc2021-07-28 20:10:16 +0200454 - name: Initialize
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100455 id: init
456 shell: bash
457 run: |
K.Takata80613d62022-11-09 16:12:47 +0000458 # Show Windows version
459 cmd /c ver
460
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100461 git config --global core.autocrlf input
K.Takata2da11a42022-09-10 13:03:12 +0100462
ichizok2f147162023-04-26 15:43:39 +0100463 if ${{ matrix.arch == 'x64' }}; then
K.Takata2da11a42022-09-10 13:03:12 +0100464 cygreg=registry
465 pyreg=
466 echo "VCARCH=amd64" >> $GITHUB_ENV
467 echo "WARCH=x64" >> $GITHUB_ENV
468 echo "BITS=64" >> $GITHUB_ENV
469 echo "MSYSTEM=MINGW64" >> $GITHUB_ENV
Philip H361f9d22022-06-14 11:35:21 +0100470 else
K.Takata2da11a42022-09-10 13:03:12 +0100471 cygreg=registry32
472 pyreg=-32
473 echo "VCARCH=x86" >> $GITHUB_ENV
474 echo "WARCH=ia32" >> $GITHUB_ENV
475 echo "BITS=32" >> $GITHUB_ENV
476 echo "MSYSTEM=MINGW32" >> $GITHUB_ENV
Philip H361f9d22022-06-14 11:35:21 +0100477 fi
K.Takata2da11a42022-09-10 13:03:12 +0100478
479 echo "VCVARSALL=$(vswhere -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >> $GITHUB_ENV
ichizok2f147162023-04-26 15:43:39 +0100480 if ${{ matrix.features != 'TINY' }}; then
481 if ${{ matrix.arch == 'x86' }}; then
K.Takata80613d62022-11-09 16:12:47 +0000482 choco install python2 --no-progress --forcex86
K.Takata2da11a42022-09-10 13:03:12 +0100483 else
K.Takata80613d62022-11-09 16:12:47 +0000484 choco install python2 --no-progress
K.Takata2da11a42022-09-10 13:03:12 +0100485 fi
486 fi
487 python3_dir=$(cat "/proc/$cygreg/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}$pyreg/InstallPath/@")
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100488 echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
489
ichizok2f147162023-04-26 15:43:39 +0100490 if ${{ matrix.toolchain == 'msvc' }}; then
491 SODIUM_DIR=D:\\libsodium
492 echo "SODIUM_LIB=${SODIUM_DIR}\\${{ matrix.arch == 'x64' && 'x64' || 'Win32' }}\\Release\\${SODIUM_MSVC_VER}\\dynamic" >> $GITHUB_ENV
493 else
494 SODIUM_DIR=D:\\libsodium-win${{ matrix.arch == 'x64' && '64' || '32' }}
Christian Brabandtf976e2c2024-03-21 20:55:22 +0000495 # do not want \L to end up in pathdef.c and compiler complaining about unknown escape sequences \l
496 SODIUM_DIR_SLASH=D:/libsodium-win${{ matrix.arch == 'x64' && '64' || '32' }}
ichizok2f147162023-04-26 15:43:39 +0100497 echo "SODIUM_LIB=${SODIUM_DIR}\\bin" >> $GITHUB_ENV
Christian Brabandtf976e2c2024-03-21 20:55:22 +0000498 echo "SODIUM_DIR_SLASH=${SODIUM_DIR_SLASH}" >> $GITHUB_ENV
ichizok2f147162023-04-26 15:43:39 +0100499 fi
500 echo "SODIUM_DIR=${SODIUM_DIR}" >> $GITHUB_ENV
RestorerZ96509102024-07-11 21:14:15 +0200501 echo "GETTEXT_PATH=D:\gettext${{ matrix.arch == 'x64' && '64' || '32' }}" >> $GITHUB_ENV
ichizok2f147162023-04-26 15:43:39 +0100502
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100503 - uses: msys2/setup-msys2@v2
504 if: matrix.toolchain == 'mingw'
505 with:
Philip H361f9d22022-06-14 11:35:21 +0100506 update: true
507 install: tar
508 pacboy: >-
509 make:p gcc:p
K.Takata2da11a42022-09-10 13:03:12 +0100510 msystem: ${{ env.MSYSTEM }}
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100511 release: false
512
Philip Hbfaa24f2022-06-01 21:26:34 +0100513 - name: Checkout repository from github
dependabot[bot]213c3232023-09-11 19:43:33 +0200514 uses: actions/checkout@v4
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100515
516 - name: Create a list of download URLs
517 shell: cmd
518 run: |
519 type NUL > urls.txt
520 echo %LUA_RELEASE%>> urls.txt
521 echo %WINPTY_URL%>> urls.txt
ichizok2f147162023-04-26 15:43:39 +0100522 echo %SODIUM_VER%>> urls.txt
RestorerZ96509102024-07-11 21:14:15 +0200523 echo %GETTEXT32_URL%>> urls.txt
524 echo %GETTEXT64_URL%>> urls.txt
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100525
526 - name: Cache downloaded files
dependabot[bot]1cee5092024-01-22 20:06:01 +0100527 uses: actions/cache@v4
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100528 with:
529 path: downloads
K.Takata2da11a42022-09-10 13:03:12 +0100530 key: ${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('urls.txt') }}
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100531
532 - name: Download dependencies
533 shell: cmd
534 run: |
535 path C:\Program Files\7-Zip;%path%
536 if not exist downloads mkdir downloads
537
538 echo %COL_GREEN%Download Lua%COL_RESET%
K.Takata2da11a42022-09-10 13:03:12 +0100539 call :downloadfile %LUA${{ env.BITS }}_URL% downloads\lua.zip
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100540 7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
541
542 echo %COL_GREEN%Download winpty%COL_RESET%
543 call :downloadfile %WINPTY_URL% downloads\winpty.zip
544 7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
K.Takata2da11a42022-09-10 13:03:12 +0100545 copy /Y D:\winpty\%WARCH%\bin\winpty.dll src\winpty%BITS%.dll
546 copy /Y D:\winpty\%WARCH%\bin\winpty-agent.exe src\
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100547
ichizok2f147162023-04-26 15:43:39 +0100548 echo %COL_GREEN%Download libsodium%COL_RESET%
549 if "${{ matrix.toolchain }}"=="msvc" (
550 call :downloadfile %SODIUM_MSVC_URL% downloads\libsodium.zip
551 7z x -y downloads\libsodium.zip -oD:\ > nul || exit 1
552 ) else (
553 call :downloadfile %SODIUM_MINGW_URL% downloads\libsodium.tar.gz
554 7z x -y downloads\libsodium.tar.gz -so | 7z x -si -ttar -oD:\ > nul || exit 1
555 mklink %SODIUM_LIB%\libsodium.dll %SODIUM_LIB%\libsodium-%SODIUM_MINGW_VER%.dll
556 )
557
RestorerZ96509102024-07-11 21:14:15 +0200558 echo %COL_GREEN%Download Gettext%COL_RESET%
559 call :downloadfile %GETTEXT${{ env.BITS }}_URL% downloads\gettext${{ env.BITS }}.zip
560 7z e -y downloads\gettext${{ env.BITS }}.zip -oD:\gettext${{ env.BITS }} > nul || exit 1
561 copy /y D:\gettext${{ env.BITS }}\libintl-8.dll src\ || exit 1
562 copy /y D:\gettext${{ env.BITS }}\libiconv-2.dll src\ || exit 1
563
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100564 goto :eof
565
566 :downloadfile
567 :: call :downloadfile <URL> <localfile>
568 if not exist %2 (
569 curl -f -L %1 -o %2
570 )
571 if ERRORLEVEL 1 (
572 rem Retry once.
573 curl -f -L %1 -o %2 || exit 1
574 )
575 goto :eof
576
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100577 - name: Build (MSVC)
578 if: matrix.toolchain == 'msvc'
579 shell: cmd
580 run: |
K.Takata2da11a42022-09-10 13:03:12 +0100581 call "%VCVARSALL%" %VCARCH%
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100582 cd src
K.Takata2da11a42022-09-10 13:03:12 +0100583 if "${{ matrix.VIMDLL }}"=="yes" (
584 set GUI=yes
585 ) else (
586 set GUI=${{ matrix.GUI }}
587 )
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200588 if "${{ matrix.python3 }}"=="stable" (
589 set PYTHON3_STABLE=yes
590 ) else (
591 set PYTHON3_STABLE=no
592 )
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100593 if "${{ matrix.features }}"=="HUGE" (
K.Takata47d16662022-01-26 16:20:21 +0000594 nmake -nologo -f Make_mvc.mak ^
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100595 FEATURES=${{ matrix.features }} ^
K.Takata2da11a42022-09-10 13:03:12 +0100596 GUI=%GUI% IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }} ^
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100597 DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
598 DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
ichizok2f147162023-04-26 15:43:39 +0100599 DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200600 DYNAMIC_PYTHON3_STABLE_ABI=%PYTHON3_STABLE% ^
ichizok2f147162023-04-26 15:43:39 +0100601 DYNAMIC_SODIUM=yes SODIUM=%SODIUM_DIR%
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100602 ) else (
K.Takata47d16662022-01-26 16:20:21 +0000603 nmake -nologo -f Make_mvc.mak ^
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100604 FEATURES=${{ matrix.features }} ^
K.Takata2da11a42022-09-10 13:03:12 +0100605 GUI=%GUI% IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }}
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100606 )
607
608 - name: Build (MinGW)
609 if: matrix.toolchain == 'mingw'
610 shell: msys2 {0}
611 run: |
612 cd src
K.Takata2da11a42022-09-10 13:03:12 +0100613 if [ "${{ matrix.VIMDLL }}" = "yes" ]; then
614 GUI=yes
615 else
616 GUI=${{ matrix.GUI }}
617 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200618 if [ "${{ matrix.python3 }}" = "stable" ]; then
619 PYTHON3_STABLE=yes
620 else
621 PYTHON3_STABLE=no
622 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100623 if [ "${{ matrix.features }}" = "HUGE" ]; then
624 mingw32-make -f Make_ming.mak -j2 \
625 FEATURES=${{ matrix.features }} \
K.Takata2da11a42022-09-10 13:03:12 +0100626 GUI=$GUI IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }} \
Christian Brabandt2890c0b2022-05-02 10:34:15 +0100627 DYNAMIC_LUA=yes LUA=${LUA_DIR_SLASH} \
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100628 DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
629 DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200630 DYNAMIC_PYTHON3_STABLE_ABI=${PYTHON3_STABLE} \
Christian Brabandtf976e2c2024-03-21 20:55:22 +0000631 DYNAMIC_SODIUM=yes SODIUM=${SODIUM_DIR_SLASH} \
ichizok0cd3e942022-02-14 11:36:57 +0000632 STATIC_STDCPLUS=yes COVERAGE=${{ matrix.coverage }}
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100633 else
634 mingw32-make -f Make_ming.mak -j2 \
635 FEATURES=${{ matrix.features }} \
K.Takata2da11a42022-09-10 13:03:12 +0100636 GUI=$GUI IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }} \
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100637 STATIC_STDCPLUS=yes
638 fi
639
ichizok0cd3e942022-02-14 11:36:57 +0000640 - name: Check version
641 shell: cmd
K.Takata83e36c82022-02-21 17:49:28 +0000642 run: |
K.Takata2da11a42022-09-10 13:03:12 +0100643 PATH %LUA_DIR%;C:\msys64\%MSYSTEM%\bin;%PATH%;%PYTHON3_DIR%
644 if "${{ matrix.GUI }}"=="yes" (
645 start /wait src\gvim -u NONE -i NONE -c "redir > version.txt | ver | q" || exit 1
646 type version.txt
647 echo.
648 start /wait src\gvim -u NONE -i NONE -c "redir! > version.txt | so ci\if_ver-1.vim | q"
649 start /wait src\gvim -u NONE -i NONE -c "redir >> version.txt | so ci\if_ver-2.vim | q"
650 type version.txt
651 del version.txt
652 ) else (
653 src\vim --version || exit 1
654 src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
655 src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
656 )
ichizok0cd3e942022-02-14 11:36:57 +0000657
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100658 #- name: Prepare Artifact
659 # shell: cmd
660 # run: |
661 # mkdir artifacts
662 # copy src\*vim.exe artifacts
663 # copy src\vim*.dll artifacts
664 #
665 #- name: Upload Artifact
666 # uses: actions/upload-artifact@v1
667 # with:
668 # name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
669 # path: ./artifacts
670
ichizok0cd3e942022-02-14 11:36:57 +0000671 - name: Test and show the result of testing gVim
K.Takata2da11a42022-09-10 13:03:12 +0100672 if: matrix.GUI == 'yes' || matrix.VIMDLL == 'yes'
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100673 shell: cmd
K.Takata2da11a42022-09-10 13:03:12 +0100674 timeout-minutes: 15
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100675 run: |
ichizok2f147162023-04-26 15:43:39 +0100676 PATH %LUA_DIR%;C:\msys64\%MSYSTEM%\bin;%PATH%;%PYTHON3_DIR%;%SODIUM_LIB%
K.Takata2da11a42022-09-10 13:03:12 +0100677 call "%VCVARSALL%" %VCARCH%
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100678
ichizok0cd3e942022-02-14 11:36:57 +0000679 echo %COL_GREEN%Test gVim:%COL_RESET%
680 cd src\testdir
K.Takata2da11a42022-09-10 13:03:12 +0100681 if "${{ matrix.GUI }}"=="yes" (
682 nmake -nologo -f Make_mvc.mak VIMPROG=..\gvim || exit 1
683 ) else (
684 @rem Run only tiny tests.
685 nmake -nologo -f Make_mvc.mak tiny VIMPROG=..\gvim || exit 1
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100686 )
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100687
K.Takata2da11a42022-09-10 13:03:12 +0100688 - name: Test and show the result of testing Vim
689 if: matrix.GUI == 'no' || matrix.VIMDLL == 'yes'
690 shell: cmd
691 timeout-minutes: 15
692 run: |
ichizok2f147162023-04-26 15:43:39 +0100693 PATH %LUA_DIR%;C:\msys64\%MSYSTEM%\bin;%PATH%;%PYTHON3_DIR%;%SODIUM_LIB%
K.Takata2da11a42022-09-10 13:03:12 +0100694 call "%VCVARSALL%" %VCARCH%
ichizok0cd3e942022-02-14 11:36:57 +0000695
K.Takata2da11a42022-09-10 13:03:12 +0100696 echo %COL_GREEN%Test Vim:%COL_RESET%
697 cd src\testdir
698 nmake -nologo -f Make_mvc.mak clean
699 if "${{ matrix.GUI }}"=="no" (
700 nmake -nologo -f Make_mvc.mak VIMPROG=..\vim || exit 1
701 ) else (
702 @rem Run only tiny tests.
703 nmake -nologo -f Make_mvc.mak tiny VIMPROG=..\vim || exit 1
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100704 )
ichizok41ee5b12022-02-12 10:13:13 +0000705
Christian Brabandt8314de82024-05-15 21:48:11 +0200706 - if: ${{ !cancelled() }}
707 uses: ./.github/actions/screendump
708
ichizok41ee5b12022-02-12 10:13:13 +0000709 - name: Generate gcov files
ichizok0cd3e942022-02-14 11:36:57 +0000710 if: matrix.coverage
ichizok41ee5b12022-02-12 10:13:13 +0000711 shell: msys2 {0}
712 run: |
713 cd src
714 find . -type f -name '*.gcno' -exec gcov -pb {} + || true
ichizok41ee5b12022-02-12 10:13:13 +0000715
K.Takata2da11a42022-09-10 13:03:12 +0100716 - name: Codecov
Philip H982ded62023-06-22 18:12:46 +0100717 timeout-minutes: 20
ichizok0cd3e942022-02-14 11:36:57 +0000718 if: matrix.coverage
dependabot[bot]ea7f2f22024-02-06 10:46:10 +0100719 uses: codecov/codecov-action@v4
ichizok41ee5b12022-02-12 10:13:13 +0000720 with:
721 directory: src
ichizok41ee5b12022-02-12 10:13:13 +0000722 flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}
K.Takatabd2f45a2024-02-10 02:18:11 +0900723 token: ${{ secrets.CODECOV_TOKEN }}