Skip to content

Commit

Permalink
ci: extend coverage, move app test from macos_ci to v_apps_and_module…
Browse files Browse the repository at this point in the history
…s_ci (#21584)
  • Loading branch information
ttytm authored May 27, 2024
1 parent 6b2d527 commit 31cde9d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 35 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/macos_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
timeout-minutes: 121
env:
VFLAGS: -cc clang
PKG_CONFIG_PATH: /usr/local/opt/pkgconfig:/usr/local/opt/libpq/lib/pkgconfig:/usr/local/opt/openssl@3/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:/opt/homebrew/opt/libpq/lib/pkgconfig:/opt/homebrew/opt/openssl@3/lib/pkgconfig
steps:
- uses: actions/checkout@v4
- name: Build V
Expand All @@ -39,12 +38,6 @@ jobs:
run: v -cg -cstrict -o v cmd/v
- name: All code is formatted
run: VJOBS=1 v test-cleancode
- name: Install dependencies
run: |
echo "PKG_CONFIG_PATH is '$PKG_CONFIG_PATH'"
v retry -- brew install libpq openssl mercurial
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
echo "LIBRARY_PATH is '$LIBRARY_PATH'"
- name: Run sanitizers
run: |
v -o v2 cmd/v -cflags -fsanitize=undefined
Expand Down Expand Up @@ -86,22 +79,6 @@ jobs:
- name: v doctor
run: |
v doctor
- name: Test ved
run: |
v retry -- git clone --depth 1 https://github.com/vlang/ved
cd ved && ../v -o ved .
../v -autofree .
../v -prod .
cd ..
- name: Build V UI examples
run: |
v retry -- git clone --depth 1 https://github.com/vlang/ui
cd ui
mkdir -p ~/.vmodules
ln -s $(pwd) ~/.vmodules/ui
../v -no-parallel examples/rectangles.v
../v -no-parallel examples/users.v
## ../v run examples/build_examples.vsh
- name: V self compilation with -usecache
run: |
unset VFLAGS
Expand Down
60 changes: 48 additions & 12 deletions .github/workflows/v_apps_and_modules_compile_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ concurrency:

jobs:
common:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-12, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 121
steps:
- uses: actions/checkout@v4
Expand All @@ -29,12 +33,17 @@ jobs:

- name: Install dependencies
run: |
v retry -- sudo apt update
v retry -- sudo apt install --quiet -y libgc-dev libsodium-dev libssl-dev sqlite3 libsqlite3-dev
v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev xfonts-75dpi xfonts-base
v retry -- sudo apt install --quiet -y --no-install-recommends sassc libgit2-dev ## needed by gitly
if [ $RUNNER_OS == 'Linux' ]; then
v retry -- sudo apt -qq update
v retry -- sudo apt -qq install libgc-dev libsodium-dev libssl-dev sqlite3 libsqlite3-dev
v retry -- sudo apt -qq install libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libasound2-dev xfonts-75dpi xfonts-base
v retry -- sudo apt -qq install sassc libgit2-dev # needed by gitly
else
v retry brew install sassc libgit2
fi
- name: Test vtcc
if: runner.os == 'Linux'
run: .github/workflows/compile_v_with_vtcc.sh

- name: Test vsql compilation and examples
Expand Down Expand Up @@ -123,6 +132,14 @@ jobs:
# v -cc gcc run /tmp/gitly/tests/first_run.v
# # /tmp/gitly/gitly -ci_run
- name: Build V UI examples
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: |
v retry -- v install ui
v -no-parallel ~/.vmodules/ui/examples/rectangles.v
v -no-parallel ~/.vmodules/ui/examples/users.v
# v run ~/.vmodules/ui/examples/build_examples.vsh
- name: Build vlang/v-analyzer
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: |
Expand Down Expand Up @@ -150,7 +167,7 @@ jobs:
fi
- name: Build vlang/go2v
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
if: ${{ !cancelled() && steps.build.outcome == 'success' && matrix.os != 'macos-14' }}
run: |
echo "Clone Go2V"
v retry -- git clone --depth=1 https://github.com/vlang/go2v /tmp/go2v/
Expand Down Expand Up @@ -202,7 +219,11 @@ jobs:
# v test ~/.vmodules/nedpals/vex

vsl:
runs-on: ubuntu-20.04
strategy:
matrix:
os: [ubuntu-20.04, macos-12, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 121
env:
VFLAGS: -no-parallel
Expand All @@ -213,10 +234,14 @@ jobs:
run: make && sudo ./v symlink
- name: Install dependencies
run: |
if [ $RUNNER_OS == 'Linux' ]; then
v retry -- sudo apt -qq update
v retry -- sudo apt -qq install \
libgc-dev libgl1-mesa-dev mesa-common-dev liblapacke-dev libopenblas-dev libopenmpi-dev \
opencl-headers libxcursor-dev libxi-dev libhdf5-cpp-103 libhdf5-dev libhdf5-mpi-dev hdf5-tools
else
v retry brew install coreutils hdf5 open-mpi openblas lapack opencl-headers
fi
- name: Install vsl
run: v retry -- v install vsl
- name: Test with Pure V Backend
Expand All @@ -225,20 +250,31 @@ jobs:
run: ~/.vmodules/vsl/bin/test --use-cblas

vtl:
runs-on: ubuntu-20.04
strategy:
matrix:
os: [ubuntu-20.04, macos-12, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 121
env:
VFLAGS: -no-parallel
# Fixes complaints about $TERM not being set when running the vtl test script
# (a warning on Linux, but an error on macOS).
TERM: xterm
steps:
- uses: actions/checkout@v4
- name: Build V
id: build
run: make && sudo ./v symlink
- name: Install dependencies
run: |
v retry -- sudo apt -qq update
v retry -- sudo apt -qq install \
libgc-dev libgl1-mesa-dev mesa-common-dev liblapacke-dev libopenblas-dev libopenmpi-dev
if [ $RUNNER_OS == 'Linux' ]; then
v retry -- sudo apt -qq update
v retry -- sudo apt -qq install \
libgc-dev libgl1-mesa-dev mesa-common-dev liblapacke-dev libopenblas-dev libopenmpi-dev
else
v retry brew install coreutils hdf5 open-mpi openblas lapack opencl-headers
fi
v retry v install vsl
- name: Install vtl
run: v retry v install vtl
Expand All @@ -250,7 +286,7 @@ jobs:
vpm-site:
strategy:
matrix:
os: [ubuntu-20.04, macos-12]
os: [ubuntu-20.04, macos-12, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/vpm_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
cc: msvc
- os: macos-12
cc: clang
- os: macos-14
cc: clang
fail-fast: false
runs-on: ${{ matrix.os }}
env:
Expand Down

0 comments on commit 31cde9d

Please sign in to comment.