generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 4
107 lines (106 loc) · 3.6 KB
/
build.yml
File metadata and controls
107 lines (106 loc) · 3.6 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
name: Build
on: [pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- "1.88" # Current MSRV due to 1.87 having problems with the AWS SDK
- stable
- nightly
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 --example pollcatch-without-agent
- name: Upload example-simple for testing
uses: actions/upload-artifact@v4
with:
name: example-simple
path: ./target/debug/examples/simple
- name: Upload example-pollcatch-without-agent for testing
uses: actions/upload-artifact@v4
with:
name: example-pollcatch-without-agent
path: ./target/debug/examples/pollcatch-without-agent
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
test:
name: Integration Test
runs-on: ubuntu-latest
needs: [build-for-testing, build-decoder]
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 example-pollcatch-without-agent
uses: actions/download-artifact@v4
with:
name: example-pollcatch-without-agent
path: ./tests
- name: Download async-profiler
shell: bash
working-directory: tests
run: wget https://github.com/async-profiler/async-profiler/releases/download/v4.1/async-profiler-4.1-linux-x64.tar.gz -O async-profiler.tar.gz && tar xvf async-profiler.tar.gz && mv -vf async-profiler-*/lib/libasyncProfiler.so .
- name: Run integration test
shell: bash
working-directory: tests
# The `ls -l` is there to help debugging CI, I see no reason to remove it
run: ls -l && chmod +x simple pollcatch-without-agent pollcatch-decoder && LD_LIBRARY_PATH=$PWD ./integration.sh && LD_LIBRARY_PATH=$PWD ./separate_runtime_integration.sh && LD_LIBRARY_PATH=$PWD ./test_pollcatch_without_agent.sh