forked from tikv/tikv
-
Notifications
You must be signed in to change notification settings - Fork 9
106 lines (103 loc) · 3.55 KB
/
pr-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
name: Pull Request CI
on:
# push:
# branches:
# - 'raftstore-proxy*'
pull_request:
branches:
- 'raftstore-proxy*'
jobs:
build-check-old:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: cache cargo env
id: cache-cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/
~/.cargo/git/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install dependencies (protocol buffers compiler)
uses: arduino/setup-protoc@v1
with:
version: '3.8.0'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: install rust
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: |
curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --default-toolchain none -y
export PATH=~/.cargo/bin/:$PATH
rustup self update && rustup set profile minimal && rustup default $(cat "rust-toolchain")
# cargo install sccache
# - name: cache build target
# uses: actions/cache@v2
# env:
# cache-name: cargo-target
# with:
# path: |
# target/
# # ~/.cache/sccache/
# key: ${{ runner.os }}-${{ env.cache-name }}-v1-${{ hashFiles('**/rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: |
# ${{ runner.os }}-${{ env.cache-name }}-v1-${{ hashFiles('**/rust-toolchain') }}-
- name: format check
run: |
cd ${{github.workspace}}
M="fmt" ./proxy_scripts/ci_check.sh
- name: test
run: |
M="testold" ./proxy_scripts/ci_check.sh
# build-check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true
# - name: cache cargo env
# id: cache-cargo
# uses: actions/cache@v2
# with:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/
# ~/.cargo/git/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain') }}
# restore-keys: |
# ${{ runner.os }}-cargo-
# - name: Install dependencies (protocol buffers compiler)
# uses: arduino/setup-protoc@v1
# with:
# version: '3.8.0'
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - name: install rust
# if: steps.cache-cargo.outputs.cache-hit != 'true'
# run: |
# curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --default-toolchain none -y
# export PATH=~/.cargo/bin/:$PATH
# rustup self update && rustup set profile minimal && rustup default $(cat "rust-toolchain")
# # cargo install sccache
# - name: cache build target
# uses: actions/cache@v2
# env:
# cache-name: cargo-target
# with:
# path: |
# target/
# # ~/.cache/sccache/
# key: ${{ runner.os }}-${{ env.cache-name }}-v1-${{ hashFiles('**/rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: |
# ${{ runner.os }}-${{ env.cache-name }}-v1-${{ hashFiles('**/rust-toolchain') }}-
# - name: format check
# run: |
# cd ${{github.workspace}}
# M="fmt" ./proxy_scripts/ci_check.sh
# - name: test
# run: |
# M="testnew" ./proxy_scripts/ci_check.sh