-
Notifications
You must be signed in to change notification settings - Fork 47
137 lines (127 loc) · 3.69 KB
/
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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Build and Test
on: [push, pull_request]
jobs:
winos-test:
runs-on: windows-latest
env:
VFLAGS: -cc tcc
VJOBS: 1
VTEST_SHOW_START: 1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: coreutils
- name: Checkout Latest V
uses: actions/checkout@v2
with:
repository: vlang/v
path: v
- name: Build V
shell: bash
run: |
# Build V
cd v && ./make.bat -tcc
echo "adding '${PWD}' to PATH"
echo "${PWD}" >> $GITHUB_PATH
- name: Download uutils/coreutils
uses: engineerd/[email protected]
with:
name: 'coreutils.exe'
url: 'https://github.com/uutils/coreutils/releases/download/0.0.17/coreutils-0.0.17-x86_64-pc-windows-msvc.zip'
pathInArchive: 'coreutils-0.0.17-x86_64-pc-windows-msvc/coreutils.exe'
- name: V doctor
shell: bash
run: |
# V doctor
v doctor
- name: Info
shell: bash
run: |
## Info
# environment
echo "## environment"
echo "CI='${CI}'"
# tooling info display
echo "## testing/tooling"
coreutils
which tcc >/dev/null 2>&1 && (tcc --version | head -1) || true
v --version
- name: Build all
shell: bash
run: |
# Build all
cd coreutils && v build.vsh
- name: Run tests
shell: bash
run: |
# Run tests
cd coreutils && v test .
ubuntu-fast-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest V
uses: actions/checkout@v2
with:
repository: vlang/v
path: v
- name: Build V
run: cd v && make && sudo ./v symlink && cd -
- name: Checkout Coreutils (for tests)
uses: actions/checkout@v2
with:
path: coreutils
- name: V doctor
run: v doctor
- name: Ensure everything is formatted
run: cd coreutils && make testfmt
- name: Build all
run: cd coreutils && v run build.vsh
- name: Debug uptime_nix_test.v
run: cd coreutils && v -d trace_same_results -stats src/uptime/uptime_nix_test.v
- name: Run tests
run: cd coreutils && make test
ubuntu-prod-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest V
uses: actions/checkout@v2
with:
repository: vlang/v
path: v
- name: Build V
run: cd v && make && sudo ./v symlink && cd -
- name: Checkout Coreutils (for tests)
uses: actions/checkout@v2
with:
path: coreutils
- name: Build all with -prod
run: cd coreutils && v run build.vsh -prod
- name: Run tests
run: cd coreutils && make test
ubuntu-gnu-coreutils:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest V
uses: actions/checkout@v2
with:
repository: vlang/v
path: v
- name: Build V
run: cd v && make && sudo ./v symlink && cd -
- name: Checkout Coreutils (for tests)
uses: actions/checkout@v2
with:
path: coreutils
- name: Build all
run: cd coreutils && v run build.vsh
- name: Native utils diagnostics (before GNU coreutils)
run: |
sleep --version
uptime --version
- name: Setup the original GNU coreutils for comparison
uses: ShenTengTu/setup-gnu-coreutils-action@v1
- name: Test GNU coreutils uptime
run: uptime --version
- name: Run tests
run: cd coreutils && GNU_COREUTILS_INSTALLED=1 make test