Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build binaries

on:
pull_request:
branches:
- master
push:
tags:
- "*"
Comment thread
bittner marked this conversation as resolved.

jobs:
linux-elf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: sudo apt-get install libsdl2-2.0-0
- run: python -m pip install pyinstaller
- run: python -m pip install --find-links ${WHEELS} wxPython
env:
WHEELS: https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04
- run: python setup.py clean bundle
- uses: actions/upload-artifact@v2
with:
name: PythonTurtle
path: ${{ github.workspace }}/dist/PythonTurtle

macos-app:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install pyinstaller wxPython
- run: python setup.py clean bundle
- run: rm ${{ github.workspace }}/dist/PythonTurtle
- uses: actions/upload-artifact@v2
with:
name: PythonTurtle.app
path: ${{ github.workspace }}/dist/

windows-exe:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install pyinstaller wxPython
- run: python setup.py clean bundle
- uses: actions/upload-artifact@v2
with:
name: PythonTurtle.exe
path: ${{ github.workspace }}\dist\PythonTurtle.exe
20 changes: 0 additions & 20 deletions .github/workflows/build_linux_elf.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/build_windows_exe.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ name: Checks

on:
pull_request:
branches: [master]
branches:
- master
push:
branches: [master]
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
env: [flake8, pylint]
env:
- flake8
- pylint
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,34 @@ name: Tests

on:
pull_request:
branches: [master]
branches:
- master
push:
branches: [master]
branches:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- '3.6'
- '3.7'
- '3.8'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for Ubuntu
run: sudo apt-get install libsdl2-2.0-0
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libsdl2-2.0-0
- name: Install prerequisites
run: python -m pip install --upgrade setuptools pip wheel tox-gh-actions
- name: Run tests
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def run():
"""
Create an application bundle (using PyInstaller)
"""
import PyInstaller.__main__
import PyInstaller.__main__ # pylint: disable=import-outside-toplevel

resources_folder = os.path.join('pythonturtle', 'resources')

Expand All @@ -50,8 +50,8 @@ def include_resources(file_glob):
'--name=%s' % package.name,
'--onefile',
'--windowed',
'--add-binary=%s' % include_resources('*.ic*'),
'--add-binary=%s' % include_resources('*.png'),
'--add-data=%s' % include_resources('*.ic*'),
'--add-data=%s' % include_resources('*.png'),
'--add-data=%s' % include_resources('*.txt'),
'--icon=%s' % resource_path('icon.ico'),
os.path.join('pythonturtle', '__main__.py'),
Expand Down
7 changes: 2 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# - Installing wxPython is non-trivial on GNU/Linux. We need to install wheels from a dedicated repository,
# located at https://extras.wxpython.org/wxPython4/extras/linux/. For beackground reading see
# https://wiki.wxpython.org/How%20to%20install%20wxPython#Installing_wxPython-Phoenix_using_pip
# - The wheel repository specified via --find-links below matches the build environment on Travis CI.
# - The wheel repository specified via --find-links below matches the build environment on GitHub Actions.
# - For local Tox runs adapt the wheel repository URLs to match your local environment.

[tox]
Expand All @@ -25,18 +25,15 @@ commands =

[testenv:flake8]
description = Static code analysis and code style
basepython = python3.6
deps =
flake8
commands =
{envpython} -m flake8 {posargs}

[testenv:pylint]
description = Check for errors and code smells
basepython = python3.6
deps =
astroid<2.2
pylint<2.4
pylint
pyinstaller
commands =
{envpython} -m pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython
Expand Down