|
34 | 34 | default: benchmarks-all |
35 | 35 |
|
36 | 36 | jobs: |
37 | | - start-runner: |
38 | | - name: Start self-hosted EC2 runner |
39 | | - runs-on: ubuntu-latest |
| 37 | + run-all: |
40 | 38 | strategy: |
41 | 39 | matrix: |
42 | 40 | include: |
43 | | - # - architecture: x86_64 |
44 | | - # instance-type: r7i.xlarge |
45 | | - # ami-id: ami-0ba430d4b7b64de57 |
46 | | - # region: eu-west-1 |
| 41 | + # - architecture: arm64 |
| 42 | + # instance-type: c6g.xlarge |
| 43 | + # ami-id: ami-0375de6ea0af17f87 |
| 44 | + # region: us-west-2 |
| 45 | + # subnet-id: subnet-880013ed |
| 46 | + # security-group-id: sg-8693a7fe |
47 | 47 | - architecture: arm64 |
48 | | - instance-type: c6g.xlarge # Graviton2 |
| 48 | + instance-type: i8g.xlarge |
49 | 49 | ami-id: ami-0375de6ea0af17f87 |
50 | 50 | region: us-west-2 |
51 | 51 | subnet-id: subnet-880013ed |
52 | 52 | security-group-id: sg-8693a7fe |
53 | | - - architecture: arm64 |
54 | | - instance-type: i8g.xlarge # Graviton4 |
55 | | - ami-id: ami-0375de6ea0af17f87 |
56 | | - region: us-west-2 |
57 | | - subnet-id: subnet-880013ed |
58 | | - security-group-id: sg-8693a7fe |
59 | | - outputs: |
60 | | - label: ${{ steps.start-ec2-runner.outputs.label }} |
61 | | - ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} |
62 | | - steps: |
63 | | - - name: Configure AWS credentials |
64 | | - uses: aws-actions/configure-aws-credentials@v4 |
65 | | - with: |
66 | | - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
67 | | - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
68 | | - aws-region: ${{ matrix.region }} |
69 | | - - name: Start EC2 runner |
70 | | - id: start-ec2-runner |
71 | | - uses: machulav/ec2-github-runner@v2 |
72 | | - env: |
73 | | - SUBNET_ID: ${{ matrix.subnet-id != '' && matrix.subnet-id || secrets.AWS_EC2_SUBNET_ID }} |
74 | | - SECURITY_GROUP_ID: ${{ matrix.security-group-id != '' && matrix.security-group-id || secrets.AWS_EC2_SECURITY_GROUP_ID }} |
75 | | - with: |
76 | | - mode: start |
77 | | - github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} |
78 | | - # Ubuntu 22.04 128GB Storage AMI |
79 | | - ec2-image-id: ${{ matrix.ami-id }} |
80 | | - ec2-instance-type: ${{ matrix.instance-type }} |
81 | | - subnet-id: ${{ env.SUBNET_ID }} |
82 | | - security-group-id: ${{ env.SECURITY_GROUP_ID}} |
83 | | - label: ${{ matrix.architecture }}-${{ matrix.instance-type }}-${{ github.run_id }} |
84 | | - |
85 | | - benchmark: |
86 | | - name: Run the benchmarks on the runner |
87 | | - needs: start-runner # required to start the main job when the runner is ready |
88 | | - runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner |
89 | | - steps: |
90 | | - - name: checkout |
91 | | - uses: actions/checkout@v4 |
92 | | - with: |
93 | | - ref: ${{ github.event.number && format('refs/pull/{0}/merge', github.event.number) || github.head_ref }} |
94 | | - - name: Print runner info |
95 | | - run: | |
96 | | - printf "Runner lscpu:\n$(lscpu)\n" |
97 | | - printf "Runner lsmem:\n$(lsmem)\n" |
98 | | - printf "Runner nproc:\n$(nproc)\n" |
99 | | - printf "Runner uname:\n$(uname -a)\n" |
100 | | - printf "Runner arch:\n$(arch)\n" |
101 | | -
|
102 | | - - name: Install benchmark dependencies |
103 | | - run: | |
104 | | - sudo .install/install_script.sh |
105 | | - sudo apt install python3-pip -y |
106 | | - pip3 install --upgrade pip PyYAML setuptools redisbench-admin |
107 | | - pip3 install -r requirements.txt |
108 | | -
|
109 | | - # TODO: remove "--no-check-certificate" when possible |
110 | | - - name: Download pre-generated indices |
111 | | - timeout-minutes: 20 |
112 | | - run: ./tests/benchmark/bm_files.sh ${{ inputs.setup }} |
113 | | - |
114 | | - - name: Benchmark |
115 | | - env: |
116 | | - ARCH: ${{ matrix.architecture }} |
117 | | - timeout-minutes: 120 |
118 | | - run: | |
119 | | - if [[ $ARCH == "aarch64" ]]; then |
120 | | - source /usr/share/modules/init/bash |
121 | | - export MODULEPATH=$MODULEPATH:/opt/arm/modulefiles |
122 | | - module load armpl/24.10.0_gcc |
123 | | - fi |
124 | | - make benchmark BM_FILTER=${{ inputs.setup }} |
125 | | -
|
126 | | - - name: Collect results |
127 | | - run: | |
128 | | - ./tests/benchmark/benchmarks.sh ${{ inputs.setup }} | xargs -P 0 -I {} redisbench-admin export \ |
129 | | - --redistimeseries_host ${{ secrets.PERFORMANCE_RTS_HOST }} \ |
130 | | - --redistimeseries_port ${{ secrets.PERFORMANCE_RTS_PORT }} \ |
131 | | - --redistimeseries_user default \ |
132 | | - --redistimeseries_pass '${{ secrets.PERFORMANCE_RTS_AUTH }}' \ |
133 | | - --github_repo ${{ github.event.repository.name }} \ |
134 | | - --github_org ${{ github.repository_owner }} \ |
135 | | - --github_branch ${{ github.head_ref || github.ref_name }} \ |
136 | | - --github_actor ${{ github.triggering_actor }} \ |
137 | | - --results-format google.benchmark \ |
138 | | - --benchmark-result-file {}_results.json |
139 | | -
|
140 | | - stop-runner: |
141 | | - name: Stop self-hosted EC2 runner |
142 | | - needs: |
143 | | - - start-runner # required to get output from the start-runner job |
144 | | - - benchmark # required to wait when the main job is done |
145 | | - runs-on: ubuntu-latest |
146 | | - if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs |
147 | | - steps: |
148 | | - - name: Configure AWS credentials |
149 | | - uses: aws-actions/configure-aws-credentials@v4 |
150 | | - with: |
151 | | - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
152 | | - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
153 | | - aws-region: ${{ secrets.AWS_REGION }} |
154 | | - - name: Stop EC2 runner |
155 | | - uses: machulav/ec2-github-runner@v2 |
156 | | - with: |
157 | | - mode: stop |
158 | | - github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} |
159 | | - label: ${{ needs.start-runner.outputs.label }} |
160 | | - ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} |
| 53 | + uses: ./.github/workflows/runner-bench-stop.yml |
| 54 | + with: |
| 55 | + setup: ${{ inputs.setup }} |
| 56 | + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 57 | + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 58 | + aws-region: ${{ matrix.region }} |
| 59 | + architecture: ${{ matrix.architecture }} |
| 60 | + instance-type: ${{ matrix.instance-type }} |
| 61 | + ami-id: ${{ matrix.ami-id }} |
| 62 | + subnet-id: ${{ matrix.subnet-id }} |
| 63 | + security-group-id: ${{ matrix.security-group-id }} |
| 64 | + github-runner-label: ${{ matrix.architecture }}-${{ matrix.instance-type }}-${{ github.run_id }} |
| 65 | + github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} |
0 commit comments