Skip to content

Fix benchmark CI #609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions .github/actions/benchmark/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,36 @@ runs:
- name: Checkout commit which performance should be measured
shell: bash
run: |
git restore .
git fetch origin ${{ inputs.ref }} --depth 1
git checkout ${{ inputs.ref }}

- name: Configure
- name: Build wheel
shell: bash
env:
CIBW_BUILD_VERBOSITY: 1
run: |
cmake -S . -B build \
-DBUILD_PYTHON=ON \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
python -m cibuildwheel --only cp312-manylinux_x86_64 --output-dir ./wheelhouse python/

- name: Build
- name: Install local wheel
shell: bash
run: |
cmake \
--build build \
--config Release \

- name: Set PYTHONPATH
shell: bash
run: echo "PYTHONPATH=$(pwd)/python" >> $GITHUB_ENV
pip install ./wheelhouse/*.whl
rm -f ./wheelhouse/*.whl

- name: Checkout current commit which contains all tests to run
shell: bash
run: git checkout ${{ github.sha }}

# assure that local segyio doesn't take priority (one installed to pip is used)
- name: Remove local segyio
shell: bash
working-directory: python
run: |
python -c "import segyio; import inspect; print('before: segyio loaded from ' + inspect.getfile(segyio))"
rm -rf $(pwd)/segyio
python -c "import segyio; import inspect; print('after: segyio loaded from ' + inspect.getfile(segyio))"

- name: Make segy file
shell: bash
working-directory: python
Expand Down Expand Up @@ -79,4 +83,6 @@ runs:

- name: Remove build artifacts
shell: bash
run: git clean -df --exclude=.benchmarks
run: |
git clean -df --exclude=.benchmarks
pip uninstall -y segyio
4 changes: 3 additions & 1 deletion .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install cibuildwheel
run: python3 -m pip install cibuildwheel

- name: Install build/test dependencies
shell: bash
working-directory: python
run: |
python3 -m pip install -r requirements-dev.txt
Expand Down