Skip to content

Commit

Permalink
Dump info about installed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Nov 19, 2024
1 parent 7727131 commit 73a1628
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch: # allows to trigger manually
schedule:
- cron: "0 5 * * 4" # Once a week at 0500 on Thursday

Expand Down Expand Up @@ -37,7 +41,11 @@ jobs:
with:
repository: deshaw/versioned-hdf5
path: ./versioned-hdf5/
fetch-depth: 0 # Needed for asv to be able to run benchmarks on old commits
fetch-depth: 0 # Needed for asv to be able to run benchmarks on old commits

- name: Get commit hash
working-directory: ./versioned-hdf5
run: echo "PROJECT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
Expand All @@ -52,10 +60,18 @@ jobs:
- name: Install versioned-hdf5
working-directory: ./versioned-hdf5
run: |
echo "PROJECT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
conda install -n test pip hdf5 openmpi h5py ndindex -c conda-forge -y
conda run -n test pip install '.[bench]'
- name: Dump conda environment
run: conda list -n test

- name: Print hdf5 configuration
working-directory: ./versioned-hdf5-benchmarks
run: |
conda run -n test python -c 'import utils; utils.debug_libhdf5_so()'
conda run -n test h5cc -showconfig
- name: Run benchmarks
working-directory: ./versioned-hdf5
run: |
Expand Down Expand Up @@ -83,17 +99,18 @@ jobs:

- name: Generate html
working-directory: ./versioned-hdf5
run: |
conda run -n test asv publish -o ./html
run: conda run -n test asv publish -o ./html

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './versioned-hdf5/html'
path: ./versioned-hdf5/html
retention-days: 30

- name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
id: deployment
uses: actions/deploy-pages@v4
16 changes: 16 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os
import subprocess


def debug_libhdf5_so():
"""Print out which .so file is actually loaded at runtime for libhdf5"""
import h5py

for row in (
subprocess.check_output(["lsof", "-p", str(os.getpid())])
.decode("utf-8")
.splitlines()
):
row = row.strip()
if "libhdf5" in row:
print(row)

0 comments on commit 73a1628

Please sign in to comment.