-
Notifications
You must be signed in to change notification settings - Fork 39
49 lines (46 loc) · 1.58 KB
/
protobuf.yaml
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
name: protobuf_compatibility
on:
pull_request:
branches: [ "*" ]
push:
# protobuf compatibility is a transitive property,
# but it requires all the transitions to be checked.
# If we checked it just against the PR branches,
# we may end up with conflicting PRs getting merged
# (unless we improve our github setup).
# Therefore on post-merge we will execute the
# compatibility check as well (TODO: alerting).
branches: ["main"]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Dwarnings -C linker=clang -C link-arg=-fuse-ld=lld -C link-arg=-Wl,-z,nostart-stop-gc"
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "true"
RUST_BACKTRACE: "1"
jobs:
compatibility:
runs-on: ubuntu-latest
steps:
# github.base_ref -> github.head_ref for pull_request
# github.event.before -> github.event.after for push
- uses: mozilla-actions/[email protected]
- uses: actions/checkout@v3
with:
ref: ${{ github.base_ref || github.event.before }}
path: before
- name: compile before
run: cargo build --all-targets
working-directory: ./before/node
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref || github.event.after }}
path: after
- name: compile after
run: cargo build --all-targets
working-directory: ./after/node
# - uses: bufbuild/buf-setup-action@v1
# - uses: bufbuild/buf-breaking-action@v1
# with:
# input: "after/$PROTOS_DIR"
# against: "before/$PROTOS_DIR"