Skip to content

Commit

Permalink
Update: remove uneccesary os
Browse files Browse the repository at this point in the history
  • Loading branch information
GCS-ZHN committed Mar 12, 2023
1 parent 03ed15d commit 1743925
Showing 1 changed file with 4 additions and 92 deletions.
96 changes: 4 additions & 92 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
contents: write

jobs:
source-build:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -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/[email protected]
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/[email protected]

- 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
Expand All @@ -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
Expand Down

0 comments on commit 1743925

Please sign in to comment.