Bump codecov/codecov-action from 5.3.1 to 6.0.0 #533
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
| name: build_wheels+tests | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 13 * * 4' | |
| release: | |
| types: [published] | |
| jobs: | |
| debug_build_ok: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 # https://github.com/pypa/setuptools_scm/issues/480 | |
| - run: DEBUG=1 VERBOSE=1 pip install --verbose -e .[tests] | |
| - run: pytest -v -s -We -p no:unraisableexception tests | |
| zenodo_json: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: notiz-dev/github-action-json-property@release | |
| with: | |
| path: '.zenodo.json' | |
| prop_path: 'creators' | |
| build_wheels: | |
| needs: [debug_build_ok, zenodo_json] | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-14, macos-15, macos-15-intel, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| # download C and Fortran compiler on windows | |
| - if: matrix.os == 'windows-latest' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: false | |
| install: >- | |
| mingw-w64-x86_64-gcc-fortran | |
| mingw-w64-x86_64-ninja | |
| m4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel | |
| - name: Build and test wheels | |
| env: | |
| # skip 32-bit, musllinux, and free-threaded builds | |
| CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux* cp3??t-*" | |
| CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel | |
| CIBW_ENVIRONMENT_WINDOWS: CMAKE_ARGS="-DCMAKE_MAKE_PROGRAM=D:/a/_temp/msys64/mingw64/bin/ninja.exe" CMAKE_PROGRAM_PATH="D:/a/_temp/msys64/usr/bin" CMAKE_GENERATOR="Ninja" TEMP="D:/a/_temp/" | |
| CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair -w {dest_dir} {wheel} | |
| CIBW_BEFORE_BUILD_MACOS: brew reinstall gcc; pip install --only-binary=llvmlite llvmlite | |
| CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion` SYSTEM_VERSION_COMPAT=0 | |
| CIBW_TEST_REQUIRES: pytest pytest-order | |
| CIBW_TEST_COMMAND: pytest -v -s -We -p no:unraisableexception {package}/tests | |
| run: python -m cibuildwheel --output-dir dist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{matrix.os}}-${{matrix.manylinux}} | |
| path: dist | |
| run_example_notebooks: | |
| needs: [build_wheels] | |
| runs-on: ${{ matrix.os }} | |
| name: Run example notebooks on ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-14, macos-15, macos-15-intel, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5.0.0 | |
| with: | |
| python-version: "3.12" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist-${{matrix.os}}-${{matrix.manylinux}} | |
| path: dist | |
| # install fortran compiler needed by dustpy | |
| - if: startsWith(matrix.os, 'macos-') | |
| run: | | |
| brew reinstall gcc | |
| pip install --only-binary=llvmlite numba llvmlite!=0.46.0b1 | |
| # TODO #440 | |
| - if: startsWith(matrix.os, 'windows-') | |
| run: echo 'PYTEST_SKIP_ARGS=-k "not camp"' >> $GITHUB_ENV | |
| - run: | | |
| temp=`find dist/ -name "*cp312*.whl"` | |
| python -m pip install $temp[examples] | |
| ex -sc 'g/^PyPartMC/d' -cx .binder/requirements.txt | |
| python -m pip install --force-reinstall --no-deps $PIP_INSTALL_OPTS -r .binder/requirements.txt | |
| python -m pip install $PIP_INSTALL_OPTS -r gitmodules/devops_tests/requirements.txt | |
| GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python -m pytest --durations=10 ${{ env.PYTEST_SKIP_ARGS }} -v -s -We -p no:unraisableexception gitmodules/devops_tests/test_run_notebooks.py | |
| check_annotated_todos: | |
| runs-on: ubuntu-latest | |
| name: Check if todos are annotated | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - run: | | |
| python -m pip install pytest | |
| python -m pip install $PIP_INSTALL_OPTS -r gitmodules/devops_tests/requirements.txt | |
| GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python -m pytest --durations=10 -v -s -We -p no:unraisableexception gitmodules/devops_tests/test_todos_annotated.py | |
| dist_check: | |
| runs-on: ${{ matrix.os }} | |
| needs: [build_wheels] | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm] | |
| steps: | |
| - uses: actions/setup-python@v5.0.0 | |
| with: | |
| python-version: "3.11" | |
| - run: pip install twine auditwheel | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist-${{matrix.os}}-${{matrix.manylinux}} | |
| path: dist | |
| - run: twine check --strict dist/* | |
| - run: for i in dist/*-manylinux*.whl; do auditwheel show $i; done; | |
| make_sdist: | |
| name: Make source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Build source distribution | |
| run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-sdist | |
| path: dist/*.tar.gz | |
| check_sdist: | |
| name: Check if source wheels are compilable | |
| runs-on: ubuntu-latest | |
| needs: [make_sdist] | |
| steps: | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| pattern: cibw-sdist | |
| merge-multiple: true | |
| path: dist | |
| - run: ls -R | |
| - run: pip install --no-binary PyPartMC dist/pypartmc-*.tar.gz | |
| dist_upload: | |
| runs-on: ubuntu-latest | |
| needs: [build_wheels, check_sdist] | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| pattern: dist-* | |
| merge-multiple: true | |
| path: dist | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| pattern: cibw-* | |
| merge-multiple: true | |
| path: dist | |
| - run: | | |
| echo "github.event_name:" ${{ github.event_name }} | |
| echo "github.event.action:" ${{ github.event.action }} | |
| echo "github.event.prerelease:" ${{ github.event.prerelease }} | |
| echo "env.GITHUB_REF:" ${{ env.GITHUB_REF }} | |
| echo "env.GITHUB_REF:" ${{ env.GITHUB_REF_NAME }} | |
| - if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: pypa/gh-action-pypi-publish@release/v1.13 | |
| with: | |
| repository_url: https://test.pypi.org/legacy/ | |
| attestations: false | |
| verbose: true | |
| - if: github.event_name == 'release' && github.event.prerelease == false | |
| uses: pypa/gh-action-pypi-publish@release/v1.13 | |
| with: | |
| attestations: false |