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