diff --git a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml index 091c71b..c1be0be 100644 --- a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml +++ b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml @@ -11,59 +11,12 @@ on: workflow_dispatch: jobs: - coverage: - defaults: - run: - shell: bash -l {0} - - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-13, macos-14] - python-version: ["3.11", "3.12"] - env: - LATEST_PYTHON_VERSION: "3.12" - steps: - - name: Check out diffpy.pdffit2 - uses: actions/checkout@v4 - - - name: Initialize miniconda - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: test - auto-update-conda: true - environment-file: environment.yml - auto-activate-base: false - python-version: ${{ matrix.python-version }} - - - name: Conda config - run: >- - conda config --set always_yes yes - --set changeps1 no - - - name: Install diffpy.pdffit2 and requirements - run: | - conda install --file requirements/conda.txt - conda install --file requirements/test.txt - conda install --file requirements/build.txt - python -m pip install . --no-deps - - - name: Start Xvfb for ubuntu-latest only - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get install -y xvfb - export DISPLAY=:99 - Xvfb :99 -screen 0 1024x768x16 & - - - name: Validate diffpy.pdfffit2 - run: | - pytest --cov - coverage report -m - codecov - - - name: Upload coverage to Codecov - if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.LATEST_PYTHON_VERSION - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + matrix-coverage: + uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 + with: + project: diffpy.pdffit2 + python_versions: "3.11, 3.12" + c_extension: true + headless: false + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml deleted file mode 100644 index be7d237..0000000 --- a/.github/workflows/wheel.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Wheel builder - -on: - pull_request: - push: - workflow_dispatch: - -jobs: - build_wheels: - - defaults: - run: - shell: bash -l {0} - - name: Build wheel ${{ matrix.python[0] }}-${{ matrix.buildplat[0] }} - runs-on: ${{ matrix.buildplat[0] }} - strategy: - fail-fast: false - matrix: - buildplat: - - [ubuntu-latest, manylinux_x86_64] - - [macos-13, macosx_x86_64] - - [macos-14, macosx_arm64] - - [windows-latest, win_amd64] - python: - - ["3.11", "cp311"] - - ["3.12", "cp312"] - - steps: - - name: Check out #${{ inputs.project }} - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python[0] }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python[0] }} - - - name: Build wheels for Linux - if: runner.os == 'Linux' - uses: pypa/cibuildwheel@v2.21.1 - env: - CIBW_BUILD: ${{ matrix.python[1] }}-${{ matrix.buildplat[1] }} - CIBW_BEFORE_BUILD: yum install -y gsl-devel && pip install -e . - with: - output-dir: wheelhouse - - - name: Build wheels for macOS - if: runner.os == 'macOS' - uses: pypa/cibuildwheel@v2.21.1 - env: - CIBW_BUILD: ${{ matrix.python[1] }}-${{ matrix.buildplat[1] }} - MACOSX_DEPLOYMENT_TARGET: 13.0 - CIBW_BEFORE_BUILD: brew install gsl && pip install -e . - with: - output-dir: wheelhouse - - - name: Set up conda for Windows - if: runner.os == 'Windows' - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: gsl - auto-update-conda: true - environment-file: environment.yml - auto-activate-base: false - - - name: install gsl for Windows - if: runner.os == 'Windows' - run: | - conda config --set always_yes yes --set changeps1 no - conda install gsl - - - name: Build wheels for Windows - if: runner.os == 'Windows' - uses: pypa/cibuildwheel@v2.21.1 - env: - CIBW_BUILD: ${{ matrix.python[1] }}-${{ matrix.buildplat[1] }} - CONDA_PREFIX: ${{ env.CONDA_PREFIX }} - with: - output-dir: wheelhouse - - - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.python[0] }}-${{ matrix.buildplat[0] }} - path: ./wheelhouse/*.whl diff --git a/news/wf.rst b/news/wf.rst new file mode 100644 index 0000000..622844e --- /dev/null +++ b/news/wf.rst @@ -0,0 +1,23 @@ +**Added:** + +* no news: modification on CI workflow + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*