Skip to content

Commit

Permalink
Update build scripts across the board
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Dec 5, 2023
1 parent 8ad9490 commit afeb894
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- name: Install package
run: |
pip install --verbose .
env:
CC: clang
CXX: clang++
- name: Test with pytest
run: |
python -m pytest tests/ --cov=primate --benchmark-skip
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Clang with OpenMP support
run: |
rm -rf /usr/local/bin/2to3*
sudo chown -R $(whoami) /usr/local
brew install --force libomp llvm > nul
brew install --force libomp llvm
- name: Update environment flags for Clang
run: |
export PATH="/usr/local/opt/llvm/bin:$PATH"
Expand Down Expand Up @@ -60,7 +58,7 @@ jobs:
pip install --verbose .
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
- name: Test with pytest
run: |
python -m pytest tests/ --cov=primate --benchmark-skip
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
# should also be able to do multi-archs on a single entry, e.g.
# [os-image, os-name, os-arch]
- [ubuntu-latest, manylinux, x86_64]
- [ubuntu-latest, musllinux, x86_64]
- [macos-latest, macosx, x86_64]
- [windows-latest, win, AMD64]
# os: [windows-latest]
Expand All @@ -44,6 +43,11 @@ jobs:
run: |
python -m pip install cibuildwheel
- name: Pre-run linux pre-build
if: runner.os == 'Linux'
run: |
bash {project}/tools/cibw_linux.sh {project}
- name: Set VSDev RC (windows only)
if: runner.os == 'Windows'
run: |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ setup = ['--default-library=static']
[tool.cibuildwheel]
test-requires = ["pytest", "pytest-cov", "pytest-benchmark"] # coverage-badge
test-command = ["coverage run --source={package} -m pytest {package}/tests", "coverage report -m"]
build-verbosity = 1
build-verbosity = 2
skip = "cp36-* cp37-* *_ppc64le *_i686 *_s390x *-musllinux*" # todo: revisit musllinux

[tool.cibuildwheel.macos]
Expand Down
4 changes: 3 additions & 1 deletion tools/repair_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ set -xe
WHEEL="$1"
DEST_DIR="$2"

## Need delvewheel for this
pip install delvewheel

# create a temporary directory in the destination folder and unpack the wheel into there
pushd $DEST_DIR
mkdir -p tmp
Expand All @@ -17,7 +20,6 @@ pushd primate*
# We therefore find each PYD in the directory structure and strip them.
for f in $(find ./primate* -name '*.pyd'); do strip $f; done


# now repack the wheel and overwrite the original
wheel pack .
mv -fv *.whl $WHEEL
Expand Down

0 comments on commit afeb894

Please sign in to comment.