forked from apple/swift-nio
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (89 loc) · 4.24 KB
/
benchmarks.yml
File metadata and controls
93 lines (89 loc) · 4.24 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
name: Benchmarks
on:
workflow_call:
inputs:
benchmark_package_path:
type: string
description: "Path to the directory containing the benchmarking package. Defaults to ."
default: "."
swift_package_arguments:
type: string
description: "Arguments to the switch package command invocation e.g. `--disable-sandbox`"
linux_5_9_enabled:
type: boolean
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to false."
default: false
linux_5_10_enabled:
type: boolean
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
default: true
linux_6_0_enabled:
type: boolean
description: "Boolean to enable the Linux 6.0 Swift version matrix job. Defaults to true."
default: true
linux_6_1_enabled:
type: boolean
description: "Boolean to enable the Linux 6.1 Swift version matrix job. Defaults to true."
default: true
linux_nightly_6_0_enabled:
type: boolean
description: "⚠️ Deprecated, we no longer run against 6.0 nightly."
default: false
linux_nightly_6_1_enabled:
type: boolean
description: "⚠️ Deprecated, use linux_nightly_next_enabled."
default: true
linux_nightly_next_enabled:
type: boolean
description: "Boolean to enable the Linux nightly matrix job for the next Swift version. Defaults to true."
default: true
linux_nightly_main_enabled:
type: boolean
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
default: true
windows_6_0_enabled:
type: boolean
description: "Boolean to enable the Windows 6.0 Swift version matrix job. Currently has no effect!" # TODO: implement Windows benchmarking
default: false
windows_6_1_enabled:
type: boolean
description: "Boolean to enable the Windows 6.1 Swift version matrix job. Currently has no effect!" # TODO: implement Windows benchmarking
default: false
windows_nightly_6_0_enabled:
type: boolean
description: "⚠️ Deprecated, we no longer run against 6.0 nightly." # TODO: implement Windows benchmarking
default: false
windows_nightly_main_enabled:
type: boolean
description: "Boolean to enable the Windows nightly main Swift version matrix job. Currently has no effect!" # TODO: implement Windows benchmarking
default: false
jobs:
construct-matrix:
name: Construct Benchmarks matrix
runs-on: ubuntu-latest
outputs:
benchmarks-matrix: '${{ steps.generate-matrix.outputs.benchmarks-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- id: generate-matrix
run: echo "benchmarks-matrix=$(curl -s --retry 3 https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
env:
MATRIX_LINUX_COMMAND: "curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check_benchmark_thresholds.sh | BENCHMARK_PACKAGE_PATH=${{ inputs.benchmark_package_path }} bash"
MATRIX_LINUX_SETUP_COMMAND: "swift --version && apt-get update -y -q && apt-get install -y -q curl libjemalloc-dev && git config --global --add safe.directory /$(basename ${{ github.workspace }})"
MATRIX_LINUX_5_9_ENABLED: ${{ inputs.linux_5_9_enabled }}
MATRIX_LINUX_5_10_ENABLED: ${{ inputs.linux_5_10_enabled }}
MATRIX_LINUX_6_0_ENABLED: ${{ inputs.linux_6_0_enabled }}
MATRIX_LINUX_6_1_ENABLED: ${{ inputs.linux_6_1_enabled }}
MATRIX_LINUX_NIGHTLY_NEXT_ENABLED: ${{ inputs.linux_nightly_6_1_enabled && inputs.linux_nightly_next_enabled }}
MATRIX_LINUX_NIGHTLY_MAIN_ENABLED: ${{ inputs.linux_nightly_main_enabled }}
benchmarks:
name: Benchmarks
needs: construct-matrix
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Benchmarks"
matrix_string: '${{ needs.construct-matrix.outputs.benchmarks-matrix }}'