Skip to content

Commit

Permalink
Try again after some adjustments - everything sad except OSX builds
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Sep 23, 2024
1 parent 263723a commit c7b7120
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,33 @@ jobs:
TARGET_TRIPLE: ${{ matrix.conf.target-triple }}
WORKSPACE: ${{ github.workspace }}
BLOSC2_INSTALL_PREFIX: ${{ github.workspace }}/blosc2
ISAL_INSTALL_PREFIX: ${{ github.workspace }}/isal
run: |
sudo apt update
sudo apt install ninja-build -y
echo "BLOSC2_INSTALL_PREFIX=$BLOSC2_INSTALL_PREFIX" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BLOSC2_INSTALL_PREFIX/lib:$BLOSC2_INSTALL_PREFIX/lib64" >> $GITHUB_ENV
echo "ISAL_INSTALL_PREFIX=$ISAL_INSTALL_PREFIX" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BLOSC2_INSTALL_PREFIX/lib:$BLOSC2_INSTALL_PREFIX/lib64:$ISAL_INSTALL_PREFIX/lib:$ISAL_INSTALL_PREFIX/lib64" >> $GITHUB_ENV
# maturin action fails building blosc2 for armv7 and aarch64
# so we'll just use 'cross' to build and pass it in for the action for all archs
# nothing special for the revision pin, just deterministic install
cargo install cross --git https://github.com/cross-rs/cross --rev 6d097fb
# Build blosc2
cross build --release --target $TARGET_TRIPLE --package blosc2-sys --target-dir build
blosc2_sys_dir=$(ls build/$TARGET_TRIPLE/release/build/ | grep blosc2-sys)
mv $WORKSPACE/build/$TARGET_TRIPLE/release/build/$blosc2_sys_dir/out $BLOSC2_INSTALL_PREFIX
tree -L 2 $BLOSC2_INSTALL_PREFIX
# Build isal
cross build --release --target $TARGET_TRIPLE --package isal-sys --target-dir build
isal_sys_dir=$(ls build/$TARGET_TRIPLE/release/build/ | grep isal-sys)
mv $WORKSPACE/build/$TARGET_TRIPLE/release/build/$isal_sys_dir/out $ISAL_INSTALL_PREFIX
tree -L 2 $ISAL_INSTALL_PREFIX
- name: Rust Tests
if: matrix.conf.target == 'x86_64' && !startsWith(matrix.python-version, 'pypy') && matrix.python-version == '3.12'
run: cargo test
Expand All @@ -139,9 +150,14 @@ jobs:
with:
target: ${{ matrix.conf.target }}
manylinux: ${{ matrix.conf.manylinux }}
docker-options: -e BLOSC2_INSTALL_PREFIX=${{ github.workspace }}/blosc2 -e LD_LIBRARY_PATH=${{ github.workspace }}/blosc2/lib:${{ github.workspace }}/blosc2/lib64
docker-options: |
-e BLOSC2_INSTALL_PREFIX=${{ github.workspace }}/blosc2 \
-e ISAL_INSTALL_PREFIX=${{ github.workspace }}/isal \
-e LD_LIBRARY_PATH=${{ github.workspace }}/blosc2/lib:${{ github.workspace }}/blosc2/lib64:${{ github.workspace }}/isal/lib:${{ github.workspace }}/isal/lib64
args: -i ${{ matrix.python-version }} --release --out dist --features use-system-blosc2-static
before-script-linux: ls -l $BLOSC2_INSTALL_PREFIX
before-script-linux: |
ls -l $BLOSC2_INSTALL_PREFIX
ls -l $ISAL_INSTALL_PREFIX
- name: Build wheel (Windows)
if: runner.os == 'Windows'
Expand Down
15 changes: 15 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[target.x86_64-unknown-linux-musl]
pre-build = [
"apt update",
"apt install -y nasm"
]
[target.s390x-unknown-linux-gnu]
pre-build = [
"apt update",
"apt install -y nasm"
]
[target.aarch64-unknown-linux-musl]
pre-build = [
"apt update",
"apt install -y nasm"
]

0 comments on commit c7b7120

Please sign in to comment.