Skip to content

bench

bench #20

Workflow file for this run

name: bench
on:
schedule:
- cron: '41 6 15 * *'
push:
branches: [bench]
paths: ".github/workflows/bench.yml"
workflow_dispatch:
jobs:
bench:
runs-on: ubuntu-latest
steps:
- name: Set pkgcraft dir env var
run: echo pkgcraft_dir=~/pkgcraft >> $GITHUB_ENV
- name: Download prebuilt pkgcraft-c library
id: download-artifact
uses: dawidd6/action-download-artifact@v3
with:
github_token: ${{ secrets.PKGCRAFT_CI_TOKEN }}
repo: pkgcraft/pkgcraft
branch: main
workflow: pkgcraft-c.yml
workflow_conclusion: ""
search_artifacts: true
name: pkgcraft-c-${{ runner.os }}
path: ${{ env.pkgcraft_dir }}
- name: Checkout code
uses: actions/checkout@v4
with:
repository: pkgcraft/pkgcraft-go
submodules: true
- name: Override build variables
run: |
echo "PKG_CONFIG_PATH=${pkgcraft_dir}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${pkgcraft_dir}/lib" >> $GITHUB_ENV
echo "DYLD_LIBRARY_PATH=${pkgcraft_dir}/lib" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Run benchmarks
run: go test -v -run='^$' -bench=. ./...