-
Notifications
You must be signed in to change notification settings - Fork 5
94 lines (75 loc) · 2.17 KB
/
test.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
name: Test
on:
push:
branches: "*"
pull_request:
jobs:
test-linux:
runs-on: ubuntu-22.04
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: rust version
run: rustc -V
- name: cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: doc tests
run: |
cargo test --doc
- name: server test
env:
ALTV_BRANCH: ${{ github.ref_name }}
run: |
cargo run --bin run_test
test-windows:
runs-on: windows-2022
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: rust version
run: rustc -V
- name: install winget
uses: Cyberboss/install-winget@v1
- name: install LLVM 17.0.1
shell: powershell
run: winget install LLVM.LLVM --version 17.0.1 --disable-interactivity --accept-source-agreements --force
- name: cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: doc tests
shell: cmd
# temp workaround https://github.com/google/autocxx/issues/1327
run: |
set PATH=%PATH:C:\Program Files\LLVM\bin;=%
echo %PATH%
cargo test --doc
- name: server test
env:
ALTV_BRANCH: ${{ github.ref_name }}
shell: cmd
# temp workaround https://github.com/google/autocxx/issues/1327
run: |
set PATH=%PATH:C:\Program Files\LLVM\bin;=%
echo %PATH%
cargo run --bin run_test