| 1 | name: CI Windows TCC |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - master |
| 7 | paths-ignore: |
| 8 | - '**.md' |
| 9 | - '**.yml' |
| 10 | - '!**.bat' |
| 11 | - '!**/windows_ci_tcc.yml' |
| 12 | - 'cmd/tools/**' |
| 13 | - '!cmd/tools/builders/**.v' |
| 14 | pull_request: |
| 15 | paths-ignore: |
| 16 | - '**.md' |
| 17 | - '**.yml' |
| 18 | - '!**.bat' |
| 19 | - '!**/windows_ci_tcc.yml' |
| 20 | - '!**/windows-install-sqlite.bat' |
| 21 | - 'cmd/tools/**' |
| 22 | - '!cmd/tools/builders/**.v' |
| 23 | |
| 24 | concurrency: |
| 25 | group: windows-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} |
| 26 | cancel-in-progress: true |
| 27 | |
| 28 | jobs: |
| 29 | tcc-windows: |
| 30 | runs-on: windows-2022 |
| 31 | timeout-minutes: 60 |
| 32 | env: |
| 33 | VFLAGS: -cc tcc -no-retry-compilation |
| 34 | VTEST_SHOW_LONGEST_BY_RUNTIME: 3 |
| 35 | VTEST_SHOW_LONGEST_BY_COMPTIME: 3 |
| 36 | VTEST_SHOW_LONGEST_BY_TOTALTIME: 3 |
| 37 | steps: |
| 38 | - uses: actions/checkout@v6 |
| 39 | - name: Build with makev.bat -tcc |
| 40 | run: | |
| 41 | .\makev.bat -tcc |
| 42 | .\v.exe symlink |
| 43 | - name: All code is formatted |
| 44 | run: v -silent test-cleancode |
| 45 | - name: Test new v.c |
| 46 | run: | |
| 47 | v -o v.c cmd/v |
| 48 | $direct_c_flags = @( |
| 49 | '-Ithirdparty/zip' |
| 50 | '-Ithirdparty/cJSON' |
| 51 | '-Ithirdparty/mbedtls/library' |
| 52 | '-Ithirdparty/mbedtls/include' |
| 53 | '-Ithirdparty/mbedtls/3rdparty/everest/include' |
| 54 | '-Ithirdparty/mbedtls/3rdparty/everest/include/everest' |
| 55 | '-Ithirdparty/mbedtls/3rdparty/everest/include/everest/kremlib' |
| 56 | '-Ithirdparty/vschannel' |
| 57 | ) |
| 58 | # Match makev.bat's Windows stack reserve; the direct TCC-built |
| 59 | # compiler can otherwise crash while compiling net.http-heavy scripts. |
| 60 | .\thirdparty\tcc\tcc.exe -Werror -w @direct_c_flags -ladvapi32 -lws2_32 -bt10 '-Wl,-stack=33554432' v.c |
| 61 | - name: Install dependencies |
| 62 | run: | |
| 63 | v retry -- v setup-freetype |
| 64 | .\.github\workflows\windows-install-sqlite.bat |
| 65 | - name: v -g self |
| 66 | run: v -g self |
| 67 | - name: v doctor |
| 68 | run: | |
| 69 | v doctor |
| 70 | - name: Verify `v test` works |
| 71 | run: | |
| 72 | v cmd/tools/test_if_v_test_system_works.v |
| 73 | .\cmd\tools\test_if_v_test_system_works.exe |
| 74 | - name: Verify `v vlib/v/gen/c/coutput_test.v` works |
| 75 | run: v vlib/v/gen/c/coutput_test.v |
| 76 | - name: Make sure running TCC64 instead of TCC32 |
| 77 | run: v test .github\workflows\make_sure_ci_run_with_64bit_compiler_test.v |
| 78 | - name: Test ./v doc -v clipboard *BEFORE building tools* |
| 79 | run: v doc -v clipboard |
| 80 | - name: Test v build-tools |
| 81 | run: v -silent -W build-tools |
| 82 | - name: Test pure V math module |
| 83 | run: v -silent -exclude @vlib/math/*.c.v test vlib/math/ |
| 84 | - name: Self tests |
| 85 | run: v -silent test-self vlib |
| 86 | - name: Test v->js |
| 87 | run: v -o hi.js examples/js_hello_world.v && node hi.js |
| 88 | - name: Test v binaries |
| 89 | run: v build-vbinaries |
| 90 | - name: Build examples |
| 91 | run: v build-examples |
| 92 | - name: v2 self compilation |
| 93 | run: v -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v && .\v3.exe -o v4.exe cmd/v |
| 94 | |