Skip to content

Commit

Permalink
chore(ci): force native extension build in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
art049 committed Dec 5, 2024
1 parent cc868a4 commit 3e853e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Install dependencies with pytest${{ matrix.pytest-version }}
run: |
if [ "${{ matrix.config }}" == "valgrind" ]; then
export PYTEST_CODSPEED_FORCE_EXTENSION=1
export PYTEST_CODSPEED_FORCE_EXTENSION_BUILD=1
fi
uv sync --all-extras --dev --locked --verbose
uv pip install "pytest${{ matrix.pytest-version }}"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:

- name: Build the library
run: uv build --wheel --out-dir dist/
env:
PYTEST_CODSPEED_FORCE_EXTENSION_BUILD: 1

- uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"arm64",
]

IS_EXTENSION_REQUIRED = os.environ.get("PYTEST_CODSPEED_FORCE_EXTENSION") is not None
IS_EXTENSION_REQUIRED = (
os.environ.get("PYTEST_CODSPEED_FORCE_EXTENSION_BUILD") is not None
)
if IS_EXTENSION_REQUIRED and not IS_EXTENSION_BUILDABLE:
raise ValueError(
"The extension is required but the current platform is not supported"
Expand Down

0 comments on commit 3e853e2

Please # to comment.