Skip to content

adding_MinGW_build_support #375

adding_MinGW_build_support

adding_MinGW_build_support #375

Workflow file for this run

name: Benchmarks
on:
pull_request:
push:
tags:
- "v*.*.*"
branches:
- master
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
benchmark-unix:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
env:
LTTNG_UST_REGISTER_TIMEOUT: 0
NUGET_XMLDOC_MODE: skip
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Export XCode SDK Root
if: matrix.os == 'macos-latest'
run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
# TODO: Add support for NetCore Bench
- name: Set up the environment
run: |
sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS
env:
METACALL_INSTALL_OPTIONS: base python nodejs ruby # TODO: Implement NetCore once it works with MacOS
- name: Configure
run: |
mkdir -p build
cd build
if [ "$(uname)" == "Darwin" ]; then
. .env
fi
bash ../tools/metacall-configure.sh $METACALL_CONFIGURE_OPTIONS
env:
METACALL_CONFIGURE_OPTIONS: release scripts python nodejs ruby benchmarks # TODO: Implement NetCore once it works with MacOS
- name: Build
working-directory: ./build
# TODO: Remove the disable option for fork safe once funchook problem is solved
run: |
if [ "$(uname)" == "Darwin" ]; then
. .env
fi
cmake -DOPTION_FORK_SAFE=OFF ..
bash ../tools/metacall-build.sh $METACALL_BUILD_OPTIONS
env:
METACALL_BUILD_OPTIONS: release benchmarks
- name: Merge benchmarks
if: ${{ github.event_name != 'pull_request' }}
run: python3 ./tools/metacall-benchmarks-merge.py ./build/benchmarks
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: ${{ github.event_name != 'pull_request' }}
with:
name: MetaCall Benchmark (${{ matrix.os }})
tool: 'googlecpp'
output-file-path: ./build/benchmarks/metacall-benchmarks.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.BENCHMARKS_PUSH_TOKEN }}
# Disable push and deploy GitHub pages branch automatically
auto-push: false
# Github Pages repository name
gh-repository: github.com/metacall/core-benchmarks
# Github Pages branch name
gh-pages-branch: main
# Output directory
benchmark-data-dir-path: ./${{ matrix.os }}
- name: Push benchmark result
if: ${{ github.event_name != 'pull_request' }}
run: |
cd benchmark-data-repository
git push https://[email protected]/metacall/core-benchmarks.git
env:
REPO_KEY: ${{secrets.BENCHMARKS_PUSH_TOKEN}}
benchmark-windows:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2019]
env:
LTTNG_UST_REGISTER_TIMEOUT: 0
NUGET_XMLDOC_MODE: skip
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Activate the Visual Studio Developer Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Set up the environment
run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS"
env:
METACALL_INSTALL_OPTIONS: python nodejs ruby # TODO: Implement NetCore once it works with Windows
# TODO: Use release when this bug is solved: https://github.com/metacall/core/issues/461
- name: Configure
run: |
$METACALL_PATH = $PWD
md -Force "$METACALL_PATH\build"
cd "$METACALL_PATH\build"
cmd.exe /c "powershell ..\tools\metacall-configure.ps1 $Env:METACALL_BUILD_OPTIONS"
env:
METACALL_BUILD_OPTIONS: debug scripts python nodejs ruby benchmarks # TODO: Implement NetCore once it works with Windows
# TODO: Use release when this bug is solved: https://github.com/metacall/core/issues/461
- name: Build
working-directory: ./build
run: cmd.exe /c "powershell ..\tools\metacall-build.ps1 $Env:METACALL_BUILD_OPTIONS"
env:
METACALL_BUILD_OPTIONS: debug benchmarks
- name: Merge benchmarks
if: ${{ github.event_name != 'pull_request' }}
run: python3 ./tools/metacall-benchmarks-merge.py ./build/benchmarks
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: ${{ github.event_name != 'pull_request' }}
with:
name: MetaCall Benchmark (${{ matrix.os }})
tool: 'googlecpp'
output-file-path: ./build/benchmarks/metacall-benchmarks.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.BENCHMARKS_PUSH_TOKEN }}
# Disable push and deploy GitHub pages branch automatically
auto-push: false
# Github Pages repository name
gh-repository: github.com/metacall/core-benchmarks
# Github Pages branch name
gh-pages-branch: main
# Output directory
benchmark-data-dir-path: ./${{ matrix.os }}
- name: Push benchmark result
if: ${{ github.event_name != 'pull_request' }}
run: |
cd benchmark-data-repository
git push https://${REPO_KEY}@github.com/metacall/core-benchmarks.git
env:
REPO_KEY: ${{secrets.BENCHMARKS_PUSH_TOKEN}}