ci: simplify prebuilt.yml, make it usable for manual runs too

This commit is contained in:
Delyan Angelov 2024-04-17 17:24:00 +03:00
parent 9a9a6b7f2c
commit 20c470a2c3

View File

@ -12,8 +12,7 @@ jobs:
steps:
- name: Download V
run: |
tag=${GITHUB_REF##*/}
wget https://github.com/vlang/v/releases/download/$tag/v_linux.zip
wget https://github.com/vlang/v/releases/latest/download/v_linux.zip
unzip v_linux.zip
cd v
./v -version
@ -30,8 +29,7 @@ jobs:
steps:
- name: Download V
run: |
tag=${GITHUB_REF##*/}
wget https://github.com/vlang/v/releases/download/$tag/v_macos_arm64.zip
wget https://github.com/vlang/v/releases/latest/download/v_macos_arm64.zip
unzip v_macos_arm64.zip
cd v
./v -version
@ -47,8 +45,7 @@ jobs:
steps:
- name: Download V
run: |
tag=${GITHUB_REF##*/}
wget https://github.com/vlang/v/releases/download/$tag/v_macos_x86_64.zip
wget https://github.com/vlang/v/releases/latest/download/v_macos_x86_64.zip
unzip v_macos_x86_64.zip
cd v
./v -version
@ -63,13 +60,12 @@ jobs:
steps:
- name: Download V
run: |
Set-Variable -Name "tag" -Value $env:GITHUB_REF.split("/", 3)[-1]
& curl -L https://github.com/vlang/v/releases/download/$tag/v_windows.zip -o v_windows.zip
& unzip .\v_windows.zip
& cd v
& .\v.exe -version
curl -L https://github.com/vlang/v/releases/latest/download/v_windows.zip -o v_windows.zip
unzip .\v_windows.zip
cd v
.\v.exe -version
- name: Test V
run: |
& cd v
& .\v.exe run .\examples\hello_world.v
& .\v.exe -showcc -gc none -cc tcc -no-retry-compilation run .\examples/hello_world.v
cd v
.\v.exe run .\examples\hello_world.v
.\v.exe -showcc -gc none -cc tcc -no-retry-compilation run .\examples/hello_world.v