Skip to content

track_minetest

track_minetest #5014

name: track_minetest
# build on c/cpp changes or workflow changes
on:
schedule:
# Run every 3 hours
- cron: '0 */3 * * *'
push:
branches:
- master
# IMPORTANT: Do not run this workflow on pull request since this workflow
# has permission to modify contents.
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
# Current gcc version
update_repo:
runs-on: ubuntu-20.04
steps:
# Check out this repo
- uses: actions/checkout@v2
- name: Update minetest revision
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
./update-revs.sh # sets MINETEST_REV, IRRLICHT_REV
./push-revs.sh # sets DID_PUSH
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Checkout minetest
- uses: actions/checkout@v2
if: ${{ env.DID_PUSH == 'true' }}
with:
repository: '${{ github.repository_owner }}/minetest'
ref: ${{ env.MINETEST_REV }}
path: 'minetest'
# Checkout irrlicht
- uses: actions/checkout@v2
if: ${{ env.DID_PUSH == 'true' }}
with:
repository: '${{ github.repository_owner }}/irrlicht'
ref: ${{ env.IRRLICHT_REV }}
path: 'minetest/lib/irrlichtmt'
- name: Install deps
if: ${{ env.DID_PUSH == 'true' }}
run: |
pushd minetest
source ./util/ci/common.sh --no-irr
install_linux_deps g++-10
popd
- name: Build
if: ${{ env.DID_PUSH == 'true' }}
run: |
pushd minetest
./util/ci/build.sh
popd
env:
CC: gcc-10
CXX: g++-10
CMAKE_BUILD_TYPE: "Release"
CMAKE_BUILD_SERVER: FALSE
CMAKE_ENABLE_GETTEXT: FALSE
CMAKE_FLAGS: "-DBUILD_BENCHMARKS=TRUE"
- name: Run Benchmarks
if: ${{ env.DID_PUSH == 'true' }}
run: |
pushd minetest
./bin/minetest --run-benchmarks | tee ../output.txt
popd
# gh-pages branch is updated and pushed automatically with extracted benchmark data
- name: Store benchmark result
if: ${{ env.DID_PUSH == 'true' }}
uses: benchmark-action/github-action-benchmark@3d3bca03e83647895ef4f911fa57de3c7a391aaf
with:
name: Minetest Performance Benchmarks
tool: 'catch2'
output-file-path: output.txt
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true
# If there's a regression, comment on the commit.
# Temporarily disabled due to a bug in github-action-benchmark
comment-on-alert: false
# Branch and path where benchmark is stored and updated.
# This corresponds to:
# https://minetest.github.io/minetest/dev/bench
gh-pages-branch: "gh-pages"
benchmark-data-dir-path: "dev/bench"