-
Notifications
You must be signed in to change notification settings - Fork 18
110 lines (105 loc) · 3.36 KB
/
Copy pathci.yml
File metadata and controls
110 lines (105 loc) · 3.36 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: CI Checks
on:
push:
paths:
- "**.v"
- "**.vsh"
- "**.md"
- "**/ci.yml"
pull_request:
paths:
- "**.v"
- "**.vsh"
- "**.md"
- "**/ci.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
linting:
runs-on: ubuntu-latest
timeout-minutes: 25
env:
VFLAGS: -no-parallel
steps:
- name: Install V
id: install-v
uses: vlang/setup-v@v1.4
with:
check-latest: true
- name: Install vglyph
run: v install vglyph
- name: Install C development dependencies (headers and libs)
if: runner.os == 'Linux'
run: v retry -- sudo apt -qq update && v retry -- sudo apt install libpango1.0-dev libfontconfig1-dev libfribidi-dev libharfbuzz-dev libfreetype-dev libgl1-mesa-dri xvfb libxcursor-dev libxi-dev libxrandr-dev freeglut3-dev
- name: Install development dependencies on macos (headers and libs)
if: runner.os == 'macOS'
run: v retry -- brew install pango harfbuzz freetype2
- name: Checkout the gui module
uses: actions/checkout@v4
with:
path: gui
- name: Verify formatting
run: v fmt -verify -inprocess gui/
- name: Check formatting of MD files
run: v check-md gui/
- name: Check syntax of examples
run: v gui/examples/_check.vsh
compiling:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: true
runs-on: ${{ matrix.os }}
timeout-minutes: 25
env:
VFLAGS: -no-parallel -cc clang
steps:
- name: Install V
id: install-v
uses: vlang/setup-v@v1.4
with:
check-latest: true
- name: Install vglyph
run: v install vglyph
- name: Install X11/GL development dependencies (headers and libs)
if: runner.os == 'Linux'
run: v retry -- sudo apt -qq update && v retry -- sudo apt install libpango1.0-dev libfontconfig1-dev libfribidi-dev libharfbuzz-dev libfreetype-dev libgl1-mesa-dri xvfb libxcursor-dev libxi-dev libxrandr-dev freeglut3-dev
- name: Install development dependencies on macos (headers and libs)
if: runner.os == 'macOS'
run: v retry -- brew install pango harfbuzz freetype2
- name: Checkout the gui module
uses: actions/checkout@v4
with:
path: gui
- name: Run tests
run: v test gui/
- name: Check compilation of examples
run: v should-compile-all gui/examples/
- name: Check compilation of examples with -W
run: v gui/examples/_build.vsh
compiling-on-windows:
runs-on: windows-latest
timeout-minutes: 25
env:
VFLAGS: -no-parallel -cc msvc
steps:
- name: Install V
id: install-v
uses: vlang/setup-v@v1.4
with:
check-latest: true
- name: Install pango and freetype
run: vcpkg install pango freetype
- name: Install vglyph
run: v install vglyph
- name: Checkout the gui module
uses: actions/checkout@v4
with:
path: gui
- name: Run tests
run: v test gui/
- name: Check compilation of examples
run: v should-compile-all gui/examples/
- name: Check compilation of examples with -W
run: v gui/examples/_build.vsh