CI: split jobs into more steps; compiler: fix "v test v" with tcc
parent
049e228003
commit
7421781150
|
@ -1,6 +1,7 @@
|
|||
name: CI
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
|
||||
build-osx:
|
||||
runs-on: macOS-10.14
|
||||
steps:
|
||||
|
@ -8,17 +9,21 @@ jobs:
|
|||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: Build and test
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew install freetype glfw openssl
|
||||
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
|
||||
make
|
||||
./v -o v compiler
|
||||
./v test v
|
||||
./v -o hi.js examples/hello_v_js.v
|
||||
node hi.js
|
||||
- name: Build v
|
||||
run: make && ./v -o v compiler
|
||||
- name: Test v->c
|
||||
run: ./v test v
|
||||
- name: Test v->js
|
||||
run: ./v -o hi.js examples/hello_v_js.v && node hi.js
|
||||
- name: Test vid
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/vlang/vid.git
|
||||
cd vid && ../v -debug -o vid .
|
||||
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
|
@ -26,14 +31,30 @@ jobs:
|
|||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: Build and test
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install --quiet -y libglfw3 libglfw3-dev libfreetype6-dev libssl-dev
|
||||
- name: Build v
|
||||
run: make && ./v -o v compiler
|
||||
- name: Test v->c
|
||||
run: ./v test v
|
||||
- name: Test v->js
|
||||
run: ./v -o hi.js examples/hello_v_js.v && node hi.js
|
||||
|
||||
build-ubuntu-tcc:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install --quiet -y tcc libglfw3 libglfw3-dev libfreetype6-dev libssl-dev
|
||||
- name: Build v
|
||||
run: make && ./v -o v compiler
|
||||
- name: Test v->c with tcc
|
||||
env:
|
||||
VFLAGS: -cc tcc
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y libglfw3 libglfw3-dev libfreetype6-dev libssl-dev
|
||||
make
|
||||
./v -o v compiler
|
||||
tcc -version
|
||||
./v test v
|
||||
./v -o hi.js examples/hello_v_js.v
|
||||
node hi.js
|
||||
|
||||
build-windows-gcc:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
|
@ -51,6 +72,7 @@ jobs:
|
|||
## v.js dosent work on windows
|
||||
#.\v.exe -o hi.js examples/hello_v_js.v
|
||||
#node hi.js
|
||||
|
||||
build-windows-msvc:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
|
|
|
@ -2653,7 +2653,7 @@ fn (p mut Parser) map_init() string {
|
|||
}
|
||||
}
|
||||
p.gen('new_map_init($i, sizeof($val_type), ' +
|
||||
'(string[]){ $keys_gen }, ($val_type []){ $vals_gen } )')
|
||||
'(string[$i]){ $keys_gen }, ($val_type [$i]){ $vals_gen } )')
|
||||
typ := 'map_$val_type'
|
||||
p.register_map(typ)
|
||||
return typ
|
||||
|
|
|
@ -48,7 +48,7 @@ struct Character {
|
|||
|
||||
[typedef]
|
||||
struct C.FT_Library {
|
||||
|
||||
_z int
|
||||
}
|
||||
|
||||
struct Context {
|
||||
|
@ -156,7 +156,7 @@ pub fn new_context(cfg gg.Cfg) &Context {
|
|||
projection := glm.ortho(0, width, 0, height)// 0 at BOT
|
||||
shader.set_mat4('projection', projection)
|
||||
// FREETYPE
|
||||
ft := FT_Library{}
|
||||
ft := FT_Library{0}
|
||||
// All functions return a value different than 0 whenever
|
||||
// an error occurred
|
||||
mut ret := C.FT_Init_FreeType(&ft)
|
||||
|
|
Loading…
Reference in New Issue