diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a3213a8..9b033d5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,18 +17,23 @@ jobs: with: python-version: ${{ matrix.py_version }} architecture: x64 + - name: Install llvm-17 + run: brew install llvm@17 - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable default: true - - name: Build wheels - universal2 + - name: Build wheels run: | + eval "$(brew shellenv)" export MACOSX_DEPLOYMENT_TARGET=10.14 + export LIBCLANG_PATH=${HOMEBREW_PREFIX}/opt/llvm/lib rustup target add aarch64-apple-darwin pip install maturin - maturin build --release --target universal2-apple-darwin --out dist - - name: Install built wheel - universal2 + maturin build --release --target aarch64-apple-darwin --out dist + maturin build --release --target x86_64-apple-darwin --out dist + - name: Install built wheel run: | pip install rocksdict --no-index --find-links dist --force-reinstall || true pip install speedict --no-index --find-links dist --force-reinstall || true @@ -57,8 +62,8 @@ jobs: - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v1 with: - version: 11.0 - directory: ${{ runner.temp }}/llvm-11.0 + version: 17.0 + directory: ${{ runner.temp }}/llvm-17.0 - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: @@ -70,7 +75,7 @@ jobs: target: ${{ matrix.target }} args: --release --out dist env: - LIBCLANG_PATH: ${{ runner.temp }}/llvm-11.0/lib + LIBCLANG_PATH: ${{ runner.temp }}/llvm-17.0/lib - name: Install built wheel and test run: | pip install rocksdict --no-index --find-links dist --force-reinstall || true diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 522fafd..8312e5a 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -17,18 +17,23 @@ jobs: with: python-version: ${{ matrix.py_version }} architecture: x64 + - name: Install llvm-17 + run: brew install llvm@17 - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable default: true - - name: Build wheels - universal2 + - name: Build wheels run: | + eval "$(brew shellenv)" export MACOSX_DEPLOYMENT_TARGET=10.14 + export LIBCLANG_PATH=${HOMEBREW_PREFIX}/opt/llvm/lib rustup target add aarch64-apple-darwin pip install maturin - maturin build --release --target universal2-apple-darwin --out dist - - name: Install built wheel - universal2 + maturin build --release --target aarch64-apple-darwin --out dist + maturin build --release --target x86_64-apple-darwin --out dist + - name: Install built wheel run: | pip install rocksdict --no-index --find-links dist --force-reinstall || true pip install speedict --no-index --find-links dist --force-reinstall || true @@ -57,8 +62,8 @@ jobs: - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v1 with: - version: 11.0 - directory: ${{ runner.temp }}/llvm-11.0 + version: 17.0 + directory: ${{ runner.temp }}/llvm-17.0 - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: @@ -70,7 +75,7 @@ jobs: target: ${{ matrix.target }} args: --release --out dist env: - LIBCLANG_PATH: ${{ runner.temp }}/llvm-11.0/lib + LIBCLANG_PATH: ${{ runner.temp }}/llvm-17.0/lib - name: Install built wheel and test run: | pip install rocksdict --no-index --find-links dist --force-reinstall || true diff --git a/Cargo.toml b/Cargo.toml index 320461b..d839ebf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,3 +23,9 @@ libc = "0.2.112" [dependencies.pyo3] version = "0.20" features = ["extension-module", "num-bigint"] + +[profile.release] +codegen-units = 1 +debug = false +lto = true +opt-level = 3