Skip to content

build(deps): bump serde from 1.0.214 to 1.0.215 #757

build(deps): bump serde from 1.0.214 to 1.0.215

build(deps): bump serde from 1.0.214 to 1.0.215 #757

Workflow file for this run

name: Python
on:
pull_request:
push:
branches: [main]
tags: ["v*.*.*"]
jobs:
build:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
type: [wheel]
include:
- os: ubuntu-latest
python-version: "3.8"
type: sdist
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Fetch Substrait submodule tags
working-directory: substrait
run: |
git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
git describe --dirty --tags
- name: Install latest protoc
uses: arduino/setup-protoc@v3
with:
version: "28.3"
# avoid rate-limiting
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install sdist-only dependencies
if: ${{ matrix.type == 'sdist' }}
uses: dtolnay/rust-toolchain@stable
- name: sdist-only build prep
if: ${{ matrix.type == 'sdist' }}
working-directory: rs
run: cargo check
# ^ this ensures that its build.rs is run, which is all we need. Sadly
# there doesn't seem to be a way to do this that doesn't pull in all
# normal dependencies: https://github.com/rust-lang/cargo/issues/7178
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python build dependencies
run: python3 -m pip install --upgrade pip "maturin>=0.14,<0.15"
- name: Prepare build environment
working-directory: py
run: python3 prepare_build.py populate
- name: Create sdist
if: ${{ matrix.type == 'sdist' }}
uses: PyO3/maturin-action@v1.45.0
with:
command: sdist
args: -o dist -m py/Cargo.toml
- name: Build manylinux wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'ubuntu-latest' }}
uses: PyO3/maturin-action@v1.45.0
with:
manylinux: auto
command: build
args: -i ${{ matrix.python-version }} --release -o dist -m py/Cargo.toml
# Download protoc into the container, for use in the build
before-script-linux: |
PROTOC_VERSION=28.3
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
unzip protoc-$PROTOC_VERSION-linux-x86_64.zip -d /usr/local
- name: Build Windows wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'windows-latest' }}
uses: PyO3/maturin-action@v1.45.0
with:
command: build
args: --release -o dist -m py/Cargo.toml
- name: Build MacOS wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'macos-latest' }}
uses: PyO3/maturin-action@v1.45.0
with:
command: build
args: --release -o dist --universal2 -m py/Cargo.toml
- name: Install runtime dependencies
run: python3 -m pip install --upgrade protobuf pytest click pyyaml jdot toml
- name: Install generated sdist
if: ${{ matrix.type == 'sdist' }}
run: python3 -m pip install dist/substrait_validator-*.tar.gz
- name: Install generated wheel
if: ${{ matrix.type == 'wheel' }}
run: python3 -m pip install --no-index --find-links=dist substrait-validator
- name: Test
working-directory: py/tests
run: python3 -m pytest
- name: Display structure of dist directory
run: ls -R dist
- name: Upload wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
# Ensure we have a different name for every artifact, by using the
# matrix components in the artifact name
name: binary-${{ matrix.type }}-${{ matrix.os }}-${{ matrix.python-version }}
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [build]
environment: VALIDATOR_RELEASE
steps:
- uses: actions/download-artifact@v4
with:
pattern: binary-*
# Download them all into the current directory
merge-multiple: true
- name: Display available artifacts
run: ls -R .
- name: Publish to GitHub release page
uses: softprops/action-gh-release@v2
with:
files: |
*.whl
*.tar.gz
- name: Publish to PyPI
uses: PyO3/maturin-action@v1.45.0
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *
fmt-lint:
name: Style & lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install --upgrade pip black==22.3.0 flake8==4.0.1
- name: Black
run: python3 -m black --diff --check .
- name: Flake8
run: python3 -m flake8 .