CI workflow
This commit is contained in:
@@ -77,62 +77,20 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export CARGO_HOME="${{ runner.temp }}/cargo"
|
export CARGO_HOME="${{ runner.temp }}/cargo"
|
||||||
export PATH="$CARGO_HOME/bin:$PATH"
|
export PATH="$CARGO_HOME/bin:$PATH"
|
||||||
|
maturin sdist --out dist
|
||||||
maturin build --release --out dist --find-interpreter --target ${{ matrix.platform.target }}
|
maturin build --release --out dist --find-interpreter --target ${{ matrix.platform.target }}
|
||||||
|
|
||||||
- name: Upload wheels
|
- name: Upload wheels
|
||||||
uses: actions/upload-artifact@v3.2.2
|
uses: actions/upload-artifact@v3.2.2
|
||||||
with:
|
with:
|
||||||
name: wheels-linux-${{ matrix.platform.target }}
|
name: wheels-*
|
||||||
path: dist
|
|
||||||
|
|
||||||
sdist:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Cache Rust and sccache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
${{ runner.temp }}/cargo
|
|
||||||
${{ runner.temp }}/rustup
|
|
||||||
~/.cache/pip
|
|
||||||
~/.cache/pip-wheel
|
|
||||||
~/.cache/sccache
|
|
||||||
key: rust-cache-${{ matrix.platform.target }}-${{ hashFiles('**/Cargo.lock') }}-${{ runner.os }}-${{ github.ref }}
|
|
||||||
restore-keys: |
|
|
||||||
rust-cache-${{ matrix.platform.target }}-${{ runner.os }}-
|
|
||||||
rust-cache-${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Install sccache and maturin
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install maturin
|
|
||||||
if ! command -v sccache >/dev/null 2>&1; then
|
|
||||||
cargo install sccache || pip install sccache
|
|
||||||
fi
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Build wheels
|
|
||||||
run: |
|
|
||||||
export CARGO_HOME="${{ runner.temp }}/cargo"
|
|
||||||
export PATH="$CARGO_HOME/bin:$PATH"
|
|
||||||
maturin sdist --out dist
|
|
||||||
|
|
||||||
- name: Upload wheels
|
|
||||||
uses: actions/upload-artifact@v3.2.2
|
|
||||||
with:
|
|
||||||
name: wheels-sdist
|
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
||||||
needs: [linux, sdist]
|
needs: [linux]
|
||||||
permissions:
|
permissions:
|
||||||
# Use to sign the release artifacts
|
# Use to sign the release artifacts
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|||||||
Reference in New Issue
Block a user