Add Windows exe #82
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
package: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ 'ubuntu-20.04', 'windows-latest', 'macos-11' ] | |
# os: [[self-hosted, Linux], [self-hosted, Windows]] | |
python-version: [ 3.11 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Package for ${{ matrix.os }} | |
run: python dist.py -d | |
- name: Add generated binary to artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nexus-build | |
path: | | |
./dist/nexus | |
./dist/nexus.app | |
./dist/nexus.exe | |
./dist/nexusw.exe | |
if-no-files-found: error | |
if: always() | |
docs: | |
# runs-on: ubuntu-latest | |
runs-on: [self-hosted, Linux] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add README.md and LICENSE to artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nexus-build | |
path: | | |
LICENSE | |
README.md | |
if-no-files-found: error | |
build-test: | |
# runs-on: ubuntu-latest | |
runs-on: [self-hosted, Linux] | |
strategy: | |
matrix: | |
python-version: [ 3.11 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build twine | |
pip install -r requirements.txt | |
pip install -r test-requirements.txt | |
sudo apt-get install xvfb | |
- name: Lint with flake8 | |
run: | | |
flake8 --count --show-source --statistics --max-line-length=120 \ | |
--per-file-ignores=src/nexus/Freqlog/backends/__init__.py:F401 --exclude=venv | |
- name: Build package | |
run: python -m build | |
- name: Check and install package | |
run: | | |
twine check dist/* | |
pip install . | |
- name: Test with pytest over Xvfb | |
run: xvfb-run -a pytest --cov=nexus | |
release: | |
needs: [ package, docs, build-test ] | |
runs-on: ubuntu-latest | |
# runs-on: [self-hosted, Linux] | |
if: | | |
github.repository_owner == 'CharaChorder' && | |
github.event_name != 'pull_request' | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: nexus-build | |
- uses: pyTooling/Actions/releaser@r0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
nexus | |
nexus.exe | |
nexusw.exe | |
nexus.app | |
README.md | |
LICENSE |