|
| 1 | +name: Benchmarks |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + |
| 8 | +env: |
| 9 | +# GITHUB_TOKEN: ${{ secrets.OB_BENCH_TOKEN }} |
| 10 | +# BENCHMARKS_REPO: ev-br/ob-bench-asv |
| 11 | + ASV_CONFIG: asv.conf.json |
| 12 | + MACHINE_NAME: github-actions-x86 # to identify github actions machine as hostname changes everytime |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + # This workflow only runs on the origin org |
| 17 | + #if: github.repository_owner == 'sgkit-dev' |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + with: |
| 22 | + fetch-depth: 0 # To fetch all commits to be able to generate benchmarks html |
| 23 | + - name: Set up Python ${{ matrix.python-version }} |
| 24 | + uses: actions/setup-python@v4 |
| 25 | + with: |
| 26 | + python-version: '3.11' |
| 27 | + - name: Install dependencies |
| 28 | + run: | |
| 29 | + pip install numpy meson meson-python ninja build asv |
| 30 | + # sudo apt install libopenblas-dev # XXX |
| 31 | + # pip install scipy_openblas32 |
| 32 | + # install a nightly OpenBLAS wheel |
| 33 | + pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy-openblas32 |
| 34 | + python -c'import scipy_openblas32 as so; print(so.get_pkg_config())' > scipy_openblas.pc |
| 35 | + export PKG_CONFIG_PATH=$PWD |
| 36 | + echo ">>>> PKG_CONFIG" $PKG_CONFIG_PATH |
| 37 | + cat scipy_openblas.pc |
| 38 | +
|
| 39 | + - name: Set and log asv machine configuration |
| 40 | + run: | |
| 41 | + asv machine --yes --config asv.conf.json |
| 42 | + echo "Machine Configuration:" |
| 43 | + cat ~/.asv-machine.json |
| 44 | + rm ~/.asv-machine.json |
| 45 | +
|
| 46 | + echo "Setting machine name to $MACHINE_NAME" |
| 47 | + asv machine --machine $MACHINE_NAME --yes --config $ASV_CONFIG -v |
| 48 | + cat ~/.asv-machine.json |
| 49 | +
|
| 50 | + - name: Run benchmarks |
| 51 | + run: | |
| 52 | + echo ${{ github.workspace}} |
| 53 | + asv run --config $ASV_CONFIG -v |
| 54 | + env: |
| 55 | + PKG_CONFIG_PATH: ${{ github.workspace }} |
| 56 | + |
| 57 | + |
0 commit comments