generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 4
113 lines (112 loc) · 3.34 KB
/
build.yml
File metadata and controls
113 lines (112 loc) · 3.34 KB
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
name: Build
on: [pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- "1.85" # Current MSRV due to Cargo MSRV feature
- stable
flags:
- "--all-features"
- "--no-default-features"
- "--no-default-features --features=s3-no-defaults"
- "--no-default-features --features=aws-metadata-no-defaults"
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/rust-build
with:
toolchain: ${{ matrix.toolchain }}
flags: ${{ matrix.flags }}
build-for-testing:
name: Build for testing
runs-on: ubuntu-latest
env:
RUSTFLAGS: --cfg tokio_unstable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Build
shell: bash
run: cargo build --all-features --verbose --example simple
- name: Upload artifact for testing
uses: actions/upload-artifact@v4
with:
name: example-simple
path: ./target/debug/examples/simple
build-decoder:
name: Build Decoder
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: decoder
- name: Build
working-directory: decoder
shell: bash
run: cargo build --all-features --verbose
- name: Run tests
working-directory: decoder
shell: bash
run: cargo test --all-features --verbose
- name: Upload artifact for testing
uses: actions/upload-artifact@v4
with:
name: pollcatch-decoder
path: ./decoder/target/debug/pollcatch-decoder
build-async-profiler:
name: Build async-profiler
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install async-profiler Dependencies
run: sudo apt-get install -y sudo libicu-dev patchelf curl make g++ openjdk-11-jdk-headless gcovr
- name: Build async-profiler
working-directory: tests
shell: bash
run: ./build-async-profiler.sh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libasyncProfiler
path: ./tests/async-profiler/build/lib/libasyncProfiler.so
test:
name: Integration Test
runs-on: ubuntu-latest
needs: [build-for-testing, build-decoder, build-async-profiler]
steps:
- uses: actions/checkout@v4
- name: Download pollcatch-decoder
uses: actions/download-artifact@v4
with:
name: pollcatch-decoder
path: ./tests
- name: Download example-simple
uses: actions/download-artifact@v4
with:
name: example-simple
path: ./tests
- name: Download libasyncProfiler
uses: actions/download-artifact@v4
with:
name: libasyncProfiler
path: ./tests
- name: Run integration test
shell: bash
working-directory: tests
run: chmod +x simple pollcatch-decoder && LD_LIBRARY_PATH=$PWD ./integration.sh