Skip to content

Change name

Change name #1

on:
workflow_call:
inputs:
setup:
required: true
type: string
aws-access-key-id:
required: true
type: string
aws-secret-access-key:
required: true
type: string
aws-region:
required: true
type: string
architecture:
required: true
type: string
instance-type:
required: true
type: string
ami-id:
required: true
type: string
subnet-id:
required: true
type: string
security-group-id:
required: true
type: string
github-runner-label:
required: true
type: string
github-token:
required: true
type: string

Check failure on line 37 in .github/workflows/benchmark-runner.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/benchmark-runner.yml

Invalid workflow file

You have an error in your yaml syntax on line 37
jobs:
start-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
outputs:
runner_label: ${{ steps.start-ec2-runner.outputs.label }}
ec2_instance_id: ${{ steps.start-ec2-runner.outputs.ec2_instance_id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: ${{ inputs.aws-region }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2
env:
SUBNET_ID: ${{ inputs.subnet-id }}
SECURITY_GROUP_ID: ${{ inputs.security-group-id }}
with:
mode: start
github-token: ${{ inputs.github-token }}
ec2-image-id: ${{ inputs.ami-id }}
ec2-instance-type: ${{ inputs.instance-type }}
subnet-id: ${{ inputs.subnet-id }}
security-group-id: ${{ inputs.security-group-id }}
label: ${{ inputs.github-runner-label }}
benchmark:
name: Run benchmarks on runner
needs: start-runner
runs-on: ${{ needs.start-runner.outputs.runner_label }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.number && format('refs/pull/{0}/merge', github.event.number) || github.head_ref }}
- name: Print runner info
run: |
printf "Runner lscpu:\n$(lscpu)\n"
printf "Runner lsmem:\n$(lsmem)\n"
printf "Runner nproc:\n$(nproc)\n"
printf "Runner uname:\n$(uname -a)\n"
printf "Runner arch:\n$(arch)\n"
- name: Install benchmark dependencies
run: |
sudo .install/install_script.sh
sudo apt install python3-pip -y
pip3 install --upgrade pip PyYAML setuptools redisbench-admin
pip3 install -r requirements.txt
- name: Download pre-generated indices
timeout-minutes: 20
run: ./tests/benchmark/bm_files.sh ${{ inputs.setup }}
- name: Run Benchmark
env:
ARCH: ${{ inputs.architecture }}
timeout-minutes: 120
run: |
if [[ $ARCH == "aarch64" ]]; then
source /usr/share/modules/init/bash
export MODULEPATH=$MODULEPATH:/opt/arm/modulefiles
module load armpl/24.10.0_gcc
fi
make benchmark BM_FILTER=${{ inputs.setup }}
- name: Collect results
run: |
./tests/benchmark/benchmarks.sh ${{ inputs.setup }} | xargs -P 0 -I {} redisbench-admin export \
--redistimeseries_host ${{ secrets.PERFORMANCE_RTS_HOST }} \
--redistimeseries_port ${{ secrets.PERFORMANCE_RTS_PORT }} \
--redistimeseries_user default \
--redistimeseries_pass '${{ secrets.PERFORMANCE_RTS_AUTH }}' \
--github_repo ${{ github.event.repository.name }} \
--github_org ${{ github.repository_owner }} \
--github_branch ${{ github.head_ref || github.ref_name }} \
--github_actor ${{ github.triggering_actor }} \
--results-format google.benchmark \
--benchmark-result-file {}_results.json
stop-runner:
name: Stop self-hosted EC2 runner
needs: benchmark
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: ${{ inputs.aws-region }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ inputs.github-token }}
label: ${{ inputs.github-runner-label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2_instance_id }}