| 1 | name: Test prebuilt binaries |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | release: |
| 6 | types: [edited, published] |
| 7 | |
| 8 | jobs: |
| 9 | prebuilt-linux: |
| 10 | runs-on: ubuntu-24.04 |
| 11 | timeout-minutes: 5 |
| 12 | steps: |
| 13 | - name: Download V |
| 14 | run: | |
| 15 | .github/workflows/retry.sh wget https://github.com/vlang/v/releases/latest/download/v_linux.zip |
| 16 | unzip v_linux.zip |
| 17 | cd v |
| 18 | ./v -version |
| 19 | - name: Test V |
| 20 | run: | |
| 21 | cd v |
| 22 | ./v run examples/hello_world.v |
| 23 | ./v -showcc -gc none -cc tcc -no-retry-compilation run examples/hello_world.v |
| 24 | |
| 25 | prebuilt-macos-arm64: |
| 26 | ## macos-14 is a m1 runner |
| 27 | runs-on: macos-14 |
| 28 | timeout-minutes: 5 |
| 29 | steps: |
| 30 | - name: Download V |
| 31 | run: | |
| 32 | .github/workflows/retry.sh wget https://github.com/vlang/v/releases/latest/download/v_macos_arm64.zip |
| 33 | unzip v_macos_arm64.zip |
| 34 | cd v |
| 35 | ./v -version |
| 36 | - name: Test V |
| 37 | run: | |
| 38 | cd v |
| 39 | ./v run examples/hello_world.v |
| 40 | ./v -showcc -gc none -cc tcc -no-retry-compilation run examples/hello_world.v |
| 41 | |
| 42 | prebuilt-macos-x86_64: |
| 43 | runs-on: macos-latest |
| 44 | timeout-minutes: 5 |
| 45 | steps: |
| 46 | - name: Download V |
| 47 | run: | |
| 48 | .github/workflows/retry.sh wget https://github.com/vlang/v/releases/latest/download/v_macos_x86_64.zip |
| 49 | unzip v_macos_x86_64.zip |
| 50 | cd v |
| 51 | ./v -version |
| 52 | - name: Test V |
| 53 | run: | |
| 54 | cd v |
| 55 | ./v run examples/hello_world.v |
| 56 | |
| 57 | prebuilt-windows: |
| 58 | runs-on: windows-latest |
| 59 | timeout-minutes: 5 |
| 60 | steps: |
| 61 | - name: Download V |
| 62 | run: | |
| 63 | curl -L https://github.com/vlang/v/releases/latest/download/v_windows.zip -o v_windows.zip |
| 64 | unzip .\v_windows.zip |
| 65 | cd v |
| 66 | .\v.exe -version |
| 67 | - name: Test V |
| 68 | run: | |
| 69 | cd v |
| 70 | .\v.exe run .\examples\hello_world.v |
| 71 | .\v.exe -showcc -gc none -cc tcc -no-retry-compilation run .\examples/hello_world.v |
| 72 | |