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