From f5e1f74f98ece02244143908c0575ca215f7530f Mon Sep 17 00:00:00 2001 From: "Victor M. Alvarez" Date: Tue, 30 Jul 2024 18:52:23 +0200 Subject: [PATCH] ci: use `maturin` 1.6.0 for building the source package. The latest version (1.7.0) has the following issue: https://github.com/PyO3/maturin/issues/2154 --- .github/workflows/release.yaml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ec2607776..6a4c1d1f9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: - build: windows os: windows-latest target: x86_64-pc-windows-msvc - + steps: - name: Checkout sources uses: actions/checkout@v4 @@ -74,7 +74,7 @@ jobs: with: name: yr-${{ matrix.target }} path: yara-x-* - + build-py: runs-on: ${{ matrix.os }} strategy: @@ -103,7 +103,7 @@ jobs: - build: windows os: windows-latest arch: 'x86 AMD64' - + steps: - name: Checkout sources uses: actions/checkout@v4 @@ -135,8 +135,10 @@ jobs: - name: Build sdist if: matrix.build == 'linux' && matrix.python-version == 'cp312' + # Using maturin 1.6.0 because the latest version (1.7.0) has the + # following issue: https://github.com/PyO3/maturin/issues/2154 run: | - pip install maturin build + pip install maturin==1.6.0 build python -m build --sdist -o wheelhouse py - name: Build ${{ matrix.platform || matrix.os }} binaries @@ -171,11 +173,11 @@ jobs: with: name: pypi-source-${{ strategy.job-index }} path: ./wheelhouse/*.tar.gz - + publish-cli: needs: [ build-cli ] runs-on: ubuntu-latest - + steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -191,7 +193,7 @@ jobs: with: draft: true files: yr-*/yara-x-* - + publish-crate: needs: [ publish-cli ] runs-on: ubuntu-latest @@ -203,7 +205,7 @@ jobs: env: # Don't re-generate the files `modules.rs` and `add_modules.rs`, use # the ones in the repository. These files can't be regenerated because - # `cargo publish` checks that the repository doesn't change during + # `cargo publish` checks that the repository doesn't change during # the build. See: https://github.com/rust-lang/cargo/pull/5584 YRX_REGENERATE_MODULES_RS: "no" run: | @@ -213,7 +215,7 @@ jobs: cargo publish -p yara-x-proto-yaml cargo publish -p yara-x-parser cargo publish -p yara-x - + publish-py: needs: [ build-py ] runs-on: ubuntu-latest