Remove perf check workflow. See https://github.com/meeDamian/simple-qemu/issues/15 instead. Closes #9

This commit is contained in:
Damian Mee 2020-07-18 04:06:09 +08:00
parent 9d11b25cf8
commit cf72a7a71b
No known key found for this signature in database
GPG Key ID: 2F961EAB8789725D
2 changed files with 3 additions and 148 deletions

View File

@ -1,146 +0,0 @@
name: Perf-check qemu versions
env:
APP: bitcoind
on:
push:
branches: [ 'perf' ]
schedule:
- cron: '2 1 * * *'
jobs:
build:
name: Build & measure time
runs-on: ubuntu-18.04
env:
DOCKER_BUILDKIT: 1
MINOR: '0.20'
strategy:
fail-fast: false
matrix:
qemu:
- v3.1.1
- v4.0.1
- v4.1.1
- v4.2.1
- v5.0.0
arch:
- arm32v7
- arm64v8
steps:
- uses: actions/checkout@v2
- name: Log start time
run: touch /tmp/start
- name: Register self-compiled qemu
run: docker run --rm --privileged "meedamian/simple-qemu:${{ matrix.qemu }}-${{ matrix.arch }}" -p yes
- name: Build container
run: >
docker build "$MINOR/"
--build-arg "ARCH=${{ matrix.arch }}"
--tag "$APP"
- name: Make sure binaries can be run
run: |
run() {
ENTRYPOINT="${1:-$APP}"; shift
ARGS=${*:-"--version"}
printf "\n$ %s %s\n" "$ENTRYPOINT" "$ARGS"
docker run --rm --entrypoint "$ENTRYPOINT" "$APP" $ARGS
}
run uname -a
run bitcoind
run bitcoin-cli
run bitcoin-tx --help | head -n 1
# If version higher, or equal than v0.18.0, also run `bitcoin-wallet` binary
if [ "${MINOR#0.}" -ge "18" ]; then
run bitcoin-wallet --help | head -n 1
fi
- name: Calculate execution time
run: |
START=$(date -r /tmp/start +%s)
NOW=$(date +%s)
DIFF=$(( NOW - START ))
SEC=1
MIN=$(( 60 * SEC ))
HOUR=$(( 60 * MIN ))
DAY=$(( 24 * HOUR ))
secs=$(( DIFF % 60 ))
mins=$(( $(( DIFF / MIN )) % 60 ))
hours=$(( $(( DIFF / HOUR )) % 24 ))
days=$(( DIFF / DAY ))
OUT=""
if [[ "$days" -ne "0" ]]; then
# Days-long jobs shouldn't happen, but 🤷🏻‍♂️
OUT="${days}d "
fi
OUT="$OUT${hours}h:${mins}m:${secs}s"
mkdir -p stat
echo "$OUT" > stat/${{ matrix.qemu }}-${{ matrix.arch }}
- name: Save execution time as an artifact
uses: actions/upload-artifact@v1.0.0
with:
name: stats
path: stat/
comment:
name: Report result
needs: build
runs-on: ubuntu-18.04
steps:
- name: Download perf stats
uses: actions/download-artifact@v1.0.0
with:
name: stats
- name: Aggregate results
run: |
touch ./all-stats
echo "| version | arm32v7 | arm64v8" >> ./all-stats
echo "|:-------:|--------:|--------:" >> ./all-stats
for ver in $(ls ./stats/* | awk -F/ '{print $NF}' | cut -d- -f1 | uniq); do
line="| **${ver}**"
line="$line | $(cat "./stats/$ver-arm32v7" | tr -d '\n')"
line="$line | $(cat "./stats/$ver-arm64v8" | tr -d '\n')"
echo "$line" >> ./all-stats
done
cat ./all-stats
echo ::set-env name=RESULTS::"$(cat ./all-stats | sed -z 's/\n/\\n/g')"
- uses: actions/github-script@0.8.0
with:
github-token: ${{ secrets.GITHUB_TOKEN_NOEXPIRE }}
script: |
github.issues.createComment({
owner: 'lncm',
repo: 'docker-bitcoind',
issue_number: 9,
body: `Today's results:\n\n${process.env.RESULTS.replace(/\\n/g, '\n')}`
})

View File

@ -1,12 +1,13 @@
lncm/bitcoind
=============
![Build Status]
[![Build Status]][builds]
[![gh_last_release_svg]][gh_last_release_url]
[![Docker Image Size]][lnd-docker-hub]
[![Docker Pulls Count]][lnd-docker-hub]
[Build Status]: https://github.com/lncm/docker-bitcoind/workflows/Build%20%26%20deploy%20on%20git%20tag%20push/badge.svg
[Build Status]: https://github.com/lncm/docker-bitcoind/workflows/Build%20&%20deploy%20on%20git%20tag%20push/badge.svg
[builds]: https://github.com/lncm/docker-bitcoind/actions?query=workflow%3A%22Build+%26+deploy+on+git+tag+push%22
[gh_last_release_svg]: https://img.shields.io/github/v/release/lncm/docker-bitcoind?sort=semver
[gh_last_release_url]: https://github.com/lncm/docker-bitcoind/releases/latest