Skip to content

Commit

Permalink
Update Workflows
Browse files Browse the repository at this point in the history
- Use latest action versions
- Fix formatting
  • Loading branch information
reidjohnson committed Nov 7, 2022
1 parent 90b9c27 commit 5763153
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 59 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
pip install -r ./docs/sphinx_requirements.txt
python setup.py build_ext --inplace && pip install .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
pip install -r ./docs/sphinx_requirements.txt
python setup.py build_ext --inplace && pip install .
- name: Build documents
run: |
cd ./docs/
make clean
make html
env:
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
- name: Build documents
run: |
cd ./docs/
make clean
make html
env:
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs/_build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs/_build/html/
6 changes: 3 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Cache dependencies
id: cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
Expand Down
66 changes: 34 additions & 32 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,46 @@ jobs:
os: [ubuntu-20.04, windows-2019, macOS-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.11.2
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.11.2

- name: Build wheels for Linux
if: matrix.os == 'ubuntu-20.04'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "pp* *i686* *musllinux*"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_BEFORE_BUILD: pip install -r requirements.txt && python setup.py build_ext --inplace && pip install .
- name: Build wheels for Linux
if: matrix.os == 'ubuntu-20.04'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "pp* *i686* *musllinux*"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_BEFORE_BUILD: pip install -r requirements.txt && python setup.py build_ext --inplace && pip install .

- name: Build wheels for Windows
if: matrix.os == 'windows-2019'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "pp* *i686* *win32"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_BEFORE_BUILD: pip install -r requirements.txt && python setup.py build_ext --inplace && pip install .
- name: Build wheels for Windows
if: matrix.os == 'windows-2019'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "pp* *i686* *win32"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_BEFORE_BUILD: pip install -r requirements.txt && python setup.py build_ext --inplace && pip install .

- name: Build wheels for macOS
if: matrix.os == 'macos-latest'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
CIBW_SKIP: "pp* *i686*"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_BEFORE_BUILD: pip install -r requirements.txt && python setup.py build_ext --inplace && pip install .
- name: Build wheels for macOS
if: matrix.os == 'macos-latest'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
CIBW_SKIP: "pp* *i686*"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_BEFORE_BUILD: pip install -r requirements.txt && python setup.py build_ext --inplace && pip install .

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

upload_pypi:
needs: build_wheels
Expand Down

0 comments on commit 5763153

Please sign in to comment.