2022-05-13 10:01:59 +02:00
|
|
|
name: V Apps and Modules
|
|
|
|
|
|
|
|
on:
|
2022-05-15 08:06:01 +02:00
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2022-05-13 10:01:59 +02:00
|
|
|
|
|
|
|
concurrency:
|
2022-05-21 00:16:29 +02:00
|
|
|
group: build-v-apps-and-modules-${{ github.event.pull_request.number || github.sha }}
|
2022-05-13 10:01:59 +02:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
v-apps-compile:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-05-22 19:19:04 +02:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2022-05-13 10:01:59 +02:00
|
|
|
timeout-minutes: 121
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build V
|
|
|
|
run: make && sudo ./v symlink
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install --quiet -y libgc-dev
|
|
|
|
sudo apt-get install --quiet -y libsodium-dev 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: Install UI through VPM
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
echo "Official VPM modules should be installable"
|
|
|
|
./v install ui
|
|
|
|
|
|
|
|
- name: Build V Language Server (VLS)
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
echo "Clone VLS"
|
|
|
|
git clone --depth 1 https://github.com/vlang/vls
|
|
|
|
echo "Build VLS"
|
|
|
|
pushd vls; v cmd/vls ; popd
|
|
|
|
echo "Build VLS with -prod"
|
|
|
|
pushd vls; v -prod cmd/vls; popd
|
|
|
|
echo "Build VLS with -gc boehm -skip-unused"
|
|
|
|
pushd vls; v -gc boehm -skip-unused cmd/vls; popd
|
|
|
|
|
|
|
|
- name: Build VSL
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
git clone --depth 1 https://github.com/vlang/vsl ~/.vmodules/vsl
|
|
|
|
sudo apt-get install --quiet -y --no-install-recommends gfortran liblapacke-dev libopenblas-dev libgc-dev
|
|
|
|
echo "Execute Tests using Pure V Backend"
|
|
|
|
~/.vmodules/vsl/bin/test
|
|
|
|
echo "Execute Tests using Pure V Backend with Pure V Math"
|
|
|
|
~/.vmodules/vsl/bin/test --use-cblas
|
|
|
|
echo "Execute Tests using Pure V Backend and Garbage Collection enabled"
|
|
|
|
~/.vmodules/vsl/bin/test --use-gc boehm
|
|
|
|
echo "Execute Tests using Pure V Backend with Pure V Math and Garbage Collection enabled"
|
|
|
|
~/.vmodules/vsl/bin/test --use-cblas --use-gc boehm
|
|
|
|
|
|
|
|
- name: Build VTL
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
echo "Clone VTL"
|
|
|
|
git clone --depth 1 https://github.com/vlang/vtl ~/.vmodules/vtl
|
|
|
|
echo "Install dependencies"
|
|
|
|
sudo apt-get install --quiet -y --no-install-recommends gfortran liblapacke-dev libopenblas-dev libgc-dev
|
|
|
|
echo "Execute Tests using Pure V Backend"
|
|
|
|
~/.vmodules/vtl/bin/test
|
|
|
|
echo "Execute Tests using Pure V Backend with Pure V Math"
|
|
|
|
~/.vmodules/vtl/bin/test --use-cblas
|
|
|
|
echo "Execute Tests using Pure V Backend and Garbage Collection enabled"
|
|
|
|
~/.vmodules/vtl/bin/test --use-gc boehm
|
|
|
|
echo "Execute Tests using Pure V Backend with Pure V Math and Garbage Collection enabled"
|
|
|
|
~/.vmodules/vtl/bin/test --use-cblas --use-gc boehm
|
|
|
|
|
|
|
|
- name: Build VAB
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
echo "Clone vab"
|
|
|
|
git clone --depth 1 https://github.com/vlang/vab
|
|
|
|
echo "Build vab"
|
|
|
|
cd vab; ../v ./vab.v ; cd ..
|
|
|
|
echo "Build vab with -gc boehm -skip-unused"
|
|
|
|
cd vab; ../v -gc boehm -skip-unused ./vab.v ; cd ..
|
|
|
|
|
|
|
|
- name: Build Gitly
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
echo "Clone markdown"
|
|
|
|
git clone https://github.com/vlang/markdown ~/.vmodules/markdown
|
|
|
|
echo "Clone Gitly"
|
|
|
|
git clone --depth 1 https://github.com/vlang/gitly
|
|
|
|
cd gitly
|
|
|
|
echo "Build Gitly"
|
|
|
|
../v .
|
|
|
|
echo "Build Gitly with -autofree"
|
|
|
|
../v -autofree .
|
|
|
|
echo "Run first_run.v"
|
|
|
|
../v run tests/first_run.v
|
|
|
|
# ./gitly -ci_run
|
|
|
|
|
|
|
|
- name: Build libsodium
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
echo "Install libsodium-dev package"
|
|
|
|
sudo apt-get install --quiet -y libsodium-dev
|
|
|
|
echo "Clone the libsodium wrapper"
|
|
|
|
git clone https://github.com/vlang/libsodium ~/.vmodules/libsodium
|
|
|
|
echo "Test libsodium"
|
|
|
|
VJOBS=1 ./v -stats test ~/.vmodules/libsodium
|
|
|
|
|
|
|
|
- name: Build VEX
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
echo "Install Vex dependencies"
|
|
|
|
sudo apt-get install --quiet -y libsodium-dev libssl-dev sqlite3 libsqlite3-dev
|
|
|
|
echo "Clone Vex"
|
|
|
|
mkdir -p ~/.vmodules/nedpals; git clone https://github.com/nedpals/vex ~/.vmodules/nedpals/vex
|
|
|
|
echo "Compile all of the Vex examples"
|
|
|
|
./v should-compile-all ~/.vmodules/nedpals/vex/examples
|
|
|
|
echo "Compile the simple Vex example with -gc boehm -skip-unused"
|
|
|
|
./v -gc boehm -skip-unused ~/.vmodules/nedpals/vex/examples/simple_example.v
|
|
|
|
echo "Run Vex Tests"
|
|
|
|
./v test ~/.vmodules/nedpals/vex
|
|
|
|
|
|
|
|
- name: Build go2v
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
echo "Clone go2v"
|
|
|
|
clone --depth=1 https://github.com/vlang/go2v go2v/
|
|
|
|
echo "Build go2v"
|
|
|
|
./v go2v/
|
|
|
|
## echo "Run tests for go2v"
|
|
|
|
## VJOBS=1 ./v -stats test go2v/
|
|
|
|
|
|
|
|
- name: Build vlang/pdf
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
git clone --depth=1 https://github.com/vlang/pdf ~/.vmodules/pdf/
|
|
|
|
echo "PDF examples should compile"
|
|
|
|
./v should-compile-all ~/.vmodules/pdf/examples
|