-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 1.58 KB
/
macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: OSX CI
on:
workflow_call:
jobs:
setup:
strategy:
matrix:
os: [macos-13, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Setup V
run: |
[[ ${{ matrix.os }} == "macos-13" ]] && archive="v_macos_x86_64.zip" || archive="v_macos_arm64.zip"
curl -LO https://github.com/vlang/v/releases/latest/download/$archive
unzip -o $archive
mv v ~/v
~/v/v symlink && v -showcc self && v doctor
- uses: actions/checkout@v4
with:
path: vibe
- name: Setup V module
run: |
mv vibe ~/.vmodules/vibe
~/.vmodules/vibe/curl/setup.vsh --silent
- name: Save cache
uses: actions/cache/save@v4
with:
path: |
~/v
~/.vmodules
key: ${{ matrix.os }}-${{ github.sha }}
test:
needs: setup
strategy:
matrix:
os: [macos-13, macos-latest]
cc: [tcc, clang]
optimization: ['', '-W -cstrict']
exclude:
- cc: tcc
optimization: '-W -cstrict'
fail-fast: false
runs-on: ${{ matrix.os }}
env:
VFLAGS: -cg -stats -cc ${{ matrix.cc }} ${{ matrix.optimization }}
steps:
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/v
~/.vmodules
key: ${{ matrix.os }}-${{ github.sha }}
fail-on-cache-miss: true
- name: Setup V
run: ~/v/v symlink
- name: Run tests
run: v ${{ env.VFLAGS }} test ~/.vmodules/vibe