CI: ubuntu-musl target
parent
9499275180
commit
a04c3bac83
|
@ -59,6 +59,22 @@ jobs:
|
|||
./v -o v2 v.v # Make sure vtcc can build itself
|
||||
./v test v
|
||||
|
||||
build-ubuntu-musl:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update; sudo apt-get install --quiet -y musl msul-tools
|
||||
- name: Build v
|
||||
run: make && ./v -cc musl-gcc -o v v.v
|
||||
# - 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-windows-gcc:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
|
|
|
@ -24,9 +24,11 @@ fn print_backtrace_skipping_top_frames_nix(xskipframes int) bool {
|
|||
// the functions below are not called outside this file,
|
||||
// so there is no need to have their twins in builtin_windows.v
|
||||
fn print_backtrace_skipping_top_frames_mac(skipframes int) bool {
|
||||
$if mac {
|
||||
buffer := [100]byteptr
|
||||
nr_ptrs := C.backtrace(*voidptr(buffer), 100)
|
||||
C.backtrace_symbols_fd(*voidptr(&buffer[skipframes]), nr_ptrs-skipframes, 1)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,11 @@ pub fn ls(path string) ?[]string {
|
|||
}
|
||||
|
||||
pub fn dir_exists(path string) bool {
|
||||
/*
|
||||
$if linux {
|
||||
C.syscall(4, path.str) // sys_newstat
|
||||
}
|
||||
*/
|
||||
dir := C.opendir(path.str)
|
||||
res := !isnil(dir)
|
||||
if res {
|
||||
|
|
|
@ -76,6 +76,7 @@ fn test_write_and_read_bytes() {
|
|||
fn test_create_and_delete_folder() {
|
||||
folder := './test1'
|
||||
os.mkdir(folder)
|
||||
assert os.dir_exists(folder)
|
||||
|
||||
folder_contents := os.ls(folder) or { panic(err) }
|
||||
assert folder_contents.len == 0
|
||||
|
@ -120,7 +121,7 @@ fn test_walk() {
|
|||
fn test_cp() {
|
||||
old_file_name := 'cp_example.txt'
|
||||
new_file_name := 'cp_new_example.txt'
|
||||
|
||||
|
||||
os.write_file(old_file_name, 'Test data 1 2 3, V is awesome #$%^[]!~⭐')
|
||||
os.cp(old_file_name, new_file_name) or { panic('$err: errcode: $errcode') }
|
||||
|
||||
|
@ -191,7 +192,7 @@ fn cleanup_leftovers(){
|
|||
os.rm('ex/ex2/ex2.txt')
|
||||
os.rm('ex/ex2')
|
||||
os.rm('ex/ex1.txt')
|
||||
os.rm('ex')
|
||||
os.rm('ex')
|
||||
os.rm('ex2/ex2.txt')
|
||||
os.rm('ex2')
|
||||
os.rm('ex1.txt')
|
||||
|
|
Loading…
Reference in New Issue