Skip to content

Commit

Permalink
Build release packages with password-storage feature
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 2, 2021
1 parent 5901632 commit 835f8ef
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ jobs:
if: matrix.target == 'x86_64-unknown-linux-musl'
run: |
# manylinux
cargo run -- build --release -b bin -o dist --target ${{ matrix.target }}
cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --cargo-extra-args="--features password-storage"
# musllinux
cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --no-sdist --compatibility musllinux_1_1
cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --cargo-extra-args="--features password-storage" --no-sdist --compatibility musllinux_1_1
# ring doesn't support aarch64 windows yet
- name: Build wheel (windows aarch64)
Expand All @@ -98,7 +98,7 @@ jobs:

- name: Build wheel (without sdist)
if: ${{ matrix.target != 'x86_64-unknown-linux-musl' && matrix.target != 'aarch64-pc-windows-msvc' }}
run: cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --no-sdist
run: cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --no-sdist --cargo-extra-args="--features password-storage"

- name: Build wheel (macOS universal2)
if: matrix.target == 'x86_64-apple-darwin'
Expand All @@ -109,7 +109,7 @@ jobs:
# set SDKROOT for C dependencies like ring and bzip2
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
rustup target add aarch64-apple-darwin
cargo run -- build --release -b bin -o dist --no-sdist --universal2
cargo run -- build --release -b bin -o dist --no-sdist --universal2 --cargo-extra-args="--features password-storage"
- name: Archive binary (windows)
if: matrix.os == 'windows-latest'
Expand Down Expand Up @@ -173,17 +173,19 @@ jobs:
CARGO_HOME: /root/.cargo
steps:
- uses: actions/checkout@v2
- name: Build and publish wheel
- name: Build wheel
run: |
sudo python3 -m pip install maturin
# manylinux
maturin build --release -b bin -o dist --no-sdist \
--target ${{ matrix.platform.target }} \
--manylinux ${{ matrix.platform.manylinux }}
--manylinux ${{ matrix.platform.manylinux }} \
--cargo-extra-args="--features password-storage"
# musllinux
maturin build --release -b bin -o dist --no-sdist \
--target ${{ matrix.platform.target }} \
--compatibility musllinux_1_1
--compatibility musllinux_1_1 \
--cargo-extra-args="--features password-storage"
- name: Archive binary
run: tar czvf target/release/maturin-${{ matrix.platform.target }}.tar.gz -C target/${{ matrix.platform.target }}/release maturin
- name: Upload wheel artifacts
Expand Down Expand Up @@ -224,22 +226,22 @@ jobs:
toolchain: stable
override: true
target: ${{ matrix.platform.target }}
- name: Build and publish manylinux wheel
- name: Build manylinux wheel
run: |
sudo python3 -m pip install maturin
maturin build --release -b bin -o dist --no-sdist \
--target ${{ matrix.platform.target }} \
--manylinux ${{ matrix.platform.manylinux }} \
--cargo-extra-args="--no-default-features" \
--cargo-extra-args="--features log,upload,human-panic"
- name: Build and publish musllinux wheel
--cargo-extra-args="--features log,upload,human-panic,password-storage"
- name: Build musllinux wheel
if: matrix.platform.musllinux != ''
run: |
maturin build --release -b bin -o dist --no-sdist \
--target ${{ matrix.platform.target }} \
--compatibility ${{ matrix.platform.musllinux }} \
--cargo-extra-args="--no-default-features" \
--cargo-extra-args="--features log,upload,human-panic"
--cargo-extra-args="--features log,upload,human-panic,password-storage"
- name: Archive binary
run: tar czvf target/release/maturin-${{ matrix.platform.target }}.tar.gz -C target/${{ matrix.platform.target }}/release maturin
- name: Upload wheel artifacts
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --features password-storage
- name: cargo test with musl
if: matrix.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
with:
command: test
args: --target x86_64-unknown-linux-musl
args: --features password-storage --target x86_64-unknown-linux-musl
- uses: actions/setup-python@v2
with:
python-version: "pypy-3.7"
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Add a `maturin init` command as a companion to `maturin new` in [#719](https://github.com/PyO3/maturin/pull/719)
* Don't package non-path-dep crates in sdist for workspaces in [#720](https://github.com/PyO3/maturin/pull/720)
* Build release packages with `password-storage` feature in [#725](https://github.com/PyO3/maturin/pull/725)

## [0.12.3] - 2021-11-29

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ADD . /maturin/
# Manually update the timestamps as ADD keeps the local timestamps and cargo would then believe the cache is fresh
RUN touch /maturin/src/lib.rs /maturin/src/main.rs

RUN cargo rustc --bin maturin --manifest-path /maturin/Cargo.toml --release -- -C link-arg=-s \
RUN cargo rustc --bin maturin --manifest-path /maturin/Cargo.toml --release --features password-storage -- -C link-arg=-s \
&& mv /maturin/target/release/maturin /usr/bin/maturin \
&& rm -rf /maturin

Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ docker run --rm -v $(pwd):/io konstin2/maturin build --release # or other matur
Note that this image is very basic and only contains python, maturin and stable rust. If you need additional tools, you can run commands inside the manylinux container.
See [konstin/complex-manylinux-maturin-docker](https://github.com/konstin/complex-manylinux-maturin-docker) for a small educational example or [nanoporetech/fast-ctc-decode](https://github.com/nanoporetech/fast-ctc-decode/blob/b226ea0f2b2f4f474eff47349703d57d2ea4801b/.github/workflows/publish.yml) for a real world setup.

maturin itself is manylinux compliant when compiled for the musl target. The binaries on the release pages have additional keyring integration (through the `password-storage` feature), which is not manylinux compliant.
maturin itself is manylinux compliant when compiled for the musl target.

## PyPy

Expand Down

0 comments on commit 835f8ef

Please sign in to comment.