Skip to content

Commit

Permalink
Add sdist tests for well-known downstream repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Nov 13, 2023
1 parent daec153 commit c555ba0
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
workflow_call:
inputs:
repository:
required: true
type: string
manifest-dir:
required: true
type: string

jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Sccache Setup
uses: mozilla-actions/[email protected]
with:
version: "v0.5.3"
- name: Build maturin
env:
RUST_BACKTRACE: "1"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
run: cargo build
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
path: downstream
- name: maturin sdist
working-directory: downstream
run: |
../target/debug/maturin sdist --manifest-path ${{ inputs.manifest-dir }}/Cargo.toml -o target/sdist
- name: Build from sdist
working-directory: downstream
run: |
../target/debug/maturin build --manifest-path ${{ inputs.manifest-dir }}/Cargo.toml
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,29 @@ jobs:
# unset GITHUB_ACTIONS env var to disable zig and conda related tests
env -u GITHUB_ACTIONS cargo nextest run --features password-storage
test-downstream:
name: Test downstream - ${{ matrix.downstream.repository }}
if: ${{ contains(github.event.pull_request.labels.*.name, 'sdist') && github.event_name == 'pull_request' }}
uses: ./.github/workflows/downstream.yml
with:
repository: ${{ matrix.downstream.repository }}
manifest-dir: ${{ matrix.downstream.manifest-dir }}
strategy:
matrix:
downstream:
- repository: "pola-rs/polars"
manifest-dir: "py-polars"
- repository: "astral-sh/ruff"
manifest-dir: "crates/ruff_cli"
- repository: "crate-ci/typos"
manifest-dir: "crates/typos-cli"
- repository: "ast-grep/ast-grep"
manifest-dir: "crates/pyo3"
- repository: "oxigraph/oxigraph"
manifest-dir: "python"
- repository: "geoarrow/geoarrow-rs"
manifest-dir: "python/geoarrow-rust"

check:
name: Check ${{ matrix.platform.target }}
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -528,6 +551,7 @@ jobs:
- test-bootstrap
- test-msrv
- test-pyston
- test-downstream
- check
if: always()
runs-on: ubuntu-latest
Expand Down

0 comments on commit c555ba0

Please sign in to comment.