From 9cd33458edd4718d44254c46cd1a59955c6ee56a Mon Sep 17 00:00:00 2001 From: Miles Granger Date: Thu, 11 Apr 2024 14:41:28 +0200 Subject: [PATCH] Try to simplify native build ci --- .github/workflows/CI.yml | 54 ++++------------------------------------ blosc2-sys/Cargo.toml | 9 +++++++ 2 files changed, 14 insertions(+), 49 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7a9384b..23d4286 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -90,54 +90,10 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - - name: Install packages (macOS) - if: runner.os == 'macOS' - run: | - echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion)" >> $GITHUB_ENV - brew install ninja - - - name: Install packages (Windows) - if: runner.os == 'Windows' - run: choco install ninja cmake - - - name: Install packages (Ubuntu) - if: runner.os == 'Linux' - run: | - sudo apt update - sudo apt install ninja-build -y - - - name: Set up Clang (Ubuntu) - if: runner.os == 'Linux' - uses: egor-tensin/setup-clang@v1 - with: - version: 17 - - - name: Set Env (non-Windows) - if: runner.os != 'Windows' - # Cannot set dynamic link path from build.rs - # So cargo test --lib works, but cargo test --doc fails to load shared library - # xref: https://github.com/rust-lang/cargo/issues/4895 - run: | - echo "BLOSC2_INSTALL_PREFIX=$(pwd)/build" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=$(pwd)/build/lib64:$(pwd)/build/lib" >> $GITHUB_ENV - echo "DYLD_FALLBACK_LIBRARY_PATH=$(pwd)/build/lib64:$(pwd)/build/lib" >> $GITHUB_ENV - - - name: Set Env (Windows) - if: runner.os == 'Windows' - # Cannot set dynamic link path from build.rs - # So cargo test --lib works, but cargo test --doc fails to load shared library - # xref: https://github.com/rust-lang/cargo/issues/4895 - run: | - echo "BLOSC2_INSTALL_PREFIX=${{ github.workspace }}\build" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - $Env:PATH += ";${{ github.workspace }}\build\lib;${{ github.workspace }}\build\lib64;${{ github.workspace }}\build\bin" - echo "PATH=$Env:PATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - $Env:LIBPATH += ";${{ github.workspace }}\build\lib;${{ github.workspace }}\build\lib64;${{ github.workspace }}\build\bin" - echo "LIBPATH=$Env:LIBPATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - $Env:LIB += ";${{ github.workspace }}\build\lib;${{ github.workspace }}\build\lib64;${{ github.workspace }}\build\bin" - echo "LIB=$Env:LIB" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - name: Test + if: matrix.os != "macos-13" run: cargo test + + - name: Test (macos-13) + if: matrix.os == "macos-13" + run: cargo test --no-default-features # turn of static linking, fails w/ 'Undefined symbols: __cpu_model' diff --git a/blosc2-sys/Cargo.toml b/blosc2-sys/Cargo.toml index 9479eba..0643af8 100644 --- a/blosc2-sys/Cargo.toml +++ b/blosc2-sys/Cargo.toml @@ -5,6 +5,15 @@ edition = "2021" description = "Bindings to C Blosc2" license = "MIT" links = "blosc2" +exclude = [ + "c-blosc2/compat/**", + "c-blosc2/tests/**", + "c-blosc2/bench/**", + "c-blosc2/internal-complibs/zlib-ng-2.0.7/contrib/**", + "c-blosc2/internal-complibs/zlib-ng-2.0.7/examples/**", + "c-blosc2/internal-complibs/zlib-ng-2.0.7/doc/**", + "c-blosc2/internal-complibs/zstd-1.5.5/legacy/**", +] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html