Skip to content

Commit

Permalink
Bump libcramjam and simplify CI (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger authored May 2, 2024
1 parent aff4898 commit 024c2b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,32 +126,12 @@ jobs:
if: runner.os == 'macOS'
run: |
brew install ninja
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> $GITHUB_ENV
echo "BLOSC2_INSTALL_PREFIX=$(pwd)/blosc2" >> $GITHUB_ENV
echo "DYLD_FALLBACK_LIBRARY_PATH=$(pwd)/blosc2/lib64:$(pwd)/blosc2/lib" >> $GITHUB_ENV
- name: Setup (Windows)
if: runner.os == 'Windows'
env:
BLOSC2_INSTALL_PREFIX: ${{ github.workspace }}/blosc2
run: |
choco install ninja cmake
rustup target add i686-pc-windows-msvc
echo "BLOSC2_INSTALL_PREFIX=$Env:BLOSC2_INSTALL_PREFIX" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
$Env:PATH += ";$Env:BLOSC2_INSTALL_PREFIX\lib;$Env:BLOSC2_INSTALL_PREFIX\lib64;$Env:BLOSC2_INSTALL_PREFIX\bin"
echo "PATH=$Env:PATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
$Env:LIBPATH += ";$Env:BLOSC2_INSTALL_PREFIX\lib;$Env:BLOSC2_INSTALL_PREFIX\lib64;$Env:BLOSC2_INSTALL_PREFIX\bin"
echo "LIBPATH=$Env:LIBPATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
$Env:LIB += ";$Env:BLOSC2_INSTALL_PREFIX\lib;$Env:BLOSC2_INSTALL_PREFIX\lib64;$Env:BLOSC2_INSTALL_PREFIX\bin"
echo "LIB=$Env:LIB" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup (Linux)
if: runner.os == 'Linux'
Expand Down Expand Up @@ -199,10 +179,7 @@ jobs:
-i python \
--release \
--out wheels \
--target ${{ matrix.conf.target-triple }} \
--no-default-features \
--features extension-module \
--features blosc2-static
--target ${{ matrix.conf.target-triple }}
name=$(ls -1 wheels/ | head -n 1)
delvewheel repair -v wheels/$name -w dist
Expand All @@ -212,19 +189,13 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.conf.target-triple }}
# OSX complains with __cpu_model from blosc2 statically compiled so only enabled shared
args: -i python --release --out dist --no-default-features --features extension-module --features blosc2-shared
args: -i python --release --out dist

- name: Fix wheel (MacOS)
if: runner.os == 'macOS'
run: |
python -m pip install delocate
delocate-wheel -v dist/*.whl
# Remove pointers back to built lib location to ensure tests later don't link back
unset DYLD_FALLBACK_LIBRARY_PATH
unset BLOSC2_INSTALL_PREFIX
rm -rf $BLOSC2_INSTALL_PREFIX
- name: Install built wheel and Test (Native)
# TODO: I'm not sure but the actual collection of tests on windows using pypy3.10 takes forever and/or fails
Expand Down
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ crate-type = ["cdylib"]
default = ["extension-module"]
extension-module = ["pyo3/extension-module"]
generate-import-lib = ["pyo3/generate-import-lib"] # needed for Windows PyPy builds

blosc2-static = ["libcramjam/blosc2-static"]
blosc2-shared = ["libcramjam/blosc2-shared"]
use-system-blosc2 = ["libcramjam/use-system-blosc2"]


[dependencies]
pyo3 = { version = "^0.20", default-features = false, features = ["macros"] }
libcramjam = { version = "^0.4" }
libcramjam = { version = "0.4.2" }

[build-dependencies]
pyo3-build-config = "^0.20"
Expand Down

0 comments on commit 024c2b8

Please sign in to comment.