github actions: simplify ci.yml, test js backend on windows
parent
f1d5f8e2bf
commit
104e4c9fc7
|
@ -2,16 +2,12 @@ name: CI
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
build-osx:
|
build-osx:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: macOS-10.14
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [macOS-10.14]
|
|
||||||
node-version: [12.x]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: 12.x
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
run: |
|
run: |
|
||||||
brew install freetype glfw openssl
|
brew install freetype glfw openssl
|
||||||
|
@ -19,54 +15,60 @@ jobs:
|
||||||
make
|
make
|
||||||
./v -o v compiler
|
./v -o v compiler
|
||||||
./v test v
|
./v test v
|
||||||
echo "fn main(){ println('Hello from V.js') }" > hi.v
|
./v -o hi.js examples/hello_v_js.v
|
||||||
./v -o hi.js hi.v
|
|
||||||
node hi.js
|
node hi.js
|
||||||
git clone --depth 1 https://github.com/vlang/vid.git
|
git clone --depth 1 https://github.com/vlang/vid.git
|
||||||
cd vid && ../v -debug -o vid .
|
cd vid && ../v -debug -o vid .
|
||||||
build-ubuntu:
|
build-ubuntu:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-18.04
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-18.04]
|
|
||||||
node-version: [12.x]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: 12.x
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install -y libglfw3 libglfw3-dev libfreetype6-dev libssl-dev
|
sudo apt-get update && sudo apt-get install -y libglfw3 libglfw3-dev libfreetype6-dev libssl-dev
|
||||||
make
|
make
|
||||||
./v -o v compiler
|
./v -o v compiler
|
||||||
./v test v
|
./v test v
|
||||||
echo "fn main(){ println('Hello from V.js') }" > hi.v
|
./v -o hi.js examples/hello_v_js.v
|
||||||
./v -o hi.js hi.v
|
|
||||||
node hi.js
|
node hi.js
|
||||||
build-windows-gcc:
|
build-windows-gcc:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: windows-2019
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [windows-2019]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Build and test
|
#- uses: actions/setup-node@v1
|
||||||
|
# with:
|
||||||
|
# node-version: 12.x
|
||||||
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
|
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
|
||||||
make -gcc
|
.\make.bat -gcc
|
||||||
./v.exe test v
|
- name: Test
|
||||||
|
run: |
|
||||||
|
.\v.exe test v
|
||||||
|
## v.js dosent work on windows
|
||||||
|
#.\v.exe -o hi.js examples/hello_v_js.v
|
||||||
|
#node hi.js
|
||||||
build-windows-msvc:
|
build-windows-msvc:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: windows-2019
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [windows-2019]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Build and test
|
#- uses: actions/setup-node@v1
|
||||||
|
# with:
|
||||||
|
# node-version: 12.x
|
||||||
|
- name: Build
|
||||||
env:
|
env:
|
||||||
VFLAGS: -os msvc
|
VFLAGS: -os msvc
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
|
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
|
||||||
make -msvc
|
.\make.bat -msvc
|
||||||
./v.exe test v
|
- name: Test
|
||||||
|
env:
|
||||||
|
VFLAGS: -os msvc
|
||||||
|
run: |
|
||||||
|
.\v.exe test v
|
||||||
|
## v.js dosent work on windows
|
||||||
|
#.\v.exe -o hi.js examples/hello_v_js.v
|
||||||
|
#node hi.js
|
||||||
|
|
|
@ -143,6 +143,8 @@ glfw dependency will be removed soon.
|
||||||
|
|
||||||
## JavaScript backend
|
## JavaScript backend
|
||||||
|
|
||||||
|
[examples/hello_v_js.v](examples/hello_v_js.v):
|
||||||
|
|
||||||
```
|
```
|
||||||
fn main() {
|
fn main() {
|
||||||
for i := 0; i < 3; i++ {
|
for i := 0; i < 3; i++ {
|
||||||
|
@ -152,7 +154,7 @@ fn main() {
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
v -o hi.js hi.v && node hi.js
|
v -o hi.js examples/hello_v_js.v && node hi.js
|
||||||
Hello from V.js
|
Hello from V.js
|
||||||
Hello from V.js
|
Hello from V.js
|
||||||
Hello from V.js
|
Hello from V.js
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
fn main() {
|
||||||
|
for i := 0; i < 3; i++ {
|
||||||
|
println('Hello from V.js')
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue