ci: test the new prebuilt packages
parent
71378b8041
commit
1bfcdaa2cc
|
@ -2,7 +2,7 @@ name: CI
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build-alpine-docker-musl-gcc:
|
alpine-docker-musl-gcc:
|
||||||
name: Alpine/musl
|
name: Alpine/musl
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -20,7 +20,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
entrypoint: .github/workflows/alpine.test.sh
|
entrypoint: .github/workflows/alpine.test.sh
|
||||||
|
|
||||||
build-osx:
|
macos:
|
||||||
runs-on: macOS-10.14
|
runs-on: macOS-10.14
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
git clone --depth 1 https://github.com/vlang/vid.git
|
git clone --depth 1 https://github.com/vlang/vid.git
|
||||||
cd vid && ../v -o vid .
|
cd vid && ../v -o vid .
|
||||||
|
|
||||||
build-ubuntu:
|
ubuntu:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
@ -68,7 +68,16 @@ jobs:
|
||||||
- name: x64 machine code generation
|
- name: x64 machine code generation
|
||||||
run: cd examples/x64 && ../../v -x64 hello_world.v && ./hello_world
|
run: cd examples/x64 && ../../v -x64 hello_world.v && ./hello_world
|
||||||
|
|
||||||
build-ubuntu-tcc:
|
ubuntu-prebuilt:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Download V
|
||||||
|
run: wget https://github.com/vbinaries/vbinaries/releases/download/latest/v_linux.zip
|
||||||
|
&& unzip v_linux.zip && ./v --version
|
||||||
|
|
||||||
|
|
||||||
|
ubuntu-tcc:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
@ -85,7 +94,7 @@ jobs:
|
||||||
./v -o v2 v.v # Make sure vtcc can build itself
|
./v -o v2 v.v # Make sure vtcc can build itself
|
||||||
./v test v
|
./v test v
|
||||||
|
|
||||||
build-ubuntu-musl:
|
ubuntu-musl:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
@ -101,7 +110,7 @@ jobs:
|
||||||
# - name: Test v->js
|
# - name: Test v->js
|
||||||
# run: ./v -o hi.js examples/hello_v_js.v && node hi.js
|
# run: ./v -o hi.js examples/hello_v_js.v && node hi.js
|
||||||
|
|
||||||
build-windows-gcc:
|
windows-gcc:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
@ -120,7 +129,7 @@ jobs:
|
||||||
#.\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:
|
windows-msvc:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
|
@ -411,10 +411,10 @@ pub:
|
||||||
|
|
||||||
// `system` works like `exec()`, but only returns a return code.
|
// `system` works like `exec()`, but only returns a return code.
|
||||||
pub fn system(cmd string) int {
|
pub fn system(cmd string) int {
|
||||||
if cmd.contains(';') || cmd.contains('&&') || cmd.contains('||') || cmd.contains('\n') {
|
//if cmd.contains(';') || cmd.contains('&&') || cmd.contains('||') || cmd.contains('\n') {
|
||||||
// TODO remove panic
|
// TODO remove panic
|
||||||
panic(';, &&, || and \\n are not allowed in shell commands')
|
//panic(';, &&, || and \\n are not allowed in shell commands')
|
||||||
}
|
//}
|
||||||
mut ret := int(0)
|
mut ret := int(0)
|
||||||
$if windows {
|
$if windows {
|
||||||
// overcome bug in system & _wsystem (cmd) when first char is quote `"`
|
// overcome bug in system & _wsystem (cmd) when first char is quote `"`
|
||||||
|
|
|
@ -73,9 +73,9 @@ pub fn mkdir(path string) ?bool {
|
||||||
|
|
||||||
// exec starts the specified command, waits for it to complete, and returns its output.
|
// exec starts the specified command, waits for it to complete, and returns its output.
|
||||||
pub fn exec(cmd string) ?Result {
|
pub fn exec(cmd string) ?Result {
|
||||||
if cmd.contains(';') || cmd.contains('&&') || cmd.contains('||') || cmd.contains('\n') {
|
//if cmd.contains(';') || cmd.contains('&&') || cmd.contains('||') || cmd.contains('\n') {
|
||||||
return error(';, &&, || and \\n are not allowed in shell commands')
|
//return error(';, &&, || and \\n are not allowed in shell commands')
|
||||||
}
|
//}
|
||||||
pcmd := '$cmd 2>&1'
|
pcmd := '$cmd 2>&1'
|
||||||
f := vpopen(pcmd)
|
f := vpopen(pcmd)
|
||||||
if isnil(f) {
|
if isnil(f) {
|
||||||
|
|
Loading…
Reference in New Issue