From 3f9810b45958130b51d08062251bd6b56b697ca6 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Sun, 16 Jun 2024 10:27:38 +0300 Subject: [PATCH] CI: add a CI run --- .github/workflows/run_x86.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/run_x86.yml diff --git a/.github/workflows/run_x86.yml b/.github/workflows/run_x86.yml new file mode 100644 index 00000000..3d29a549 --- /dev/null +++ b/.github/workflows/run_x86.yml @@ -0,0 +1,57 @@ +name: Benchmarks + +on: + push: + branches: + - main + +env: +# GITHUB_TOKEN: ${{ secrets.OB_BENCH_TOKEN }} +# BENCHMARKS_REPO: ev-br/ob-bench-asv + ASV_CONFIG: asv.conf.json + MACHINE_NAME: github-actions-x86 # to identify github actions machine as hostname changes everytime + +jobs: + build: + # This workflow only runs on the origin org + #if: github.repository_owner == 'sgkit-dev' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # To fetch all commits to be able to generate benchmarks html + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install dependencies + run: | + pip install numpy meson meson-python ninja build asv + # sudo apt install libopenblas-dev # XXX + # pip install scipy_openblas32 + # install a nightly OpenBLAS wheel + pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy-openblas32 + python -c'import scipy_openblas32 as so; print(so.get_pkg_config())' > scipy_openblas.pc + export PKG_CONFIG_PATH=$PWD + echo ">>>> PKG_CONFIG" $PKG_CONFIG_PATH + cat scipy_openblas.pc + + - name: Set and log asv machine configuration + run: | + asv machine --yes --config asv.conf.json + echo "Machine Configuration:" + cat ~/.asv-machine.json + rm ~/.asv-machine.json + + echo "Setting machine name to $MACHINE_NAME" + asv machine --machine $MACHINE_NAME --yes --config $ASV_CONFIG -v + cat ~/.asv-machine.json + + - name: Run benchmarks + run: | + echo ${{ github.workspace}} + asv run --config $ASV_CONFIG -v + env: + PKG_CONFIG_PATH: ${{ github.workspace }} + +