Skip to content

Commit a766bd5

Browse files
authored
use SETUPTOOLS_RUST_CARGO_PROFILE=dev for main matrix, document it (#527)
* use `SETUPTOOLS_RUST_CARGO_PROFILE=dev` for main matrix, document it * also set a common target dir
1 parent 229c492 commit a766bd5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
1010
cancel-in-progress: true
1111

12+
# Setting a fixed target dir ensures that all builds of examples re-use the same common dependencies
13+
env:
14+
CARGO_TARGET_DIR: ${{ github.workspace }}/target
15+
1216
jobs:
1317
ruff:
1418
runs-on: "ubuntu-latest"
@@ -110,6 +114,8 @@ jobs:
110114
rust-target: "aarch64-apple-darwin",
111115
}
112116

117+
env:
118+
SETUPTOOLS_RUST_CARGO_PROFILE: dev
113119
steps:
114120
- uses: actions/checkout@v4
115121

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ python
107107
# ... better write some tests with pytest ...
108108
```
109109

110+
## Environment variables for configuration
111+
112+
As well as all [environment variables supported by Cargo](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-reads), `setuptools-rust` also supports the following:
113+
114+
- `SETUPTOOLS_RUST_CARGO_PROFILE`: used to override the profile of the Rust build. Defaults to `release`, e.g. set to `dev` to do a debug build.
115+
110116
## Next steps and final remarks
111117

112118
- When you are ready to distribute your project, have a look on

0 commit comments

Comments
 (0)