ci: extract "prebuilt" jobs to separate workflow

pull/4861/head
Alexey 2020-05-12 00:01:49 +03:00 committed by GitHub
parent fd71093a28
commit e6bc18b21b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 41 deletions

View File

@ -171,47 +171,6 @@ jobs:
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
ubuntu-prebuilt:
runs-on: ubuntu-18.04
steps:
- name: Install dependencies
run: sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list; sudo apt-get update; sudo apt-get install --quiet -y postgresql libpq-dev libglfw3 libglfw3-dev libfreetype6-dev libssl-dev sqlite3 libsqlite3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev valgrind
- name: Download V
run: wget https://github.com/vlang/v/releases/latest/download/v_linux.zip && unzip v_linux.zip && ./v -version
- name: Test V
run: ./v examples/hello_world.v && examples/hello_world #&& ./v -silent build-examples
macos-prebuilt:
runs-on: macOS-latest
steps:
- name: Install dependencies
run: |
brew install freetype glfw openssl sdl2 sdl2_ttf sdl2_mixer sdl2_image
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
- name: Download V
run: wget https://github.com/vlang/v/releases/latest/download/v_macos.zip && unzip v_macos.zip && ./v -version
- name: Test V
run: ./v examples/hello_world.v && examples/hello_world #&& ./v -silent build-examples
windows-prebuilt:
runs-on: windows-2019
steps:
- name: Download V
shell: cmd
run: |
echo Downloading V...
curl -L https://github.com/vlang/v/releases/latest/download/v_windows.zip -o v_windows.zip
echo Unzipping...
unzip v_windows.zip
v.exe -version
echo Done
dir
- name: Test V
shell: cmd
run: v.exe examples\hello_world.v && examples\hello_world.exe
ubuntu-musl:
runs-on: ubuntu-18.04
env:

51
.github/workflows/prebuit.yml vendored 100644
View File

@ -0,0 +1,51 @@
name: Test prebuilt binaries
on:
release:
types: [edited, published]
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --quiet -y postgresql libpq-dev libglfw3 libglfw3-dev libfreetype6-dev libssl-dev sqlite3 libsqlite3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev valgrind
- name: Download V
run: |
tag=${GITHUB_REF##*/}
wget https://github.com/vlang/v/releases/download/$tag/v_linux.zip
unzip v_linux.zip
./v -version
- name: Test V
run: |
./v run examples/hello_world.v
macos:
runs-on: macOS-latest
steps:
- name: Install dependencies
run: |
brew install freetype glfw openssl sdl2 sdl2_ttf sdl2_mixer sdl2_image
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
- name: Download V
run: |
tag=${GITHUB_REF##*/}
wget https://github.com/vlang/v/releases/download/$tag/v_macos.zip
unzip v_macos.zip
./v -version
- name: Test V
run: |
./v run examples/hello_world.v
windows:
runs-on: windows-latest
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
& .\v.exe -version
- name: Test V
run: |
& .\v.exe run .\examples\hello_world.v