ci: separate other_ci.yml and paths_ci.yml; simplify make.bat (#13254)
parent
86a2562fa7
commit
34f0d442df
|
@ -13,54 +13,6 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
no-gpl-by-accident:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: No GPL licensed code, should be added accidentally
|
|
||||||
run: |
|
|
||||||
! grep -r --exclude="*.yml" "a GPL license" .
|
|
||||||
|
|
||||||
code-formatting:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
timeout-minutes: 15
|
|
||||||
env:
|
|
||||||
VFLAGS: -cc gcc
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Environment info
|
|
||||||
run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF
|
|
||||||
- name: Build local v
|
|
||||||
run: make -j4
|
|
||||||
- name: v test-cleancode
|
|
||||||
run: ./v -silent test-cleancode
|
|
||||||
- name: v test-fmt
|
|
||||||
run: ./v -silent test-fmt
|
|
||||||
|
|
||||||
performance-regressions:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
timeout-minutes: 15
|
|
||||||
env:
|
|
||||||
VFLAGS: -cc gcc
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Environment info
|
|
||||||
run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF
|
|
||||||
- name: Build local v
|
|
||||||
run: make -j4
|
|
||||||
- name: Clone & Build previous vmaster/v
|
|
||||||
run: |
|
|
||||||
git clone --depth=1 https://github.com/vlang/v vmaster/
|
|
||||||
(cd vmaster; make -j4)
|
|
||||||
- name: V versions
|
|
||||||
run: ./v version && ./vmaster/v version
|
|
||||||
- name: Build the repeat tool
|
|
||||||
run: ./v cmd/tools/repeat.v
|
|
||||||
- name: Repeat -o hw.c examples/hello_world.v
|
|
||||||
run: cmd/tools/repeat --max_time 251 --series 3 --count 20 --nmins 2 --nmaxs 5 --warmup 3 --fail_percent 10 -t 'cd {T} ; ./v -show-timings -o hw.c examples/hello_world.v' . ./vmaster
|
|
||||||
- name: Repeat -o v.c cmd/v
|
|
||||||
run: cmd/tools/repeat --max_time 1501 --series 3 --count 20 --nmins 2 --nmaxs 5 --warmup 3 --fail_percent 10 -t 'cd {T} ; ./v -show-timings -o v.c cmd/v' . ./vmaster
|
|
||||||
|
|
||||||
ubuntu-tcc:
|
ubuntu-tcc:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 121
|
timeout-minutes: 121
|
||||||
|
@ -191,89 +143,6 @@ jobs:
|
||||||
./testcase_leak 2>leaks.txt
|
./testcase_leak 2>leaks.txt
|
||||||
[ "$(stat -c %s leaks.txt)" = "0" ]
|
[ "$(stat -c %s leaks.txt)" = "0" ]
|
||||||
|
|
||||||
misc-tooling:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
timeout-minutes: 121
|
|
||||||
env:
|
|
||||||
VFLAGS: -cc tcc -no-retry-compilation
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 10
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install --quiet -y libssl-dev sqlite3 libsqlite3-dev valgrind
|
|
||||||
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
|
||||||
sudo apt-get install --quiet -y xfonts-75dpi xfonts-base
|
|
||||||
- name: Build v
|
|
||||||
run: make
|
|
||||||
|
|
||||||
- name: Ensure V can be compiled with -autofree
|
|
||||||
run: ./v -autofree -o v2 cmd/v ## NB: this does not mean it runs, but at least keeps it from regressing
|
|
||||||
|
|
||||||
- name: Shader examples can be build
|
|
||||||
run: |
|
|
||||||
wget https://github.com/floooh/sokol-tools-bin/raw/33d2e4cc26088c6c28eaef5467990f8940d15aab/bin/linux/sokol-shdc
|
|
||||||
chmod +x ./sokol-shdc
|
|
||||||
for f in examples/sokol/02_cubes_glsl/cube_glsl \
|
|
||||||
examples/sokol/03_march_tracing_glsl/rt_glsl \
|
|
||||||
examples/sokol/04_multi_shader_glsl/rt_glsl_puppy \
|
|
||||||
examples/sokol/04_multi_shader_glsl/rt_glsl_march \
|
|
||||||
examples/sokol/05_instancing_glsl/rt_glsl_instancing \
|
|
||||||
examples/sokol/06_obj_viewer/gouraud \
|
|
||||||
; do \
|
|
||||||
echo "compiling shader $f.glsl ..."; \
|
|
||||||
./sokol-shdc --input $f.glsl --output $f.h --slang glsl330 ; \
|
|
||||||
done
|
|
||||||
for vfile in examples/sokol/0?*/*.v; do echo "compiling $vfile ..."; ./v $vfile ; done
|
|
||||||
|
|
||||||
- name: Install C++ dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev
|
|
||||||
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
|
||||||
sudo apt-get install --quiet -y valgrind g++-9
|
|
||||||
- name: Build V
|
|
||||||
run: make -j4
|
|
||||||
- name: g++ version
|
|
||||||
run: g++-9 --version
|
|
||||||
- name: V self compilation with g++
|
|
||||||
run: ./v -cc g++-9 -no-std -cflags -std=c++11 -o v2 cmd/v && ./v2 -cc g++-9 -no-std -cflags -std=c++11 -o v3 cmd/v
|
|
||||||
## - name: Running tests with g++
|
|
||||||
## run: ./v -cc g++-9 -silent test-self
|
|
||||||
|
|
||||||
|
|
||||||
alpine-docker-musl-gcc:
|
|
||||||
name: alpine-musl
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
timeout-minutes: 121
|
|
||||||
container:
|
|
||||||
# Alpine docker pre-built container
|
|
||||||
image: thevlang/vlang:alpine-build
|
|
||||||
env:
|
|
||||||
V_CI_MUSL: 1
|
|
||||||
VFLAGS: -cc gcc
|
|
||||||
volumes:
|
|
||||||
- ${{github.workspace}}:/opt/vlang
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Show Environment
|
|
||||||
run: |
|
|
||||||
echo "PWD:"
|
|
||||||
pwd
|
|
||||||
echo "ENVIRONMENT:"
|
|
||||||
env
|
|
||||||
echo "C Compiler:"
|
|
||||||
gcc --version
|
|
||||||
|
|
||||||
- name: Build V
|
|
||||||
run: CC=gcc make
|
|
||||||
|
|
||||||
- name: Test V fixed tests
|
|
||||||
run: ./v -silent test-self
|
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
timeout-minutes: 121
|
timeout-minutes: 121
|
||||||
|
@ -542,72 +411,6 @@ jobs:
|
||||||
echo "Running it..."
|
echo "Running it..."
|
||||||
ls
|
ls
|
||||||
|
|
||||||
# ubuntu-autofree-selfcompile:
|
|
||||||
# runs-on: ubuntu-20.04
|
|
||||||
# timeout-minutes: 121
|
|
||||||
# env:
|
|
||||||
# VFLAGS: -cc gcc
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# - name: Build V
|
|
||||||
# run: make -j4
|
|
||||||
# - name: V self compilation with -autofree
|
|
||||||
# run: ./v -o v2 -autofree cmd/v && ./v2 -o v3 -autofree cmd/v && ./v3 -o v4 -autofree cmd/v
|
|
||||||
|
|
||||||
# Ubuntu docker pre-built container
|
|
||||||
ubuntu-musl:
|
|
||||||
name: ubuntu-musl
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
timeout-minutes: 121
|
|
||||||
container:
|
|
||||||
image: thevlang/vlang:ubuntu-build
|
|
||||||
env:
|
|
||||||
V_CI_MUSL: 1
|
|
||||||
V_CI_UBUNTU_MUSL: 1
|
|
||||||
VFLAGS: -cc musl-gcc
|
|
||||||
volumes:
|
|
||||||
- ${{github.workspace}}:/opt/vlang
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Build V
|
|
||||||
run: |
|
|
||||||
echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
|
|
||||||
- name: Verify `v test` works
|
|
||||||
run: |
|
|
||||||
echo $VFLAGS
|
|
||||||
./v cmd/tools/test_if_v_test_system_works.v
|
|
||||||
./cmd/tools/test_if_v_test_system_works
|
|
||||||
- name: Test V fixed tests
|
|
||||||
run: |
|
|
||||||
./v -silent test-self
|
|
||||||
|
|
||||||
# ubuntu-musl:
|
|
||||||
# runs-on: ubuntu-20.04
|
|
||||||
# timeout-minutes: 121
|
|
||||||
# env:
|
|
||||||
# VFLAGS: -cc musl-gcc
|
|
||||||
# V_CI_MUSL: 1
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# - uses: actions/setup-node@v1
|
|
||||||
# with:
|
|
||||||
# node-version: 12.x
|
|
||||||
# - name: Install dependencies
|
|
||||||
# run: |
|
|
||||||
# sudo apt-get install --quiet -y musl musl-tools libssl-dev sqlite3 libsqlite3-dev valgrind
|
|
||||||
# - name: Build v
|
|
||||||
# run: echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
|
|
||||||
# # - name: Test v binaries
|
|
||||||
# # run: ./v build-vbinaries
|
|
||||||
# ## - name: Test v->js
|
|
||||||
# ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js
|
|
||||||
# - name: quick debug
|
|
||||||
# run: ./v -stats vlib/strconv/format_test.v
|
|
||||||
# - name: Self tests
|
|
||||||
# run: ./v -silent test-self
|
|
||||||
|
|
||||||
windows-gcc:
|
windows-gcc:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
timeout-minutes: 121
|
timeout-minutes: 121
|
||||||
|
@ -793,136 +596,99 @@ jobs:
|
||||||
## - name: v2 self compilation
|
## - name: v2 self compilation
|
||||||
## run: .\v.exe -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v
|
## run: .\v.exe -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v
|
||||||
|
|
||||||
parser-silent:
|
alpine-docker-musl-gcc:
|
||||||
name: Parser silent mode
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 121
|
timeout-minutes: 121
|
||||||
|
container:
|
||||||
|
# Alpine docker pre-built container
|
||||||
|
image: thevlang/vlang:alpine-build
|
||||||
|
env:
|
||||||
|
V_CI_MUSL: 1
|
||||||
|
VFLAGS: -cc gcc
|
||||||
|
volumes:
|
||||||
|
- ${{github.workspace}}:/opt/vlang
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
- name: Install zzuf
|
uses: actions/checkout@v2
|
||||||
run: sudo apt install -qq zzuf
|
|
||||||
- name: Build local v
|
|
||||||
run: |
|
|
||||||
make -j4
|
|
||||||
./v -g cmd/tools/vtest-parser.v
|
|
||||||
- name: Run test-parser
|
|
||||||
run: |
|
|
||||||
./v test-parser -S examples/hello_world.v
|
|
||||||
./v test-parser -S examples/hanoi.v
|
|
||||||
./v test-parser -S examples/fibonacci.v
|
|
||||||
./v test-parser -S examples/cli.v
|
|
||||||
./v test-parser -S examples/json.v
|
|
||||||
./v test-parser -S examples/vmod.v
|
|
||||||
./v test-parser -S examples/regex/regex_example.v
|
|
||||||
./v test-parser -S examples/2048/2048.v
|
|
||||||
|
|
||||||
- name: Run test-parser over fuzzed files
|
- name: Show Environment
|
||||||
run: |
|
run: |
|
||||||
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/hello_world.v > examples/hello_world_fuzz.v
|
echo "PWD:"
|
||||||
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/hanoi.v > examples/hanoi_fuzz.v
|
pwd
|
||||||
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/fibonacci.v > examples/fibonacci_fuzz.v
|
echo "ENVIRONMENT:"
|
||||||
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/cli.v > examples/cli_fuzz.v
|
env
|
||||||
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/json.v > examples/json_fuzz.v
|
echo "C Compiler:"
|
||||||
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/vmod.v > examples/vmod_fuzz.v
|
gcc --version
|
||||||
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/regex/regex_example.v > examples/regex_example_fuzz.v
|
|
||||||
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/2048/2048.v > examples/2048/2048_fuzz.v
|
|
||||||
./v test-parser -S examples/hello_world_fuzz.v
|
|
||||||
./v test-parser -S examples/hanoi_fuzz.v
|
|
||||||
./v test-parser -S examples/cli_fuzz.v
|
|
||||||
./v test-parser -S examples/regex_example_fuzz.v
|
|
||||||
./v test-parser -S examples/2048/2048_fuzz.v
|
|
||||||
|
|
||||||
v-apps-compile:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
timeout-minutes: 121
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Build V
|
- name: Build V
|
||||||
run: make && sudo ./v symlink
|
run: CC=gcc make
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Test V fixed tests
|
||||||
run: sudo apt-get install --quiet -y libgc-dev
|
run: ./v -silent test-self
|
||||||
|
|
||||||
## vls
|
|
||||||
- name: Clone VLS
|
|
||||||
run: git clone --depth 1 https://github.com/vlang/vls
|
|
||||||
- name: Build VLS
|
|
||||||
run: pushd vls; v cmd/vls ; popd
|
|
||||||
- name: Build VLS with -prod
|
|
||||||
run: pushd vls; v -prod cmd/vls; popd
|
|
||||||
- name: Build VLS with -gc boehm -skip-unused
|
|
||||||
run: pushd vls; v -gc boehm -skip-unused cmd/vls; popd
|
|
||||||
|
|
||||||
## vsl
|
# ubuntu-autofree-selfcompile:
|
||||||
- name: Clone VSL
|
# runs-on: ubuntu-20.04
|
||||||
run: git clone --depth 1 https://github.com/vlang/vsl ~/.vmodules/vsl
|
# timeout-minutes: 121
|
||||||
- name: Install dependencies
|
# env:
|
||||||
run: sudo apt-get install --quiet -y --no-install-recommends gfortran liblapacke-dev libopenblas-dev libgc-dev
|
# VFLAGS: -cc gcc
|
||||||
- name: Execute Tests using Pure V Backend
|
# steps:
|
||||||
run: ~/.vmodules/vsl/bin/test
|
# - uses: actions/checkout@v2
|
||||||
- name: Execute Tests using Pure V Backend with Pure V Math
|
# - name: Build V
|
||||||
run: ~/.vmodules/vsl/bin/test --use-cblas
|
# run: make -j4
|
||||||
- name: Execute Tests using Pure V Backend and Garbage Collection enabled
|
# - name: V self compilation with -autofree
|
||||||
run: ~/.vmodules/vsl/bin/test --use-gc boehm
|
# run: ./v -o v2 -autofree cmd/v && ./v2 -o v3 -autofree cmd/v && ./v3 -o v4 -autofree cmd/v
|
||||||
- name: Execute Tests using Pure V Backend with Pure V Math and Garbage Collection enabled
|
|
||||||
run: ~/.vmodules/vsl/bin/test --use-cblas --use-gc boehm
|
|
||||||
|
|
||||||
## vtl
|
|
||||||
- name: Clone VTL
|
|
||||||
run: git clone --depth 1 https://github.com/vlang/vtl ~/.vmodules/vtl
|
|
||||||
- name: Install dependencies
|
|
||||||
run: sudo apt-get install --quiet -y --no-install-recommends gfortran liblapacke-dev libopenblas-dev libgc-dev
|
|
||||||
- name: Execute Tests using Pure V Backend
|
|
||||||
run: ~/.vmodules/vtl/bin/test
|
|
||||||
- name: Execute Tests using Pure V Backend with Pure V Math
|
|
||||||
run: ~/.vmodules/vtl/bin/test --use-cblas
|
|
||||||
- name: Execute Tests using Pure V Backend and Garbage Collection enabled
|
|
||||||
run: ~/.vmodules/vtl/bin/test --use-gc boehm
|
|
||||||
- name: Execute Tests using Pure V Backend with Pure V Math and Garbage Collection enabled
|
|
||||||
run: ~/.vmodules/vtl/bin/test --use-cblas --use-gc boehm
|
|
||||||
|
|
||||||
## vab
|
# ubuntu-musl:
|
||||||
- name: Clone vab
|
# runs-on: ubuntu-20.04
|
||||||
run: git clone --depth 1 https://github.com/vlang/vab
|
# timeout-minutes: 121
|
||||||
- name: Build vab
|
# env:
|
||||||
run: cd vab; ../v ./vab.v ; cd ..
|
# VFLAGS: -cc musl-gcc
|
||||||
- name: Build vab with -gc boehm -skip-unused
|
# V_CI_MUSL: 1
|
||||||
run: cd vab; ../v -gc boehm -skip-unused ./vab.v ; cd ..
|
# steps:
|
||||||
|
# - uses: actions/checkout@v2
|
||||||
|
# - uses: actions/setup-node@v1
|
||||||
|
# with:
|
||||||
|
# node-version: 12.x
|
||||||
|
# - name: Install dependencies
|
||||||
|
# run: |
|
||||||
|
# sudo apt-get install --quiet -y musl musl-tools libssl-dev sqlite3 libsqlite3-dev valgrind
|
||||||
|
# - name: Build v
|
||||||
|
# run: echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
|
||||||
|
# # - name: Test v binaries
|
||||||
|
# # run: ./v build-vbinaries
|
||||||
|
# ## - name: Test v->js
|
||||||
|
# ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js
|
||||||
|
# - name: quick debug
|
||||||
|
# run: ./v -stats vlib/strconv/format_test.v
|
||||||
|
# - name: Self tests
|
||||||
|
# run: ./v -silent test-self
|
||||||
|
|
||||||
## gitly
|
# Ubuntu docker pre-built container
|
||||||
- name: Install markdown
|
ubuntu-musl:
|
||||||
run: ./v install markdown
|
runs-on: ubuntu-20.04
|
||||||
- name: Build Gitly
|
timeout-minutes: 121
|
||||||
|
container:
|
||||||
|
image: thevlang/vlang:ubuntu-build
|
||||||
|
env:
|
||||||
|
V_CI_MUSL: 1
|
||||||
|
V_CI_UBUNTU_MUSL: 1
|
||||||
|
VFLAGS: -cc musl-gcc
|
||||||
|
volumes:
|
||||||
|
- ${{github.workspace}}:/opt/vlang
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build V
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 https://github.com/vlang/gitly
|
echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
|
||||||
cd gitly
|
- name: Verify `v test` works
|
||||||
../v .
|
run: |
|
||||||
# ./gitly -ci_run
|
echo $VFLAGS
|
||||||
../v -autofree .
|
./v cmd/tools/test_if_v_test_system_works.v
|
||||||
../v -o x tests/first_run.v
|
./cmd/tools/test_if_v_test_system_works
|
||||||
./x
|
- name: Test V fixed tests
|
||||||
cd ..
|
run: |
|
||||||
|
./v -silent test-self
|
||||||
## vex
|
|
||||||
- name: Install Vex dependencies
|
|
||||||
run: sudo apt-get install --quiet -y libssl-dev sqlite3 libsqlite3-dev
|
|
||||||
- name: Install Vex
|
|
||||||
run: mkdir -p ~/.vmodules/nedpals; git clone https://github.com/nedpals/vex ~/.vmodules/nedpals/vex
|
|
||||||
- name: Compile the simple Vex example
|
|
||||||
run: ./v ~/.vmodules/nedpals/vex/examples/simple_example.v
|
|
||||||
- name: Compile the simple Vex example with -gc boehm -skip-unused
|
|
||||||
run: ./v -gc boehm -skip-unused ~/.vmodules/nedpals/vex/examples/simple_example.v
|
|
||||||
- name: Run Vex Tests
|
|
||||||
run: ./v test ~/.vmodules/nedpals/vex
|
|
||||||
|
|
||||||
## vpm modules
|
|
||||||
- name: Install UI through VPM
|
|
||||||
run: ./v install ui
|
|
||||||
|
|
||||||
## libsodium
|
|
||||||
- name: Install libsodium-dev package
|
|
||||||
run: sudo apt-get install --quiet -y libsodium-dev
|
|
||||||
- name: Installl the libsodium wrapper through VPM
|
|
||||||
run: ./v install libsodium
|
|
||||||
- name: Test libsodium
|
|
||||||
run: ./v test ~/.vmodules/libsodium
|
|
||||||
|
|
|
@ -0,0 +1,248 @@
|
||||||
|
name: Other CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: build-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
no-gpl-by-accident:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
timeout-minutes: 15
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: No GPL licensed code, should be added accidentally
|
||||||
|
run: |
|
||||||
|
! grep -r --exclude="*.yml" "a GPL license" .
|
||||||
|
|
||||||
|
code-formatting:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
timeout-minutes: 15
|
||||||
|
env:
|
||||||
|
VFLAGS: -cc gcc
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Environment info
|
||||||
|
run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF
|
||||||
|
- name: Build local v
|
||||||
|
run: make -j4
|
||||||
|
- name: v test-cleancode
|
||||||
|
run: ./v -silent test-cleancode
|
||||||
|
- name: v test-fmt
|
||||||
|
run: ./v -silent test-fmt
|
||||||
|
|
||||||
|
performance-regressions:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
timeout-minutes: 15
|
||||||
|
env:
|
||||||
|
VFLAGS: -cc gcc
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Environment info
|
||||||
|
run: echo $VFLAGS $GITHUB_SHA $GITHUB_REF
|
||||||
|
- name: Build local v
|
||||||
|
run: make -j4
|
||||||
|
- name: Clone & Build previous vmaster/v
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 https://github.com/vlang/v vmaster/
|
||||||
|
(cd vmaster; make -j4)
|
||||||
|
- name: V versions
|
||||||
|
run: ./v version && ./vmaster/v version
|
||||||
|
- name: Build the repeat tool
|
||||||
|
run: ./v cmd/tools/repeat.v
|
||||||
|
- name: Repeat -o hw.c examples/hello_world.v
|
||||||
|
run: cmd/tools/repeat --max_time 251 --series 3 --count 20 --nmins 2 --nmaxs 5 --warmup 3 --fail_percent 10 -t 'cd {T} ; ./v -show-timings -o hw.c examples/hello_world.v' . ./vmaster
|
||||||
|
- name: Repeat -o v.c cmd/v
|
||||||
|
run: cmd/tools/repeat --max_time 1501 --series 3 --count 20 --nmins 2 --nmaxs 5 --warmup 3 --fail_percent 10 -t 'cd {T} ; ./v -show-timings -o v.c cmd/v' . ./vmaster
|
||||||
|
|
||||||
|
misc-tooling:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
timeout-minutes: 121
|
||||||
|
env:
|
||||||
|
VFLAGS: -cc tcc -no-retry-compilation
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 10
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install --quiet -y libssl-dev sqlite3 libsqlite3-dev valgrind
|
||||||
|
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
||||||
|
sudo apt-get install --quiet -y xfonts-75dpi xfonts-base
|
||||||
|
- name: Build v
|
||||||
|
run: make
|
||||||
|
|
||||||
|
- name: Ensure V can be compiled with -autofree
|
||||||
|
run: ./v -autofree -o v2 cmd/v ## NB: this does not mean it runs, but at least keeps it from regressing
|
||||||
|
|
||||||
|
- name: Shader examples can be build
|
||||||
|
run: |
|
||||||
|
wget https://github.com/floooh/sokol-tools-bin/raw/33d2e4cc26088c6c28eaef5467990f8940d15aab/bin/linux/sokol-shdc
|
||||||
|
chmod +x ./sokol-shdc
|
||||||
|
for f in examples/sokol/02_cubes_glsl/cube_glsl \
|
||||||
|
examples/sokol/03_march_tracing_glsl/rt_glsl \
|
||||||
|
examples/sokol/04_multi_shader_glsl/rt_glsl_puppy \
|
||||||
|
examples/sokol/04_multi_shader_glsl/rt_glsl_march \
|
||||||
|
examples/sokol/05_instancing_glsl/rt_glsl_instancing \
|
||||||
|
examples/sokol/06_obj_viewer/gouraud \
|
||||||
|
; do \
|
||||||
|
echo "compiling shader $f.glsl ..."; \
|
||||||
|
./sokol-shdc --input $f.glsl --output $f.h --slang glsl330 ; \
|
||||||
|
done
|
||||||
|
for vfile in examples/sokol/0?*/*.v; do echo "compiling $vfile ..."; ./v $vfile ; done
|
||||||
|
|
||||||
|
- name: Install C++ dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev
|
||||||
|
sudo apt-get install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev
|
||||||
|
sudo apt-get install --quiet -y valgrind g++-9
|
||||||
|
- name: Build V
|
||||||
|
run: make -j4
|
||||||
|
- name: g++ version
|
||||||
|
run: g++-9 --version
|
||||||
|
- name: V self compilation with g++
|
||||||
|
run: ./v -cc g++-9 -no-std -cflags -std=c++11 -o v2 cmd/v && ./v2 -cc g++-9 -no-std -cflags -std=c++11 -o v3 cmd/v
|
||||||
|
## - name: Running tests with g++
|
||||||
|
## run: ./v -cc g++-9 -silent test-self
|
||||||
|
|
||||||
|
|
||||||
|
parser-silent:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
timeout-minutes: 121
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install zzuf
|
||||||
|
run: sudo apt install -qq zzuf
|
||||||
|
- name: Build local v
|
||||||
|
run: |
|
||||||
|
make -j4
|
||||||
|
./v -g cmd/tools/vtest-parser.v
|
||||||
|
- name: Run test-parser
|
||||||
|
run: |
|
||||||
|
./v test-parser -S examples/hello_world.v
|
||||||
|
./v test-parser -S examples/hanoi.v
|
||||||
|
./v test-parser -S examples/fibonacci.v
|
||||||
|
./v test-parser -S examples/cli.v
|
||||||
|
./v test-parser -S examples/json.v
|
||||||
|
./v test-parser -S examples/vmod.v
|
||||||
|
./v test-parser -S examples/regex/regex_example.v
|
||||||
|
./v test-parser -S examples/2048/2048.v
|
||||||
|
|
||||||
|
- name: Run test-parser over fuzzed files
|
||||||
|
run: |
|
||||||
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/hello_world.v > examples/hello_world_fuzz.v
|
||||||
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/hanoi.v > examples/hanoi_fuzz.v
|
||||||
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/fibonacci.v > examples/fibonacci_fuzz.v
|
||||||
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/cli.v > examples/cli_fuzz.v
|
||||||
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/json.v > examples/json_fuzz.v
|
||||||
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/vmod.v > examples/vmod_fuzz.v
|
||||||
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/regex/regex_example.v > examples/regex_example_fuzz.v
|
||||||
|
zzuf -R '\x00-\x20\x7f-\xff' -r0.01 < examples/2048/2048.v > examples/2048/2048_fuzz.v
|
||||||
|
./v test-parser -S examples/hello_world_fuzz.v
|
||||||
|
./v test-parser -S examples/hanoi_fuzz.v
|
||||||
|
./v test-parser -S examples/cli_fuzz.v
|
||||||
|
./v test-parser -S examples/regex_example_fuzz.v
|
||||||
|
./v test-parser -S examples/2048/2048_fuzz.v
|
||||||
|
|
||||||
|
v-apps-compile:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
timeout-minutes: 121
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build V
|
||||||
|
run: make && sudo ./v symlink
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt-get install --quiet -y libgc-dev
|
||||||
|
|
||||||
|
## vls
|
||||||
|
- name: Clone VLS
|
||||||
|
run: git clone --depth 1 https://github.com/vlang/vls
|
||||||
|
- name: Build VLS
|
||||||
|
run: pushd vls; v cmd/vls ; popd
|
||||||
|
- name: Build VLS with -prod
|
||||||
|
run: pushd vls; v -prod cmd/vls; popd
|
||||||
|
- name: Build VLS with -gc boehm -skip-unused
|
||||||
|
run: pushd vls; v -gc boehm -skip-unused cmd/vls; popd
|
||||||
|
|
||||||
|
## vsl
|
||||||
|
- name: Clone VSL
|
||||||
|
run: git clone --depth 1 https://github.com/vlang/vsl ~/.vmodules/vsl
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt-get install --quiet -y --no-install-recommends gfortran liblapacke-dev libopenblas-dev libgc-dev
|
||||||
|
- name: Execute Tests using Pure V Backend
|
||||||
|
run: ~/.vmodules/vsl/bin/test
|
||||||
|
- name: Execute Tests using Pure V Backend with Pure V Math
|
||||||
|
run: ~/.vmodules/vsl/bin/test --use-cblas
|
||||||
|
- name: Execute Tests using Pure V Backend and Garbage Collection enabled
|
||||||
|
run: ~/.vmodules/vsl/bin/test --use-gc boehm
|
||||||
|
- name: Execute Tests using Pure V Backend with Pure V Math and Garbage Collection enabled
|
||||||
|
run: ~/.vmodules/vsl/bin/test --use-cblas --use-gc boehm
|
||||||
|
|
||||||
|
## vtl
|
||||||
|
- name: Clone VTL
|
||||||
|
run: git clone --depth 1 https://github.com/vlang/vtl ~/.vmodules/vtl
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt-get install --quiet -y --no-install-recommends gfortran liblapacke-dev libopenblas-dev libgc-dev
|
||||||
|
- name: Execute Tests using Pure V Backend
|
||||||
|
run: ~/.vmodules/vtl/bin/test
|
||||||
|
- name: Execute Tests using Pure V Backend with Pure V Math
|
||||||
|
run: ~/.vmodules/vtl/bin/test --use-cblas
|
||||||
|
- name: Execute Tests using Pure V Backend and Garbage Collection enabled
|
||||||
|
run: ~/.vmodules/vtl/bin/test --use-gc boehm
|
||||||
|
- name: Execute Tests using Pure V Backend with Pure V Math and Garbage Collection enabled
|
||||||
|
run: ~/.vmodules/vtl/bin/test --use-cblas --use-gc boehm
|
||||||
|
|
||||||
|
## vab
|
||||||
|
- name: Clone vab
|
||||||
|
run: git clone --depth 1 https://github.com/vlang/vab
|
||||||
|
- name: Build vab
|
||||||
|
run: cd vab; ../v ./vab.v ; cd ..
|
||||||
|
- name: Build vab with -gc boehm -skip-unused
|
||||||
|
run: cd vab; ../v -gc boehm -skip-unused ./vab.v ; cd ..
|
||||||
|
|
||||||
|
## gitly
|
||||||
|
- name: Install markdown
|
||||||
|
run: ./v install markdown
|
||||||
|
- name: Build Gitly
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 https://github.com/vlang/gitly
|
||||||
|
cd gitly
|
||||||
|
../v .
|
||||||
|
# ./gitly -ci_run
|
||||||
|
../v -autofree .
|
||||||
|
../v -o x tests/first_run.v
|
||||||
|
./x
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
## vex
|
||||||
|
- name: Install Vex dependencies
|
||||||
|
run: sudo apt-get install --quiet -y libssl-dev sqlite3 libsqlite3-dev
|
||||||
|
- name: Install Vex
|
||||||
|
run: mkdir -p ~/.vmodules/nedpals; git clone https://github.com/nedpals/vex ~/.vmodules/nedpals/vex
|
||||||
|
- name: Compile the simple Vex example
|
||||||
|
run: ./v ~/.vmodules/nedpals/vex/examples/simple_example.v
|
||||||
|
- name: Compile the simple Vex example with -gc boehm -skip-unused
|
||||||
|
run: ./v -gc boehm -skip-unused ~/.vmodules/nedpals/vex/examples/simple_example.v
|
||||||
|
- name: Run Vex Tests
|
||||||
|
run: ./v test ~/.vmodules/nedpals/vex
|
||||||
|
|
||||||
|
## vpm modules
|
||||||
|
- name: Install UI through VPM
|
||||||
|
run: ./v install ui
|
||||||
|
|
||||||
|
## libsodium
|
||||||
|
- name: Install libsodium-dev package
|
||||||
|
run: sudo apt-get install --quiet -y libsodium-dev
|
||||||
|
- name: Installl the libsodium wrapper through VPM
|
||||||
|
run: ./v install libsodium
|
||||||
|
- name: Test libsodium
|
||||||
|
run: ./v test ~/.vmodules/libsodium
|
|
@ -0,0 +1,100 @@
|
||||||
|
name: Path Testing CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: build-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
space-paths-linux:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
timeout-minutes: 30
|
||||||
|
env:
|
||||||
|
MY_V_PATH: '你好 my $path, @с интервали'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: ${{env.MY_V_PATH}}
|
||||||
|
- name: Build V
|
||||||
|
run: |
|
||||||
|
echo '${{env.MY_V_PATH}}'
|
||||||
|
ls -la
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
ls -la
|
||||||
|
make
|
||||||
|
- name: v doctor
|
||||||
|
run: |
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
./v doctor
|
||||||
|
- name: v tests
|
||||||
|
run: |
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
./v test vlib/builtin vlib/os
|
||||||
|
|
||||||
|
space-paths-macos:
|
||||||
|
runs-on: macOS-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
env:
|
||||||
|
MY_V_PATH: '你好 my $path, @с интервали'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: ${{env.MY_V_PATH}}
|
||||||
|
- name: Build V
|
||||||
|
run: |
|
||||||
|
echo '${{env.MY_V_PATH}}'
|
||||||
|
ls -la
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
ls -la
|
||||||
|
make
|
||||||
|
- name: v doctor
|
||||||
|
run: |
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
./v doctor
|
||||||
|
- name: v tests
|
||||||
|
run: |
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
./v test vlib/builtin vlib/os
|
||||||
|
|
||||||
|
space-paths-windows:
|
||||||
|
runs-on: windows-2022
|
||||||
|
timeout-minutes: 30
|
||||||
|
env:
|
||||||
|
MY_V_PATH: 'path with some $punctuation, and some spaces'
|
||||||
|
|
||||||
|
## NB: the following paths do not work for now:
|
||||||
|
##### MY_V_PATH: '你好 my $path, @с интервали'
|
||||||
|
##### MY_V_PATH: 'path with some $punctuation, and some spaces '
|
||||||
|
## tcc has a problem interpreting paths with non latin letters in them,
|
||||||
|
## by default, but that can be solved with passing -Bthirdparty/tcc
|
||||||
|
## but after that V fails self building with:
|
||||||
|
####### builder error: cannot write to folder D:\a\v\v\你好 my $path, @с интервали: No such file or directory
|
||||||
|
## and that happens even for gcc builds, not just tcc ones
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: ${{env.MY_V_PATH}}
|
||||||
|
- name: Build V
|
||||||
|
run: |
|
||||||
|
echo '${{env.MY_V_PATH}}'
|
||||||
|
dir
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
dir
|
||||||
|
.\make.bat -tcc
|
||||||
|
- name: v doctor
|
||||||
|
run: |
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
./v doctor
|
||||||
|
- name: v tests
|
||||||
|
run: |
|
||||||
|
cd '${{env.MY_V_PATH}}'
|
||||||
|
./v test vlib/builtin vlib/os
|
42
make.bat
42
make.bat
|
@ -12,8 +12,8 @@ set target=build
|
||||||
|
|
||||||
REM TCC variables
|
REM TCC variables
|
||||||
set "tcc_url=https://github.com/vlang/tccbin"
|
set "tcc_url=https://github.com/vlang/tccbin"
|
||||||
set "tcc_dir=%~dp0thirdparty\tcc"
|
set "tcc_dir=thirdparty\tcc"
|
||||||
set "tcc_exe=%~dp0thirdparty\tcc\tcc.exe"
|
set "tcc_exe=thirdparty\tcc\tcc.exe"
|
||||||
if "%PROCESSOR_ARCHITECTURE%" == "x86" ( set "tcc_branch=thirdparty-windows-i386" ) else ( set "tcc_branch=thirdparty-windows-amd64" )
|
if "%PROCESSOR_ARCHITECTURE%" == "x86" ( set "tcc_branch=thirdparty-windows-i386" ) else ( set "tcc_branch=thirdparty-windows-amd64" )
|
||||||
if "%~1" == "-tcc32" set "tcc_branch=thirdparty-windows-i386"
|
if "%~1" == "-tcc32" set "tcc_branch=thirdparty-windows-i386"
|
||||||
|
|
||||||
|
@ -117,17 +117,16 @@ if not [!compiler!] == [] goto :!compiler!_strap
|
||||||
REM By default, use tcc, since we have it prebuilt:
|
REM By default, use tcc, since we have it prebuilt:
|
||||||
:tcc_strap
|
:tcc_strap
|
||||||
:tcc32_strap
|
:tcc32_strap
|
||||||
echo ^> Attempting to build v_win.c with TCC
|
echo ^> Attempting to build v_win.c with "!tcc_exe!"
|
||||||
"!tcc_exe!" -Ithirdparty/stdatomic/win -bt10 -g -w -o v.exe vc\v_win.c -ladvapi32
|
"!tcc_exe!" -Bthirdparty/tcc -Ithirdparty/stdatomic/win -bt10 -g -w -o v.exe vc\v_win.c -ladvapi32
|
||||||
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
||||||
|
echo ^> Compiling .\v.exe with itself
|
||||||
echo ^> Compiling with .\v.exe self
|
v.exe -keepc -g -showcc -cc "!tcc_exe!" -cflags -Bthirdparty/tcc -o v2.exe cmd/v
|
||||||
v.exe -keepc -g -showcc -cc "!tcc_exe!" self
|
|
||||||
if %ERRORLEVEL% NEQ 0 goto :clang_strap
|
if %ERRORLEVEL% NEQ 0 goto :clang_strap
|
||||||
|
del v.exe
|
||||||
|
move v2.exe v.exe
|
||||||
goto :success
|
goto :success
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:clang_strap
|
:clang_strap
|
||||||
where /q clang
|
where /q clang
|
||||||
if %ERRORLEVEL% NEQ 0 (
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
@ -144,9 +143,11 @@ if %ERRORLEVEL% NEQ 0 (
|
||||||
goto :compile_error
|
goto :compile_error
|
||||||
)
|
)
|
||||||
|
|
||||||
echo ^> Compiling with .\v.exe self
|
echo ^> Compiling .\v.exe with itself
|
||||||
v.exe -keepc -g -showcc -cc clang self
|
v.exe -keepc -g -showcc -cc clang -o v2.exe cmd/v
|
||||||
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
||||||
|
del v.exe
|
||||||
|
move v2.exe v.exe
|
||||||
goto :success
|
goto :success
|
||||||
|
|
||||||
:gcc_strap
|
:gcc_strap
|
||||||
|
@ -165,9 +166,11 @@ if %ERRORLEVEL% NEQ 0 (
|
||||||
goto :compile_error
|
goto :compile_error
|
||||||
)
|
)
|
||||||
|
|
||||||
echo ^> Compiling with .\v.exe self
|
echo ^> Compiling .\v.exe with itself
|
||||||
v.exe -keepc -g -showcc -cc gcc self
|
v.exe -keepc -g -showcc -cc gcc -o v2.exe cmd/v
|
||||||
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
||||||
|
del v.exe
|
||||||
|
move v2.exe v.exe
|
||||||
goto :success
|
goto :success
|
||||||
|
|
||||||
:msvc_strap
|
:msvc_strap
|
||||||
|
@ -205,10 +208,12 @@ if %ERRORLEVEL% NEQ 0 (
|
||||||
goto :compile_error
|
goto :compile_error
|
||||||
)
|
)
|
||||||
|
|
||||||
echo ^> Compiling with .\v.exe self
|
echo ^> Compiling .\v.exe with itself
|
||||||
v.exe -keepc -g -showcc -cc msvc self
|
v.exe -keepc -g -showcc -cc msvc -o v2.exe cmd/v
|
||||||
del %ObjFile%
|
del %ObjFile%
|
||||||
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
||||||
|
del v.exe
|
||||||
|
move v2.exe v.exe
|
||||||
goto :success
|
goto :success
|
||||||
|
|
||||||
:download_tcc
|
:download_tcc
|
||||||
|
@ -219,11 +224,6 @@ pushd %tcc_dir% && (
|
||||||
popd
|
popd
|
||||||
) || call :bootstrap_tcc
|
) || call :bootstrap_tcc
|
||||||
|
|
||||||
for /f "usebackq delims=" %%i in (`dir "%tcc_dir%" /b /a /s tcc.exe`) do (
|
|
||||||
set "attrib=%%~ai"
|
|
||||||
set "dattrib=%attrib:~0,1%"
|
|
||||||
if /I not "%dattrib%" == "d" set "tcc_exe=%%~sfi"
|
|
||||||
)
|
|
||||||
if [!tcc_exe!] == [] echo ^> TCC not found, even after cloning& goto :error
|
if [!tcc_exe!] == [] echo ^> TCC not found, even after cloning& goto :error
|
||||||
echo.
|
echo.
|
||||||
exit /b 0
|
exit /b 0
|
||||||
|
@ -318,7 +318,7 @@ exit /b 0
|
||||||
:cloning_vc
|
:cloning_vc
|
||||||
echo Cloning vc...
|
echo Cloning vc...
|
||||||
echo ^> Cloning from remote !vc_url!
|
echo ^> Cloning from remote !vc_url!
|
||||||
git clone --depth 1 --quiet %vc_url%
|
git clone --depth 1 --quiet "%vc_url%"
|
||||||
exit /b 0
|
exit /b 0
|
||||||
|
|
||||||
:eof
|
:eof
|
||||||
|
|
|
@ -505,10 +505,7 @@ pub fn is_writable_folder(folder string) ?bool {
|
||||||
}
|
}
|
||||||
tmp_folder_name := 'tmp_perm_check_pid_' + getpid().str()
|
tmp_folder_name := 'tmp_perm_check_pid_' + getpid().str()
|
||||||
tmp_perm_check := join_path_single(folder, tmp_folder_name)
|
tmp_perm_check := join_path_single(folder, tmp_folder_name)
|
||||||
mut f := open_file(tmp_perm_check, 'w+', 0o700) or {
|
write_file(tmp_perm_check, 'test') or { return error('cannot write to folder "$folder": $err') }
|
||||||
return error('cannot write to folder $folder: $err')
|
|
||||||
}
|
|
||||||
f.close()
|
|
||||||
rm(tmp_perm_check) ?
|
rm(tmp_perm_check) ?
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue