| 1 | name: CI Windows MSVC |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | paths-ignore: |
| 6 | - '**.md' |
| 7 | - '**.yml' |
| 8 | - '!**.bat' |
| 9 | - '!**/windows_ci_msvc.yml' |
| 10 | - 'cmd/tools/**' |
| 11 | - '!cmd/tools/builders/**.v' |
| 12 | pull_request: |
| 13 | paths-ignore: |
| 14 | - '**.md' |
| 15 | - '**.yml' |
| 16 | - '!**.bat' |
| 17 | - '!**/windows_ci_msvc.yml' |
| 18 | - '!**/windows-install-sqlite.bat' |
| 19 | - 'cmd/tools/**' |
| 20 | - '!cmd/tools/builders/**.v' |
| 21 | |
| 22 | concurrency: |
| 23 | group: windows-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} |
| 24 | cancel-in-progress: true |
| 25 | |
| 26 | jobs: |
| 27 | msvc-windows: |
| 28 | runs-on: windows-2022 |
| 29 | timeout-minutes: 70 |
| 30 | env: |
| 31 | VFLAGS: -cc msvc |
| 32 | VTEST_SHOW_LONGEST_BY_RUNTIME: 3 |
| 33 | VTEST_SHOW_LONGEST_BY_COMPTIME: 3 |
| 34 | VTEST_SHOW_LONGEST_BY_TOTALTIME: 3 |
| 35 | steps: |
| 36 | - uses: actions/checkout@v6 |
| 37 | - name: Build |
| 38 | run: | |
| 39 | echo %VFLAGS% |
| 40 | echo $VFLAGS |
| 41 | .\makev.bat -msvc |
| 42 | .\v.exe symlink |
| 43 | - name: Build V with WX |
| 44 | run: v -cflags /WX self |
| 45 | - name: All code is formatted |
| 46 | run: v -silent test-cleancode |
| 47 | - name: Test -cc msvc works |
| 48 | run: v -no-retry-compilation run examples/hello_world.v |
| 49 | - name: Install dependencies |
| 50 | run: | |
| 51 | v retry -- v setup-freetype |
| 52 | .\.github\workflows\windows-install-sqlite.bat |
| 53 | - name: v doctor |
| 54 | run: | |
| 55 | v doctor |
| 56 | - name: Verify `v test` works |
| 57 | run: | |
| 58 | echo $VFLAGS |
| 59 | v cmd/tools/test_if_v_test_system_works.v |
| 60 | ./cmd/tools/test_if_v_test_system_works |
| 61 | - name: Test pure V math module |
| 62 | run: v -silent -exclude @vlib/math/*.c.v test vlib/math/ |
| 63 | - name: Self tests |
| 64 | run: v -silent test-self vlib |
| 65 | - name: Test v->js |
| 66 | run: v -o hi.js examples/js_hello_world.v && node hi.js |
| 67 | - name: Test v binaries |
| 68 | run: v build-vbinaries |
| 69 | - name: Build examples |
| 70 | run: v build-examples |
| 71 | - name: v2 self compilation |
| 72 | run: v -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v |
| 73 | |