forked from Dicklesworthstone/beads_rust
-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (117 loc) · 3.96 KB
/
e2e-full.yml
File metadata and controls
137 lines (117 loc) · 3.96 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Full E2E & Benchmarks
on:
workflow_dispatch:
inputs:
suite:
description: 'Test suite to run'
type: choice
options:
- all
- e2e-full
- benchmarks
default: 'all'
parallel:
description: 'Run E2E tests in parallel'
type: boolean
default: true
schedule:
- cron: '0 4 * * 0' # Weekly Sunday 4am UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
permissions:
contents: read
jobs:
e2e-full:
name: Full E2E Suite
runs-on: ubuntu-latest
timeout-minutes: 45
if: inputs.suite == 'all' || inputs.suite == 'e2e-full' || github.event_name == 'schedule'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Cache cargo
uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
- name: Build br
run: cargo build --release
- name: Run full E2E suite
run: |
PARALLEL_FLAG=""
if [ "${{ inputs.parallel }}" = "true" ]; then
PARALLEL_FLAG="--parallel"
fi
scripts/e2e_full.sh $PARALLEL_FLAG
env:
E2E_FULL_CONFIRM: 1
E2E_TIMEOUT: 180
HARNESS_ARTIFACTS: 1
NO_COLOR: 1
- name: Upload E2E summary
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: e2e-full-summary
path: target/test-artifacts/e2e_full_summary.json
if-no-files-found: ignore
- name: Upload E2E artifacts on failure
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: e2e-full-artifacts
path: target/test-artifacts/
if-no-files-found: ignore
benchmarks-full:
name: Full Benchmarks
runs-on: ubuntu-latest
timeout-minutes: 60
if: inputs.suite == 'all' || inputs.suite == 'benchmarks' || github.event_name == 'schedule'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Cache cargo
uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
- name: Restore criterion baseline
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: target/criterion/
key: ${{ runner.os }}-${{ runner.arch }}-criterion-full-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-criterion-full-
${{ runner.os }}-${{ runner.arch }}-criterion-
- name: Build br
run: cargo build --release
- name: Run full benchmarks
run: scripts/bench.sh
env:
BENCH_CONFIRM: 1
BENCH_TIMEOUT: 600
NO_COLOR: 1
- name: Upload benchmark summary
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: benchmark-full-summary
path: target/test-artifacts/benchmark_summary.json
if-no-files-found: ignore
- name: Upload criterion reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: criterion-reports
path: target/criterion/
if-no-files-found: ignore
- name: Save criterion baseline
if: always()
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: target/criterion/
key: ${{ runner.os }}-${{ runner.arch }}-criterion-full-${{ github.run_id }}