Skip to content

Commit

Permalink
Fix running tests with Python 3.4 and 3.5 on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaberez committed Nov 18, 2023
1 parent e96a6f9 commit f9cd4fb
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 19 deletions.
107 changes: 96 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,130 @@ name: Run all tests
on: [push, pull_request]

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP: "env PIP_DISABLE_PIP_VERSION_CHECK=1
PYTHONWARNINGS=ignore:DEPRECATION
pip --no-cache-dir"

jobs:
build:
build_py34:
runs-on: ubuntu-20.04
container: python:3.4
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install asxxxx
run: |
wget --no-verbose https://github.com/6502org/6502.org/raw/74f5d0c0f9b73d5e353bde7b3b25ea7f43b527a1/public/tools/asm/asxs5p50.zip
unzip -q asxs5p50.zip
make -C asxv5pxx/asxmak/linux/build all
echo "$PWD/asxv5pxx/asxmak/linux/build" >> $GITHUB_PATH
- name: Install srecord
run: |
cat /etc/issue # Debian 9 (Stretch) expected
dpkg -r --force-all libgcrypt20
wget --no-verbose http://ftp.us.debian.org/debian/pool/main/libg/libgcrypt20/libgcrypt20_1.8.4-5+deb10u1_amd64.deb
dpkg -i libgcrypt20_1.8.4-5+deb10u1_amd64.deb
wget --no-verbose http://ftp.us.debian.org/debian/pool/main/s/srecord/libsrecord0_1.64-1_amd64.deb
dpkg -i libsrecord0_1.64-1_amd64.deb
wget --no-verbose http://ftp.us.debian.org/debian/pool/main/s/srecord/srecord_1.64-1_amd64.deb
dpkg -i srecord_1.64-1_amd64.deb
- name: Show Python version
run: python -V

- name: Install dependencies
run: pip install setuptools
run: $PIP install setuptools

- name: Run the tests
run: python setup.py test -q

- name: Install it
run: python setup.py install

- name: Disassemble and reassemble the test program
run: |
make -C k0dasm/tests/end_to_end all
build_py35:
runs-on: ubuntu-20.04
container: python:3.5
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Install asxxxx
run: |
wget --no-verbose --content-disposition https://github.com/6502org/6502.org/raw/74f5d0c0f9b73d5e353bde7b3b25ea7f43b527a1/public/tools/asm/asxs5p50.zip
wget --no-verbose https://github.com/6502org/6502.org/raw/74f5d0c0f9b73d5e353bde7b3b25ea7f43b527a1/public/tools/asm/asxs5p50.zip
unzip -q asxs5p50.zip
make -C asxv5pxx/asxmak/linux/build all
echo "$PWD/asxv5pxx/asxmak/linux/build" >> $GITHUB_PATH
- name: Install srecord
run: sudo apt-get install -y srecord
run: |
cat /etc/issue # Debian 10 (Buster) expected
apt update
apt install -y srecord
- name: Show Python version
run: python -V

- name: Install dependencies
run: $PIP install setuptools

- name: Run the tests
run: python setup.py test -q

- name: Install it
run: python setup.py install

- name: Disassemble and reassemble the test program
run: |
make -C k0dasm/tests/end_to_end all
build_py3x:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install asxxxx
run: |
wget --no-verbose https://github.com/6502org/6502.org/raw/74f5d0c0f9b73d5e353bde7b3b25ea7f43b527a1/public/tools/asm/asxs5p50.zip
unzip -q asxs5p50.zip
make -C asxv5pxx/asxmak/linux/build all
echo "$PWD/asxv5pxx/asxmak/linux/build" >> $GITHUB_PATH
- name: Install srecord
run: |
sudo apt-get update
sudo apt-get install -y srecord
- name: Show Python version
run: python -V

- name: Install dependencies
run: $PIP install setuptools

- name: Run the tests
run: python setup.py test -q

- name: Install it
run: python setup.py install

- name: Disassemble and reassemble the test program
run: |
Expand Down
6 changes: 2 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
2.0.0.dev0 (Next Release)
-------------------------
1.0.2 (Next Release)
--------------------

Support for Python 3.4 and 3.5 has been dropped.
k0dasm now requires Python 3.6 or later.

1.0.1 (2021-01-29)
------------------
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Features
Installation
------------

k0dasm is written in Python and requires Python 3.4 or later. Packages are `available <https://pypi.org/project/k0dasm/>`_ on the Python Package Index (PyPI). You can download them from there or you can use ``pip`` to automatically install or upgrade ``k0dasm``::
k0dasm is written in Python and requires Python 3.4 or later. Packages are `available <https://pypi.org/project/k0dasm/>`_ on the Python Package Index (PyPI). You can download them from there or you can use ``pip`` to install ``k0dasm``::

$ pip install -U k0dasm
$ pip install setuptools k0dasm

Usage
-----
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import sys
from setuptools import setup, find_packages

if sys.version_info[:2] < (3, 6):
raise RuntimeError('k0dasm requires Python 3.6 or later')
if sys.version_info[:2] < (3, 4):
raise RuntimeError('k0dasm requires Python 3.4 or later')

DESC = "Renesas (NEC) 78K0 disassembler"
here = os.path.abspath(os.path.dirname(__file__))
Expand All @@ -22,6 +22,8 @@
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
Expand Down

0 comments on commit f9cd4fb

Please sign in to comment.