diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index aa86c70..752033d 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -11,7 +11,7 @@ permissions: contents: write jobs: - source-build: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -25,96 +25,7 @@ jobs: run: | pip install --upgrade pip && pip install build && - python -m build --sdist - - - name: Get version - id: version - uses: frabert/replace-string-action@v2 - with: - pattern: 'refs/tags/v(.+)' - string: ${{ github.ref }} - replace-with: 'v$1' - - - uses: actions/upload-artifact@v3 - with: - name: build_${{ steps.version.outputs.replaced }} - path: dist/*.tar.gz - retention-days: 1 - - manylinux-build: - runs-on: ubuntu-latest - needs: ["source-build"] - strategy: - matrix: - py_version: ['cp38-cp38', 'cp39-cp39'] - steps: - - uses: actions/checkout@v3 - - - name: Get version - id: version - uses: frabert/replace-string-action@v2 - with: - pattern: 'refs/tags/v(.+)' - string: ${{ github.ref }} - replace-with: 'v$1' - - - uses: actions/download-artifact@v3 - with: - name: build_${{ steps.version.outputs.replaced }} - path: dist/ - - - name: Build on manylinux2010 - uses: GCS-ZHN/python-wheels-manylinux-build@v1.1 - with: - python-versions: ${{ matrix.py_version }} - build-requirements: 'versioneer[toml] numpy<=1.19.5 setuptools>=42' - # system-packages: gcc-gfortran - source: dist/*.tar.gz - - - uses: actions/upload-artifact@v3 - with: - name: build_${{ steps.version.outputs.replaced }} - path: dist/*-manylinux*.whl - retention-days: 1 - - win-build: - runs-on: 'windows-2022' - needs: ["source-build"] - strategy: - matrix: - py_version: ['3.8', '3.9'] - - steps: - - uses: actions/checkout@v3 - - - name: "Setup Python" - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.py_version }} - - - name: Setup MSBuild.exe - if: startsWith(matrix.os, 'windows') - uses: microsoft/setup-msbuild@v1.1 - - - name: Setup fortran - uses: awvwgk/setup-fortran@main - id: setup-fortran - with: - compiler: gcc - version: 8 - - - name: Check fortran version - run: ${{ env.FC }} --version - env: - FC: ${{ steps.setup-fortran.outputs.fc }} - - - name: "Build and test for Windows" - run: | - pip install --upgrade pip; - pip install build; - python -m build --wheel; - Get-ChildItem -Path dist -Filter annopro*whl | ForEach-Object{ pip install "$_" }; - annopro --version + python -m build - name: Get version id: version @@ -130,8 +41,9 @@ jobs: path: dist/* retention-days: 1 + release: - needs: ["win-build", "manylinux-build"] + needs: ["build"] runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3