Skip to content

Commit e4bf16c

Browse files
committed
Build release packages with password-storage feature
1 parent 5901632 commit e4bf16c

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ jobs:
8787
if: matrix.target == 'x86_64-unknown-linux-musl'
8888
run: |
8989
# manylinux
90-
cargo run -- build --release -b bin -o dist --target ${{ matrix.target }}
90+
cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --cargo-extra-args="--features password-storage"
9191
# musllinux
92-
cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --no-sdist --compatibility musllinux_1_1
92+
cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --cargo-extra-args="--features password-storage" --no-sdist --compatibility musllinux_1_1
9393
9494
# ring doesn't support aarch64 windows yet
9595
- name: Build wheel (windows aarch64)
@@ -98,7 +98,7 @@ jobs:
9898

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

103103
- name: Build wheel (macOS universal2)
104104
if: matrix.target == 'x86_64-apple-darwin'
@@ -109,7 +109,7 @@ jobs:
109109
# set SDKROOT for C dependencies like ring and bzip2
110110
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
111111
rustup target add aarch64-apple-darwin
112-
cargo run -- build --release -b bin -o dist --no-sdist --universal2
112+
cargo run -- build --release -b bin -o dist --no-sdist --universal2 --cargo-extra-args="--features password-storage"
113113
114114
- name: Archive binary (windows)
115115
if: matrix.os == 'windows-latest'
@@ -173,17 +173,19 @@ jobs:
173173
CARGO_HOME: /root/.cargo
174174
steps:
175175
- uses: actions/checkout@v2
176-
- name: Build and publish wheel
176+
- name: Build wheel
177177
run: |
178178
sudo python3 -m pip install maturin
179179
# manylinux
180180
maturin build --release -b bin -o dist --no-sdist \
181181
--target ${{ matrix.platform.target }} \
182-
--manylinux ${{ matrix.platform.manylinux }}
182+
--manylinux ${{ matrix.platform.manylinux }} \
183+
--cargo-extra-args="--features password-storage"
183184
# musllinux
184185
maturin build --release -b bin -o dist --no-sdist \
185186
--target ${{ matrix.platform.target }} \
186-
--compatibility musllinux_1_1
187+
--compatibility musllinux_1_1 \
188+
--cargo-extra-args="--features password-storage"
187189
- name: Archive binary
188190
run: tar czvf target/release/maturin-${{ matrix.platform.target }}.tar.gz -C target/${{ matrix.platform.target }}/release maturin
189191
- name: Upload wheel artifacts
@@ -224,22 +226,22 @@ jobs:
224226
toolchain: stable
225227
override: true
226228
target: ${{ matrix.platform.target }}
227-
- name: Build and publish manylinux wheel
229+
- name: Build manylinux wheel
228230
run: |
229231
sudo python3 -m pip install maturin
230232
maturin build --release -b bin -o dist --no-sdist \
231233
--target ${{ matrix.platform.target }} \
232234
--manylinux ${{ matrix.platform.manylinux }} \
233235
--cargo-extra-args="--no-default-features" \
234-
--cargo-extra-args="--features log,upload,human-panic"
235-
- name: Build and publish musllinux wheel
236+
--cargo-extra-args="--features log,upload,human-panic,password-storage"
237+
- name: Build musllinux wheel
236238
if: matrix.platform.musllinux != ''
237239
run: |
238240
maturin build --release -b bin -o dist --no-sdist \
239241
--target ${{ matrix.platform.target }} \
240242
--compatibility ${{ matrix.platform.musllinux }} \
241243
--cargo-extra-args="--no-default-features" \
242-
--cargo-extra-args="--features log,upload,human-panic"
244+
--cargo-extra-args="--features log,upload,human-panic,password-storage"
243245
- name: Archive binary
244246
run: tar czvf target/release/maturin-${{ matrix.platform.target }}.tar.gz -C target/${{ matrix.platform.target }}/release maturin
245247
- name: Upload wheel artifacts

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ jobs:
8484
uses: actions-rs/cargo@v1
8585
with:
8686
command: test
87+
args: --features password-storage
8788
- name: cargo test with musl
8889
if: matrix.os == 'ubuntu-latest'
8990
uses: actions-rs/cargo@v1
9091
with:
9192
command: test
92-
args: --target x86_64-unknown-linux-musl
93+
args: --features password-storage --target x86_64-unknown-linux-musl
9394
- uses: actions/setup-python@v2
9495
with:
9596
python-version: "pypy-3.7"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ADD . /maturin/
2020
# Manually update the timestamps as ADD keeps the local timestamps and cargo would then believe the cache is fresh
2121
RUN touch /maturin/src/lib.rs /maturin/src/main.rs
2222

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

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ docker run --rm -v $(pwd):/io konstin2/maturin build --release # or other matur
238238
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.
239239
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.
240240

241-
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.
241+
maturin itself is manylinux compliant when compiled for the musl target.
242242

243243
## PyPy
244244

0 commit comments

Comments
 (0)