-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
72 lines (68 loc) · 1.74 KB
/
vpm_ci.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
63
64
65
66
67
68
69
70
71
72
name: VPM CI
on:
push:
paths:
- '**/vpm_ci.yml'
- '**/cmd/tools/vpm/**'
pull_request:
paths:
- '**/vpm_ci.yml'
- '**/cmd/tools/vpm/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true
jobs:
setup-vpm:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
path: vlang
- name: Show git version
run: git version
- name: Build V
if: runner.os != 'Windows'
run: cd vlang && make -j4 && ./v doctor
- name: Build V (Windows)
if: runner.os == 'Windows'
run: cd vlang && ./make.bat && ./v doctor
- name: Cache V
uses: actions/cache/save@v4
with:
path: vlang
key: ${{ runner.os }}-${{ github.sha }}
test-vpm:
needs: setup-vpm
strategy:
matrix:
include:
- os: ubuntu-latest
cc: tcc
- os: ubuntu-latest
cc: gcc
- os: ubuntu-latest
cc: clang
- os: macos-latest
cc: clang
- os: windows-latest
cc: tcc
- os: windows-latest
cc: gcc
- os: windows-latest
cc: msvc
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Restore V cache
uses: actions/cache/restore@v4
with:
path: vlang
key: ${{ runner.os }}-${{ github.sha }}
- name: Show git version
run: git version
- name: Test
run: cd vlang && ./v -cc ${{ matrix.cc }} -d network test cmd/tools/vpm