wrong checkout? #4
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 wheel and sdist for a non-pure Python package | |
| on: | |
| push: | |
| jobs: | |
| build_sdist: | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| name: Build pyobjcryst sdist | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out pyobjcryst | |
| uses: actions/checkout@v4 | |
| - name: Initialize miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: sdist | |
| channels: conda-forge | |
| auto-update-conda: true | |
| auto-activate-base: false | |
| python-version: 3.13 | |
| - name: Conda config | |
| run: >- | |
| conda config --set always_yes yes | |
| --set changeps1 no | |
| - name: Install pyobjcryst and requirements | |
| run: | | |
| conda install --file requirements/conda.txt | |
| conda install --file requirements/build.txt | |
| pip install --upgrade build | |
| - name: Build sdist | |
| run: python -m build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-sdist | |
| path: ./dist/*.tar.gz | |
| build-wheels: | |
| needs: [build_sdist] | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| name: cibw-wheels-${{ 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"] | |
| - ["3.13", "cp313"] | |
| steps: | |
| - name: Check out pyobjcryst | |
| uses: actions/checkout@v4 | |
| - name: Get sdist for CIBW | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cibw-sdist | |
| path: dist/ | |
| - name: Initialize miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: build | |
| channels: conda-forge | |
| auto-update-conda: true | |
| auto-activate-base: false | |
| python-version: ${{ matrix.python[0] }} | |
| - name: Conda config | |
| run: >- | |
| conda config --set always_yes yes | |
| --set changeps1 no | |
| - name: Install pyobjcryst and requirements | |
| run: | | |
| conda install --file requirements/conda.txt | |
| conda install --file requirements/build.txt | |
| - name: Build wheels from sdist | |
| uses: pypa/cibuildwheel@v2.21.1 | |
| env: | |
| CIBW_BUILD: ${{ matrix.python[1] }}-${{ matrix.buildplat[1] }} | |
| CIBW_SDIST: dist/*.tar.gz | |
| CIBW_ISOLATED_BUILD: false | |
| CONDA_PREFIX: ${{ env.CONDA_PREFIX }} | |
| with: | |
| output-dir: dist | |
| - name: Upload wheels to GitHub | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.python[0] }}-${{ matrix.buildplat[0] }}.whl | |
| path: ./dist/*.whl | |
| test-wheels: | |
| needs: [build-wheels] | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| name: test-wheels-${{ matrix.python }}-${{ matrix.buildplat }} | |
| runs-on: ${{ matrix.buildplat }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| buildplat: | |
| - ubuntu-latest | |
| - macos-13 | |
| - macos-14 | |
| - windows-latest | |
| python: | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| - name: Check out pyobjcryst | |
| uses: actions/checkout@v4 | |
| - name: Download wheels | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ matrix.python }}-${{ matrix.buildplat }}.whl | |
| path: ./dist | |
| - name: Initialize miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: test | |
| channels: conda-forge | |
| auto-update-conda: true | |
| auto-activate-base: false | |
| python-version: ${{ matrix.python }} | |
| - name: Conda config | |
| run: >- | |
| conda config --set always_yes yes | |
| --set changeps1 no | |
| - name: Install pyobjcryst and requirements | |
| run: | | |
| conda install --file requirements/conda.txt | |
| conda install --file requirements/test.txt | |
| - name: Install wheel and test | |
| run: | | |
| pip install ./dist/*.whl | |
| pytest |