forked from wasmCloud/wasmCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 2.45 KB
/
benchmark.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
name: Benchmark
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to benchmark'
required: true
default: 'main'
type: string
schedule:
- cron: '0 0 * * SAT'
permissions:
contents: read
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || 'main' }}
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.11' # OCI cli needs distutils
- name: Install OCI CLI
run: |
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" -- --accept-all-defaults
- name: Add the OCI CLI to the PATH
run: |
echo "${HOME}/bin" >> $GITHUB_PATH
- uses: taiki-e/install-action@4a7eafa27f0bd6857fe4f46dad5c66568c426ac0 # v2.49.22
with:
tool: wash
- name: Create kind cluster
uses: helm/kind-action@ae94020eaf628e9b9b9f341a10cc0cdcf5c018fb # v1.11.0
with:
version: 'v0.26.0'
- name: Install clusterctl
run: |
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.4/clusterctl-linux-amd64 -o clusterctl
chmod +x clusterctl
sudo mv clusterctl /usr/local/bin/
- name: Init clusterctl
env:
OCI_CREDENTIALS_KEY: ${{ secrets.OCI_CREDENTIALS_KEY }}
OCI_CREDENTIALS_FINGERPRINT: ${{ secrets.OCI_CREDENTIALS_FINGERPRINT }}
OCI_USER_ID: ${{ secrets.OCI_USER_ID }}
run: ./ci/setup-cluster-api.sh
- name: Run and print benchmarks
env:
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CREDENTIALS_KEY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CREDENTIALS_FINGERPRINT }}
OCI_CLI_USER: ${{ secrets.OCI_USER_ID }}
run: ./ci/run-benchmarks.sh
# This should get run on exit from the script, but just in case, we run it again here too to
# ensure we clean up after ourselves
- name: Teardown cluster
if: ${{ always() }}
run: ./ci/delete-cluster.sh
env:
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CREDENTIALS_KEY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CREDENTIALS_FINGERPRINT }}
OCI_CLI_USER: ${{ secrets.OCI_USER_ID }}