| 1 |
on: |
| 2 |
workflow_call: |
| 3 |
inputs: |
| 4 |
repository: |
| 5 |
required: true |
| 6 |
type: string |
| 7 |
manifest-dir: |
| 8 |
required: true |
| 9 |
type: string |
| 10 |
|
| 11 |
jobs: |
| 12 |
sdist: |
| 13 |
runs-on: ubuntu-latest |
| 14 |
steps: |
| 15 |
- uses: actions/checkout@v4 |
| 16 |
- name: Sccache Setup |
| 17 |
uses: mozilla-actions/[email protected] |
| 18 |
with: |
| 19 |
version: "v0.10.0" |
| 20 |
- name: Build maturin |
| 21 |
env: |
| 22 |
RUST_BACKTRACE: "1" |
| 23 |
SCCACHE_GHA_ENABLED: "true" |
| 24 |
RUSTC_WRAPPER: "sccache" |
| 25 |
run: cargo build |
| 26 |
- uses: actions/checkout@v4 |
| 27 |
with: |
| 28 |
repository: ${{ inputs.repository }} |
| 29 |
submodules: "recursive" |
| 30 |
path: downstream |
| 31 |
- name: maturin sdist |
| 32 |
working-directory: downstream |
| 33 |
run: | |
| 34 |
../target/debug/maturin sdist --manifest-path ${{ inputs.manifest-dir }}/Cargo.toml -o target/sdist |
| 35 |
- name: Build from sdist |
| 36 |
working-directory: downstream |
| 37 |
run: | |
| 38 |
../target/debug/maturin build --manifest-path ${{ inputs.manifest-dir }}/Cargo.toml |