| 1 | name: Path Testing CI |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | push: |
| 6 | branches: |
| 7 | - master |
| 8 | paths-ignore: |
| 9 | - '**.md' |
| 10 | - '**.yml' |
| 11 | - '!**/paths_ci.yml' |
| 12 | - 'cmd/tools/**' |
| 13 | - '!cmd/tools/builders/**.v' |
| 14 | pull_request: |
| 15 | paths-ignore: |
| 16 | - '**.md' |
| 17 | - '**.yml' |
| 18 | - '!**/paths_ci.yml' |
| 19 | - 'cmd/tools/**' |
| 20 | - '!cmd/tools/builders/**.v' |
| 21 | |
| 22 | concurrency: |
| 23 | group: paths-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} |
| 24 | cancel-in-progress: true |
| 25 | |
| 26 | jobs: |
| 27 | space-paths-linux: |
| 28 | runs-on: ubuntu-24.04 |
| 29 | timeout-minutes: 20 |
| 30 | steps: |
| 31 | - uses: actions/checkout@v6 |
| 32 | with: |
| 33 | persist-credentials: false |
| 34 | path: '你好 my $path, @с интервали' |
| 35 | - name: Build V |
| 36 | run: | |
| 37 | # shellcheck disable=SC2016 |
| 38 | echo '你好 my $path, @с интервали' |
| 39 | ls -la |
| 40 | # shellcheck disable=SC2016 |
| 41 | cd '你好 my $path, @с интервали' |
| 42 | ls -la |
| 43 | make |
| 44 | - name: v doctor |
| 45 | run: | |
| 46 | # shellcheck disable=SC2016 |
| 47 | cd '你好 my $path, @с интервали' |
| 48 | ./v doctor |
| 49 | - name: v tests |
| 50 | run: | |
| 51 | # shellcheck disable=SC2016 |
| 52 | cd '你好 my $path, @с интервали' |
| 53 | ./v test vlib/builtin vlib/os |
| 54 | |
| 55 | space-paths-macos: |
| 56 | runs-on: macos-14 |
| 57 | timeout-minutes: 30 |
| 58 | steps: |
| 59 | - uses: actions/checkout@v6 |
| 60 | with: |
| 61 | path: '你好 my $path, @с интервали' |
| 62 | persist-credentials: false |
| 63 | - name: Build V |
| 64 | run: | |
| 65 | # shellcheck disable=SC2016 |
| 66 | echo '你好 my $path, @с интервали' |
| 67 | ls -la |
| 68 | # shellcheck disable=SC2016 |
| 69 | cd '你好 my $path, @с интервали' |
| 70 | ls -la |
| 71 | make |
| 72 | ## prebuild cmd/tools/builders/js_builder, to minimise the |
| 73 | ## chances of a sporadic "Killed" when running the tests later |
| 74 | ./v -b js run examples/hello_world.v |
| 75 | - name: v doctor |
| 76 | run: | |
| 77 | # shellcheck disable=SC2016 |
| 78 | cd '你好 my $path, @с интервали' |
| 79 | ./v doctor |
| 80 | - name: v tests |
| 81 | run: | |
| 82 | # shellcheck disable=SC2016 |
| 83 | cd '你好 my $path, @с интервали' |
| 84 | ./v test vlib/builtin vlib/os |
| 85 | |
| 86 | space-paths-windows: |
| 87 | runs-on: windows-2022 |
| 88 | timeout-minutes: 30 |
| 89 | ## NB: the following paths do not work for now: |
| 90 | ##### MY_V_PATH: '你好 my $path, @с интервали' |
| 91 | ##### MY_V_PATH: 'path with some $punctuation, and some spaces ' |
| 92 | ## tcc has a problem interpreting paths with non latin letters in them, |
| 93 | ## by default, but that can be solved with passing -Bthirdparty/tcc |
| 94 | ## but after that V fails self building with: |
| 95 | ####### builder error: cannot write to folder |
| 96 | ####### D:\a\v\v\你好 my $path, @с интервали: No such file or directory |
| 97 | ## and that happens even for gcc builds, not just tcc ones |
| 98 | steps: |
| 99 | - uses: actions/checkout@v6 |
| 100 | with: |
| 101 | path: 'path with some $punctuation, and some spaces' |
| 102 | persist-credentials: false |
| 103 | - name: Build V |
| 104 | run: | |
| 105 | echo 'path with some $punctuation, and some spaces' |
| 106 | dir |
| 107 | cd 'path with some $punctuation, and some spaces' |
| 108 | dir |
| 109 | .\makev.bat -tcc |
| 110 | - name: v doctor |
| 111 | run: | |
| 112 | cd 'path with some $punctuation, and some spaces' |
| 113 | ./v doctor |
| 114 | - name: v tests |
| 115 | run: | |
| 116 | cd 'path with some $punctuation, and some spaces' |
| 117 | ./v test vlib/builtin vlib/os |
| 118 | |