diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a1498e9d..e6b7a7d6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 @@ -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' diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 00000000..2e94053f --- /dev/null +++ b/Cross.toml @@ -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" +]