-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (73 loc) · 1.88 KB
/
symlink_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
73
74
75
76
77
name: Symlink CI
on:
workflow_dispatch:
push:
paths:
- 'cmd/tools/vsymlink/**.v'
- '.github/workflows/symlink_ci.yml'
pull_request:
paths:
- 'cmd/tools/vsymlink/**.v'
- '.github/workflows/symlink_ci.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name == 'master' && github.sha || github.ref_name }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-13]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Build V
run: make -j4
- name: Symlink
run: |
./v symlink
cd /tmp/ && v version
cd ~ && v version
echo 'println(123)' > hi.v
v run hi.v
- name: Unlink
run: |
rm $(which v)
v --version && exit 1 || exit 0
- name: Symlink (sudo)
run: |
sudo ./v symlink
cd /tmp/ && v version
cd ~ && v version
echo 'println(123)' > hi.v
v run hi.v
- name: Unlink
run: |
rm $(which v)
v --version && exit 1 || exit 0
- name: Symlink (-githubci)
run: ./v symlink -githubci
- name: Test after symlink with -githubci (in a separate script)
run: |
cd /tmp/ && v version
cd ~ && v version
echo 'println(123)' > hi.v
v run hi.v
test-windows:
runs-on: windows-2019
strategy:
matrix:
flags: ['', '-githubci']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Build V
run: ./make.bat
- name: Symlink
run: ./v symlink ${{ matrix.flags }}
- name: Check if V is usable
run: |
cd $RUNNER_TEMP && pwd && v version
cd ~ && pwd && v version
echo 'println(123)' > hi.v
v run hi.v