Skip to content

No longer push images to CCF ACR #811

No longer push images to CCF ACR

No longer push images to CCF ACR #811

Workflow file for this run

name: "Perf testing"
on:
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
runs-on: ubuntu-20.04
container: mcr.microsoft.com/ccf/app/dev:4.0.7-virtual
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Install Go
run: |
curl -L -o go1.19.1.linux-amd64.tar.gz https://go.dev/dl/go1.19.1.linux-amd64.tar.gz
mkdir -p ~/.local/
tar -C ~/.local/ -xzf go1.19.1.linux-amd64.tar.gz
- name: Get etcd
run: make bin/etcd
- name: Install gh cli
run: |
type -p curl >/dev/null || sudo apt install curl -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh -y
- name: Build benchmark
run: export PATH=$HOME/.local/go/bin:$PATH && make bin/benchmark
- name: Build go-ycsb
run: export PATH=$HOME/.local/go/bin:$PATH && make bin/go-ycsb
- name: Build k6
run: export PATH=$HOME/.local/go/bin:$PATH && make bin/k6
- name: Install venv
run: sudo apt install -y python3.8-venv
- name: Install pip
run: sudo apt install -y python3-pip
- name: Upgrade pip
run: pip3 install --upgrade pip
- name: Make .venv
run: make .venv
- name: Run benchmark
run: export PATH=$HOME/.local/go/bin:$PATH && . .venv/bin/activate && python3 benchmark/ci.py
# - name: Plot results
# run: make execute-notebook
# - name: Mark safe directories
# run: git config --global --add safe.directory $(pwd)
# - name: Set up git author
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "ccf-bot"
# - name: Commit and push plots
# run: |
# set -x
# git checkout -- benchmark
# git checkout ci-plots
# git pull origin ci-plots
# mkdir ${{ github.sha }}
# mv plots/* ${{ github.sha }}/.
# rm -f ${{ github.sha }}/**/*.svg
# git add ${{ github.sha }}/**/*.jpg
# git commit -m "add plots for ${{ github.sha }}"
# git push origin ci-plots
# - name: Set up comment file
# run: |
# repo_url=${{ github.server_url }}/${{ github.repository }}
# echo "## Plots from benchmarking at ${{ github.sha }}" >> comment.md
# echo >> comment.md
# echo "> Available from [here](${repo_url}/tree/ci-plots/${{ github.sha }})" >> comment.md
# echo >> comment.md
# for dir in ${{ github.sha }}/*; do
# for f in $dir/*; do
# short="${f#*/}"
# echo "<details>" >> comment.md
# echo "<summary><b>$short</b></summary>" >> comment.md
# echo "<a href=\"${repo_url}/blob/ci-plots/$f?raw=true\"><img src=\"${repo_url}/blob/ci-plots/$f?raw=true\"></a>" >> comment.md
# echo "</details>" >> comment.md
# done
# done
# - name: Upload plots to PR
# run: |
# gh pr comment ${{ github.event.number }} --edit-last --body-file comment.md || \
# gh pr comment ${{ github.event.number }} --body-file comment.md
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload plots as artifact
# uses: actions/upload-artifact@v3
# with:
# name: plots
# path: ${{ github.sha }}/