v / .github / workflows / vsl_and_vtl_compile_ci.yml
131 lines · 127 sloc · 4.34 KB · 26ce9130ab566542a5f011c907473197e5db9efe
Raw
1name: VSL and VTL
2
3on:
4 push:
5 branches:
6 - master
7 paths-ignore:
8 - '**.md'
9 - '**.yml'
10 - '!**/vsl_and_vtl_compile_ci.yml'
11 - 'examples/**'
12 - 'cmd/tools/vrepl.v'
13 pull_request:
14 paths-ignore:
15 - '**.md'
16 - '**.yml'
17 - '!**/vsl_and_vtl_compile_ci.yml'
18 - 'examples/**'
19 - 'cmd/tools/vrepl.v'
20
21concurrency:
22 group: vsl-vtl-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
23 cancel-in-progress: true
24
25jobs:
26 vsl-compiles:
27 strategy:
28 matrix:
29 os: [ubuntu-24.04, macos-14]
30 fail-fast: false
31 runs-on: ${{ matrix.os }}
32 timeout-minutes: 30
33 env:
34 VFLAGS: -no-parallel
35 steps:
36 - uses: actions/checkout@v6
37 - name: Cache apt packages
38 if: runner.os == 'Linux'
39 uses: ./.github/actions/cache-apt-packages-action
40 - name: Cache Homebrew downloads
41 if: runner.os == 'macOS'
42 uses: actions/cache@v5
43 with:
44 path: ~/Library/Caches/Homebrew
45 key: brew-${{ matrix.os }}-vsl-${{ hashFiles('.github/workflows/vsl_and_vtl_compile_ci.yml') }}
46 restore-keys: |
47 brew-${{ matrix.os }}-vsl-
48 brew-${{ matrix.os }}-
49 - name: Build V
50 id: build
51 run: make && sudo ./v symlink
52 - name: Install dependencies
53 run: |
54 if [ "$RUNNER_OS" == 'Linux' ]; then
55 .github/workflows/disable_azure_mirror.sh
56 v retry -- sudo apt -qq update
57 v retry -- sudo apt -qq install \
58 libgc-dev libgl1-mesa-dev mesa-common-dev liblapacke-dev libopenblas-dev libopenmpi-dev \
59 opencl-headers libvulkan-dev libxcursor-dev libxi-dev libxrandr-dev \
60 libhdf5-cpp-103-1t64 libhdf5-dev libhdf5-mpi-dev hdf5-tools
61 else
62 v retry brew install coreutils hdf5 open-mpi openblas lapack opencl-headers
63 fi
64 - name: Install vsl
65 run: v retry -- v install vsl
66 - name: Skip optional Vulkan examples on macOS
67 if: runner.os == 'macOS'
68 run: |
69 for file in "$HOME"/.vmodules/vsl/examples/*vulkan*/*.v; do
70 [ -e "$file" ] || continue
71 mv "$file" "${file%.v}_not_ci.v"
72 done
73 - name: Test with Pure V Backend
74 run: ~/.vmodules/vsl/bin/test
75 - name: Test with Pure V Backend and Pure V Math
76 run: ~/.vmodules/vsl/bin/test --use-cblas --skip-examples
77
78 vtl-compiles:
79 strategy:
80 matrix:
81 os: [ubuntu-24.04, macos-14]
82 fail-fast: false
83 runs-on: ${{ matrix.os }}
84 timeout-minutes: 25
85 env:
86 VFLAGS: -no-parallel
87 VJOBS: 1
88 # Fixes complaints about $TERM not being set when running the vtl test script
89 # (a warning on Linux, but an error on macOS).
90 TERM: xterm
91 steps:
92 - uses: actions/checkout@v6
93 - name: Cache apt packages
94 if: runner.os == 'Linux'
95 uses: ./.github/actions/cache-apt-packages-action
96 - name: Cache Homebrew downloads
97 if: runner.os == 'macOS'
98 uses: actions/cache@v5
99 with:
100 path: ~/Library/Caches/Homebrew
101 key: brew-${{ matrix.os }}-vtl-${{ hashFiles('.github/workflows/vsl_and_vtl_compile_ci.yml') }}
102 restore-keys: |
103 brew-${{ matrix.os }}-vtl-
104 brew-${{ matrix.os }}-
105 - name: Build V
106 id: build
107 run: make && sudo ./v symlink
108 - name: Install dependencies
109 run: |
110 if [ "$RUNNER_OS" == 'Linux' ]; then
111 .github/workflows/disable_azure_mirror.sh
112 v retry -- sudo apt -qq update
113 v retry -- sudo apt -qq install \
114 libgc-dev libgl1-mesa-dev mesa-common-dev liblapacke-dev libopenblas-dev libopenmpi-dev
115 else
116 v retry brew install coreutils hdf5 open-mpi openblas lapack opencl-headers
117 fi
118 v retry v install vsl
119 - name: Install vtl
120 run: v retry v install vtl
121 - name: Skip optional Vulkan examples on macOS
122 if: runner.os == 'macOS'
123 run: |
124 for file in "$HOME"/.vmodules/vtl/examples/*vulkan*/*.v; do
125 [ -e "$file" ] || continue
126 mv "$file" "${file%.v}_not_ci.v"
127 done
128 - name: Test with Pure V Backend
129 run: ~/.vmodules/vtl/bin/test
130 - name: Test with Pure V Backend and Pure V Math
131 run: ~/.vmodules/vtl/bin/test --use-cblas
132