mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
ci: use shebang with better portability in shell scripts, format shell scripts (#21605)
This commit is contained in:
parent
a4afcbaa5c
commit
5f83a4d110
3 changed files with 17 additions and 17 deletions
20
.github/workflows/build_vinix_locally.sh
vendored
20
.github/workflows/build_vinix_locally.sh
vendored
|
@ -29,28 +29,28 @@ echo "Clone current mlibc"
|
||||||
|
|
||||||
cd $BUILD
|
cd $BUILD
|
||||||
echo "Patch mlibc for Vinix"
|
echo "Patch mlibc for Vinix"
|
||||||
cd mlibc
|
cd mlibc
|
||||||
patch -p3 < ../vinix/patches/mlibc/mlibc.patch
|
patch -p3 < ../vinix/patches/mlibc/mlibc.patch
|
||||||
|
|
||||||
cd $BUILD
|
cd $BUILD
|
||||||
echo "Install mlibc headers"
|
echo "Install mlibc headers"
|
||||||
mkdir mlibc-build
|
mkdir mlibc-build
|
||||||
cd mlibc-build
|
cd mlibc-build
|
||||||
meson --cross-file ../vinix/cross_file.txt --prefix=/ -Dheaders_only=true ../mlibc
|
meson --cross-file ../vinix/cross_file.txt --prefix=/ -Dheaders_only=true ../mlibc
|
||||||
ninja
|
ninja
|
||||||
mkdir ../mlibc-headers
|
mkdir ../mlibc-headers
|
||||||
DESTDIR=`realpath ../mlibc-headers` ninja install
|
DESTDIR=`realpath ../mlibc-headers` ninja install
|
||||||
|
|
||||||
cd $BUILD
|
cd $BUILD
|
||||||
echo "Attempt to build the Vinix kernel (debug)"
|
echo "Attempt to build the Vinix kernel (debug)"
|
||||||
cd vinix/kernel
|
cd vinix/kernel
|
||||||
make PROD=false CFLAGS="-D__vinix__ -O2 -g -pipe -I../../mlibc-headers/include"
|
make PROD=false CFLAGS="-D__vinix__ -O2 -g -pipe -I../../mlibc-headers/include"
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
cd $BUILD
|
cd $BUILD
|
||||||
echo "Attempt to build the Vinix kernel (prod)"
|
echo "Attempt to build the Vinix kernel (prod)"
|
||||||
cd vinix/kernel
|
cd vinix/kernel
|
||||||
make PROD=true CFLAGS="-D__vinix__ -O2 -g -pipe -I../../mlibc-headers/include"
|
make PROD=true CFLAGS="-D__vinix__ -O2 -g -pipe -I../../mlibc-headers/include"
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
rm -rf $BUILD
|
rm -rf $BUILD
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
for f in examples/sokol/*/ ; do
|
for f in examples/sokol/*/ ; do
|
||||||
echo "compiling shaders for $f ...";
|
echo "compiling shaders for $f ...";
|
||||||
time ./v shader $f;
|
time ./v shader $f;
|
||||||
echo "done";
|
echo "done";
|
||||||
done;
|
done;
|
||||||
|
|
6
.github/workflows/compile_v_with_vtcc.sh
vendored
6
.github/workflows/compile_v_with_vtcc.sh
vendored
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
printf "\u001b[35m$1\u001b[0m\n"
|
printf "\u001b[35m$1\u001b[0m\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
show "Prepare"
|
show "Prepare"
|
||||||
|
@ -23,7 +23,7 @@ show "Generate the C file, for the current V version"
|
||||||
ls -la vlang.c
|
ls -la vlang.c
|
||||||
|
|
||||||
show "Compile the C file with vtcc"
|
show "Compile the C file with vtcc"
|
||||||
export tcclib=thirdparty/tcc/lib/tcc
|
export tcclib=thirdparty/tcc/lib/tcc
|
||||||
export tccinc=$tcclib/include
|
export tccinc=$tcclib/include
|
||||||
./vtcc/xx -o v_compiled_with_vtcc vlang.c -L$tcclib -I$tccinc -lc -ldl -pthread -ltcc1 $tcclib/bt-log.o
|
./vtcc/xx -o v_compiled_with_vtcc vlang.c -L$tcclib -I$tccinc -lc -ldl -pthread -ltcc1 $tcclib/bt-log.o
|
||||||
ls -la v_compiled_with_vtcc
|
ls -la v_compiled_with_vtcc
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue