chore(deps): update github artifact actions (major) #283
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # some code from https://github.com/pydantic/pydantic-core/blob/d6e7890b36ef21cb28180a7f5b1479da2319012d/.github/workflows/ci.yml | |
| # MIT License, see author list by link | |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "**" | |
| pull_request: {} | |
| jobs: | |
| test: | |
| name: test ${{ matrix.python-version }} pandas ${{ matrix.pandas-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| pandas-version: | |
| - "2.2.*" | |
| - "2.3.*" | |
| include: | |
| # https://github.com/pandas-dev/pandas/issues/42509 | |
| - python-version: "pypy3.11" | |
| pandas-version: "none" | |
| # https://github.com/pandas-dev/pandas/issues/60016 | |
| - python-version: "3.13t" | |
| pandas-version: "none" | |
| # https://github.com/pandas-dev/pandas/issues/60016 | |
| - python-version: "3.14t" | |
| pandas-version: "none" | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTHON: ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: install rust stable | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - id: cache-rust | |
| name: cache rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: v3 | |
| - name: set up python | |
| uses: actions/setup-python@v6 | |
| if: "${{ !matrix.disable-gil }}" | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - id: cache-py | |
| name: cache python | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ env.pythonLocation }} | |
| key: > | |
| py | |
| ${{ runner.os }} | |
| ${{ matrix.python-version }} | |
| ${{ matrix.pandas-version }} | |
| - run: | | |
| if [ ${{ matrix.pandas-version }} == 'none' ]; then | |
| pip install pytest | |
| else | |
| pip install pytest pandas[excel]==${{ matrix.pandas-version }} | |
| fi | |
| if: steps.cache-py.outputs.cache-hit != 'true' | |
| - run: pip install -e . | |
| env: | |
| RUST_BACKTRACE: 1 | |
| - run: pip freeze | |
| - run: pytest | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: install rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: cache rust | |
| uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - uses: actions/cache@v5 | |
| id: cache-py | |
| name: cache python | |
| with: | |
| path: ${{ env.pythonLocation }} | |
| key: > | |
| py | |
| ${{ env.pythonLocation }} | |
| - run: pip install pre-commit mypy | |
| if: steps.cache-py.outputs.cache-hit != 'true' | |
| - run: pip install . | |
| if: steps.cache-py.outputs.cache-hit != 'true' | |
| - run: pip freeze | |
| - run: pre-commit run --all-files | |
| # https://github.com/marketplace/actions/alls-green#why used for branch protection checks | |
| check: | |
| if: always() | |
| needs: [test, lint] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} | |
| build: | |
| name: build on ${{ matrix.os }} (${{ matrix.target }} - ${{ matrix.interpreter || 'all' }}${{ matrix.os == 'linux' && format(' - {0}', matrix.manylinux == 'auto' && 'manylinux' || matrix.manylinux) || '' }}) | |
| if: success() | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [linux, macos, windows] | |
| target: [undefined] | |
| manylinux: [auto] | |
| include: | |
| # manylinux for various platforms | |
| - os: linux | |
| manylinux: auto | |
| target: x86_64 | |
| - os: linux | |
| manylinux: auto | |
| target: aarch64 | |
| - os: linux | |
| manylinux: auto | |
| target: i686 | |
| - os: linux | |
| manylinux: auto | |
| target: armv7 | |
| interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t | |
| - os: linux | |
| manylinux: auto | |
| target: ppc64le | |
| interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t | |
| - os: linux | |
| manylinux: auto | |
| target: s390x | |
| interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t | |
| # musllinux | |
| - os: linux | |
| manylinux: musllinux_1_1 | |
| target: x86_64 | |
| - os: linux | |
| manylinux: musllinux_1_1 | |
| target: aarch64 | |
| - os: linux | |
| manylinux: musllinux_1_1 | |
| target: armv7 | |
| # macos | |
| - os: macos | |
| target: x86_64 | |
| - os: macos | |
| target: aarch64 | |
| # windows | |
| - os: windows | |
| target: x86_64 | |
| - os: windows | |
| target: i686 | |
| interpreter: 3.10 3.11 3.12 3.13 3.14 | |
| - os: windows | |
| target: aarch64 | |
| runs-on: windows-11-arm | |
| interpreter: 3.11 3.12 3.13 3.13t 3.14 3.14t | |
| exclude: | |
| # was just a dummy variable to set a default value for target | |
| - target: undefined | |
| runs-on: ${{ matrix.runs-on || format('{0}-latest', (matrix.os == 'linux' && 'ubuntu') || matrix.os) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: set up python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: install rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - run: pip install -U twine | |
| - name: build sdist | |
| if: ${{ matrix.os == 'linux' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }} | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| rust-toolchain: stable | |
| - name: build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| manylinux: ${{ matrix.manylinux || 'auto' }} | |
| args: --release --out dist --interpreter ${{ matrix.interpreter || '3.10 3.11 3.12 3.13 3.13t 3.14 3.14t pypy3.11' }} | |
| rust-toolchain: stable | |
| - run: ${{ (matrix.os == 'windows' && 'dir') || 'ls -lh' }} dist/ | |
| - run: twine check --strict dist/* | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux || 'auto' }} | |
| path: dist | |
| release: | |
| needs: [build, check] | |
| if: success() && startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: release | |
| url: https://pypi.org/p/python-calamine/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download All Artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: dist | |
| pattern: wheels-* | |
| merge-multiple: true | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| gh-release: | |
| needs: [build, check] | |
| if: success() && startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download All Artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: dist | |
| pattern: wheels-* | |
| merge-multiple: true | |
| - name: Upload to GitHub | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| dist/* |