mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
ci(windows): optionally test windows with ASAN
Add the label `ci:windows-asan` to enable it.
This commit is contained in:
parent
ca6dbf3558
commit
d3e51603bc
7
.github/workflows/optional.yml
vendored
7
.github/workflows/optional.yml
vendored
@ -46,3 +46,10 @@ jobs:
|
||||
runuser -u qemuci -- cmake -B build -G Ninja -D CI_BUILD=ON -D PREFER_LUA=ON &&
|
||||
runuser -u qemuci -- make ${{ matrix.test }}
|
||||
"
|
||||
|
||||
windows-asan:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'ci:windows-asan') || github.event_name == 'workflow_dispatch'
|
||||
uses: ./.github/workflows/test_windows.yml
|
||||
with:
|
||||
build_flags: "-D ENABLE_ASAN_UBSAN=ON"
|
||||
functionaltest_timeout: 40
|
||||
|
60
.github/workflows/test.yml
vendored
60
.github/workflows/test.yml
vendored
@ -193,65 +193,7 @@ jobs:
|
||||
run: cat $(find "$LOG_DIR" -type f)
|
||||
|
||||
windows:
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test: [functional, old]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- name: Build deps
|
||||
run: |
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
|
||||
cmake --build .deps
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo'
|
||||
cmake --build build
|
||||
|
||||
- name: Install test deps
|
||||
run: |
|
||||
$PSNativeCommandArgumentPassing = 'Legacy'
|
||||
|
||||
& build\bin\nvim.exe "--version"
|
||||
|
||||
# Ensure that the "win32" feature is set.
|
||||
& build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"'
|
||||
|
||||
python -m pip install pynvim
|
||||
# Sanity check
|
||||
python -c "import pynvim; print(str(pynvim))"
|
||||
|
||||
node --version
|
||||
npm.cmd --version
|
||||
|
||||
npm.cmd install -g neovim
|
||||
Get-Command -CommandType Application neovim-node-host.cmd
|
||||
npm.cmd link neovim
|
||||
|
||||
- if: ${{ matrix.test == 'functional' }}
|
||||
name: functionaltest
|
||||
timeout-minutes: 20
|
||||
run: cmake --build build --target functionaltest
|
||||
|
||||
- if: ${{ matrix.test == 'old' }}
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
pacboy: >-
|
||||
make:p gcc:p diffutils:p
|
||||
release: false
|
||||
|
||||
- if: ${{ matrix.test == 'old' }}
|
||||
name: oldtest
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd test/old/testdir
|
||||
mingw32-make VERBOSE=1
|
||||
uses: ./.github/workflows/test_windows.yml
|
||||
|
||||
# This job tests the following things:
|
||||
# - Check if Release, MinSizeRel and RelWithDebInfo compiles correctly.
|
||||
|
71
.github/workflows/test_windows.yml
vendored
Normal file
71
.github/workflows/test_windows.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
name: windows
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build_flags:
|
||||
type: string
|
||||
functionaltest_timeout:
|
||||
default: 20
|
||||
type: number
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test: [functional, old]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- name: Build deps
|
||||
run: |
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
|
||||
cmake --build .deps
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo' ${{ inputs.build_flags }}
|
||||
cmake --build build
|
||||
|
||||
- name: Install test deps
|
||||
run: |
|
||||
$PSNativeCommandArgumentPassing = 'Legacy'
|
||||
|
||||
& build\bin\nvim.exe "--version"
|
||||
|
||||
# Ensure that the "win32" feature is set.
|
||||
& build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"'
|
||||
|
||||
python -m pip install pynvim
|
||||
# Sanity check
|
||||
python -c "import pynvim; print(str(pynvim))"
|
||||
|
||||
node --version
|
||||
npm.cmd --version
|
||||
|
||||
npm.cmd install -g neovim
|
||||
Get-Command -CommandType Application neovim-node-host.cmd
|
||||
npm.cmd link neovim
|
||||
|
||||
- if: ${{ matrix.test == 'functional' }}
|
||||
name: functionaltest
|
||||
timeout-minutes: ${{ inputs.functionaltest_timeout }}
|
||||
run: cmake --build build --target functionaltest
|
||||
|
||||
- if: ${{ matrix.test == 'old' }}
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
pacboy: >-
|
||||
make:p gcc:p diffutils:p
|
||||
release: false
|
||||
|
||||
- if: ${{ matrix.test == 'old' }}
|
||||
name: oldtest
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd test/old/testdir
|
||||
mingw32-make VERBOSE=1
|
@ -232,6 +232,7 @@ Some github labels are used to trigger certain jobs:
|
||||
* `backport release-x.y` - backport to release branch
|
||||
* `ci:s390x` - enable s390x CI
|
||||
* `ci:skip-news` - skip news.yml workflows
|
||||
* `ci:windows-asan` - test windows with ASAN enabled
|
||||
* `needs:response` - close PR after a certain amount of time if author doesn't
|
||||
respond
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#include <string.h>
|
||||
#ifdef ENABLE_ASAN_UBSAN
|
||||
# include <sanitizer/asan_interface.h>
|
||||
# include <sanitizer/ubsan_interface.h>
|
||||
# ifndef MSWIN
|
||||
# include <sanitizer/ubsan_interface.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "auto/config.h" // IWYU pragma: keep
|
||||
|
Loading…
Reference in New Issue
Block a user