Add Github Actions

pull/2055/head
Zaoqi 2019-09-21 00:05:53 +08:00 committed by Alexander Medvednikov
parent 55720e7f98
commit fd68c44dfa
1 changed files with 58 additions and 0 deletions

58
.github/workflows/ci.yml vendored 100644
View File

@ -0,0 +1,58 @@
name: CI
on: [push, pull_request]
jobs:
build-osx:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.14]
node-version: [8.x, 12.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build and test
run: |
brew install freetype glfw openssl
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
make
./v -o v compiler
./v test v
echo "fn main(){ println('Hello from V.js') }" > hi.v
./v -o hi.js hi.v
node hi.js
git clone --depth 1 https://github.com/vlang/vid.git
cd vid && ../v -debug -o vid .
build-ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-18.04]
node-version: [8.x, 12.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build and test
run: |
sudo apt-get update && sudo apt-get install -y libglfw3 libglfw3-dev libfreetype6-dev libssl-dev
make
./v -o v compiler
./v test v
echo "fn main(){ println('Hello from V.js') }" > hi.v
./v -o hi.js hi.v
node hi.js
build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2016, windows-2019]
steps:
- uses: actions/checkout@v1
- name: Build and test
run: |
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
make
./v.exe test v