-
Notifications
You must be signed in to change notification settings - Fork 154
52 lines (48 loc) · 1.31 KB
/
linux.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
name: Linux CI
on:
workflow_call:
env:
# Path where the module is installed for usage as V module.
MOD_PATH: $HOME/.vmodules/ui
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Setup V
uses: vlang/setup-v@v1.3
with:
check-latest: true
- uses: actions/checkout@v4
with:
path: ui
- name: Setup V UI module
run: mv ui ${{ env.MOD_PATH }}
- name: Cache
uses: actions/cache/save@v3
with:
path: |
vlang
~/.vmodules
key: ${{ runner.os }}-${{ github.sha }}
build:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Restore V cache
uses: actions/cache/restore@v3
with:
path: |
vlang
~/.vmodules
key: ${{ runner.os }}-${{ github.sha }}
fail-on-cache-miss: true
- name: Setup V
uses: vlang/setup-v@v1.3
with:
check-latest: true
- name: Install dependencies
run: sudo apt update && sudo apt install --quiet -y libglfw3-dev libxi-dev libxcursor-dev
- name: Build UI examples
run: VJOBS=20 v run ${{ env.MOD_PATH }}/examples/build_examples.vsh
- name: Build users.v with -prod
run: VJOBS=20 v -prod ${{ env.MOD_PATH }}/examples/users.v