Skip to content

Commit

Permalink
Merge pull request #69 from compomics/update-ci-workflows
Browse files Browse the repository at this point in the history
Update CI workflows
  • Loading branch information
RobbinBouwmeester authored Feb 16, 2024
2 parents 9ccfb0e + 645a28a commit 9a95de4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,46 @@ on:
jobs:
python-package:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel flake8 twine
pip install build flake8
- name: Check for syntax errors
run: |
flake8 ./deeplc --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Build and publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Build package
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
python -m build . --sdist --wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload compiled wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.whl

windows-installer:
runs-on: windows-latest
needs: python-package
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install . gooey pyinstaller
pip install .[gui] pyinstaller
- name: Install Inno Setup
uses: crazy-max/ghaction-chocolatey@v1
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install innosetup -y --allow-unofficial --force
- name: Run pyinstaller
Expand All @@ -56,7 +57,7 @@ jobs:
- name: Run Inno Setup
run: ISCC.exe ./deeplc_innosetup.iss /DMyAppVersion=$(python setup.py --version)
- name: Upload installer
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.exe
Expand All @@ -66,7 +67,7 @@ jobs:
needs: [python-package, windows-installer]
steps:
- name: Download installer
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
path: dist
Expand All @@ -85,20 +86,20 @@ jobs:
runs-on: ubuntu-latest
needs: python-package
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: latest_release
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: compomics
repo: DeepLC
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push to ghcr.io
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: streamlit
push: true
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ on:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
system: [["3.8", "windows-latest"], ["3.8", "macos-latest"], ["3.8", "ubuntu-latest"], ["3.9", "ubuntu-latest"], ["3.10", "ubuntu-latest"], ["3.11", "ubuntu-latest"]]
runs-on: ${{ matrix.system[1] }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.system[0] }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.system[0] }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down

0 comments on commit 9a95de4

Please sign in to comment.