-
Notifications
You must be signed in to change notification settings - Fork 15
93 lines (78 loc) · 2.38 KB
/
benchmarks.yml
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_dispatch:
inputs:
workflow-run-id:
description: 'Workflow Run ID'
type: number
required: false
runs:
description: 'No. of runs [min: 5, max: 100]'
type: number
default: 5
required: false
permissions:
actions: read
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_RUN_ID: ${{ inputs.workflow-run-id }}
RUNS: ${{ inputs.runs }}
BENCHMARKS_DIR: .benchmarks
jobs:
amd64-macos-gcc:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
scripts/ci-run-benchmarks.sh
- name: Download build artifact from workflow run
if: ${{ env.WORKFLOW_RUN_ID }}
run: |
gh run download --repo liquidaty/zsv --pattern *amd64-macosx-gcc.tar.gz "$WORKFLOW_RUN_ID"
mkdir -p ./"$BENCHMARKS_DIR"
mv zsv-*.tar.gz/*.tar.gz ./"$BENCHMARKS_DIR"
rm -rf zsv-*.tar.gz
ls -hl ./"$BENCHMARKS_DIR"
- name: Set ZSV_TAG env var
if: ${{ env.WORKFLOW_RUN_ID }}
run: |
cd ./"$BENCHMARKS_DIR"
ZSV_TAG="$(ls *.tar.gz | sed 's|zsv-\(.*\)-amd64.*|\1|')"
echo "ZSV_TAG=$ZSV_TAG" | tee -a "$GITHUB_ENV"
- name: Run benchmarks
run: ./scripts/ci-run-benchmarks.sh
amd64-linux:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang, musl]
continue-on-error: true
name: amd64-linux-${{ matrix.compiler }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
scripts/ci-run-benchmarks.sh
- name: Download build artifact from workflow run
if: ${{ env.WORKFLOW_RUN_ID }}
env:
COMPILER: ${{ matrix.compiler }}
run: |
gh run download --repo liquidaty/zsv --pattern *amd64-linux-$COMPILER.tar.gz "$WORKFLOW_RUN_ID"
mkdir -p ./"$BENCHMARKS_DIR"
mv zsv-*.tar.gz/*.tar.gz ./"$BENCHMARKS_DIR"
rm -rf zsv-*.tar.gz
ls -hl ./"$BENCHMARKS_DIR"
- name: Set ZSV_TAG env var
if: ${{ env.WORKFLOW_RUN_ID }}
run: |
cd ./"$BENCHMARKS_DIR"
ZSV_TAG="$(ls *.tar.gz | sed 's|zsv-\(.*\)-amd64.*|\1|')"
echo "ZSV_TAG=$ZSV_TAG" | tee -a "$GITHUB_ENV"
- name: Run benchmarks
env:
ZSV_LINUX_BUILD_COMPILER: ${{ matrix.compiler }}
run: ./scripts/ci-run-benchmarks.sh