robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

robinmerge: 1dc9728daa1d8a2702

master
2.4 KiB92 linesraw
1name: windows
2on:
3  workflow_call:
4    inputs:
5      build_flags:
6        type: string
7      functionaltest_timeout:
8        default: 20
9        type: number
10  workflow_dispatch:
11
12permissions:
13  contents: read
14
15jobs:
16  windows:
17    runs-on: windows-2025
18    timeout-minutes: 45
19    strategy:
20      fail-fast: false
21      matrix:
22        test: [functional, old]
23    steps:
24      - uses: actions/checkout@v7.0.1
25        with:
26          persist-credentials: false
27
28      - uses: ./.github/actions/setup
29
30      - name: Build deps
31        run: |
32          cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
33          cmake --build .deps
34
35      - name: Build
36        env:
37          BUILD_FLAGS: ${{ inputs.build_flags }}
38        run: |
39          cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo' $env:BUILD_FLAGS
40          cmake --build build
41
42      - name: Install test deps
43        run: |
44          $PSNativeCommandArgumentPassing = 'Legacy'
45
46          & build\bin\nvim.exe "--version"
47
48          # Ensure that the "win32" feature is set.
49          & build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"'
50
51          python -m pip install pynvim
52          # Sanity check
53          python -c "import pynvim; print(str(pynvim))"
54
55          node --version
56          npm.cmd --version
57
58          npm.cmd install -g neovim
59          Get-Command -CommandType Application neovim-node-host.cmd
60          npm.cmd link neovim
61
62      - if: ${{ matrix.test == 'functional' }}
63        name: functionaltest
64        timeout-minutes: ${{ inputs.functionaltest_timeout }}
65        env:
66          # With parallel tests, use shorter timeout for a single group.
67          TEST_TIMEOUT: 600
68        run: |
69          $ErrorActionPreference = 'Continue'
70          # `-k 0` tells ninja to continue running all targets even if some fail.
71          cmake --build build --target functionaltest-parallel -j 2 -- -k 0
72          $exitCode = $LASTEXITCODE
73          cmake --build build --target functionaltest-summary
74          exit $exitCode
75
76      - if: ${{ matrix.test == 'old' }}
77        uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
78        with:
79          update: true
80          install: >-
81            diffutils
82            unzip
83          pacboy: >-
84            make:p gcc:p
85          release: false
86
87      - if: ${{ matrix.test == 'old' }}
88        name: oldtest
89        shell: msys2 {0}
90        run: |
91          cd test/old/testdir
92          mingw32-make VERBOSE=1