2022-07-05 23:03:29 +03:00
|
|
|
name: Benchmark Engine
|
2022-08-28 15:44:10 +03:00
|
|
|
on:
|
2022-07-05 23:03:29 +03:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- develop
|
|
|
|
schedule:
|
|
|
|
- cron: 0 5 * * 2-6
|
2022-08-11 10:21:44 +03:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
just-check:
|
2022-10-11 00:38:48 +03:00
|
|
|
description: If set, benchmarks will be only checked to run correctly, not to measure actual performance.
|
2022-08-11 10:21:44 +03:00
|
|
|
required: true
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2022-07-05 23:03:29 +03:00
|
|
|
jobs:
|
|
|
|
benchmark-engine:
|
|
|
|
name: Benchmark Engine
|
|
|
|
runs-on:
|
|
|
|
- benchmark
|
|
|
|
steps:
|
|
|
|
- name: Setup conda (GH runners only)
|
|
|
|
uses: s-weigand/setup-conda@v1.0.5
|
2022-10-11 00:38:48 +03:00
|
|
|
if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
|
2022-07-05 23:03:29 +03:00
|
|
|
with:
|
|
|
|
update-conda: false
|
2022-08-28 15:44:10 +03:00
|
|
|
conda-channels: anaconda, conda-forge
|
2022-07-05 23:03:29 +03:00
|
|
|
- name: Installing wasm-pack
|
|
|
|
uses: jetli/wasm-pack-action@v0.3.0
|
2022-10-11 00:38:48 +03:00
|
|
|
if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
|
2022-07-05 23:03:29 +03:00
|
|
|
with:
|
|
|
|
version: v0.10.2
|
2022-10-11 00:38:48 +03:00
|
|
|
- name: Expose Artifact API and context information.
|
2022-07-05 23:03:29 +03:00
|
|
|
uses: actions/github-script@v6
|
|
|
|
with:
|
2022-10-11 00:38:48 +03:00
|
|
|
script: "\n core.exportVariable(\"ACTIONS_RUNTIME_TOKEN\", process.env[\"ACTIONS_RUNTIME_TOKEN\"])\n core.exportVariable(\"ACTIONS_RUNTIME_URL\", process.env[\"ACTIONS_RUNTIME_URL\"])\n core.exportVariable(\"GITHUB_RETENTION_DAYS\", process.env[\"GITHUB_RETENTION_DAYS\"])\n console.log(context)\n "
|
2022-08-28 15:44:10 +03:00
|
|
|
- name: Workaround for https://github.com/actions/checkout/issues/590 (Windows)
|
2022-10-11 00:38:48 +03:00
|
|
|
run: '"c:\Program Files\Git\bin\bash.exe" -c "git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :"'
|
2022-08-28 15:44:10 +03:00
|
|
|
if: runner.os == 'Windows'
|
2022-07-27 05:37:47 +03:00
|
|
|
shell: cmd
|
2022-08-28 15:44:10 +03:00
|
|
|
- name: Workaround for https://github.com/actions/checkout/issues/590 (non-Windows)
|
2022-10-11 00:38:48 +03:00
|
|
|
run: "git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :"
|
2022-08-28 15:44:10 +03:00
|
|
|
if: runner.os != 'Windows'
|
2022-07-27 05:37:47 +03:00
|
|
|
shell: bash
|
2022-07-05 23:03:29 +03:00
|
|
|
- name: Checking out the repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
2022-08-25 01:46:36 +03:00
|
|
|
clean: false
|
2022-09-02 23:02:44 +03:00
|
|
|
submodules: recursive
|
2022-07-05 23:03:29 +03:00
|
|
|
- name: Build Script Setup
|
2022-08-28 15:44:10 +03:00
|
|
|
run: ./run --help
|
2022-07-05 23:03:29 +03:00
|
|
|
env:
|
2022-08-28 15:44:10 +03:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-10-11 00:38:48 +03:00
|
|
|
- name: Clean before
|
|
|
|
run: ./run git-clean
|
|
|
|
if: "contains(github.event.pull_request.labels.*.name, 'CI: Clean build required')"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-08-28 15:44:10 +03:00
|
|
|
- run: ./run backend benchmark runtime
|
2022-07-05 23:03:29 +03:00
|
|
|
env:
|
2022-08-28 15:44:10 +03:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-08-10 04:41:44 +03:00
|
|
|
- name: List files if failed (Windows)
|
|
|
|
run: Get-ChildItem -Force -Recurse
|
2022-08-28 15:44:10 +03:00
|
|
|
if: failure() && runner.os == 'Windows'
|
2022-08-10 04:41:44 +03:00
|
|
|
- name: List files if failed (non-Windows)
|
|
|
|
run: ls -lAR
|
2022-08-28 15:44:10 +03:00
|
|
|
if: failure() && runner.os != 'Windows'
|
2022-10-11 00:38:48 +03:00
|
|
|
- name: Clean after
|
|
|
|
run: ./run git-clean
|
|
|
|
if: "always() && always() && contains(github.event.pull_request.labels.*.name, 'CI: Clean build required')"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-07-05 23:03:29 +03:00
|
|
|
env:
|
2022-10-11 00:38:48 +03:00
|
|
|
ENSO_BUILD_MINIMAL_RUN: ${{ true == inputs.just-check }}
|
2022-07-05 23:03:29 +03:00
|
|
|
ENSO_BUILD_SKIP_VERSION_CHECK: "true"
|