Skip to content

Commit 3f9d013

Browse files
committed
Fix actions build. Drop support for py3.6
1 parent 894a312 commit 3f9d013

File tree

4 files changed

+36
-66
lines changed

4 files changed

+36
-66
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -14,95 +14,61 @@ on:
1414
# Allows you to run this workflow manually from the Actions tab
1515
workflow_dispatch:
1616

17-
1817
jobs:
1918
test:
2019
strategy:
2120
matrix:
2221
python-version:
23-
- 3.5
24-
- 3.6
25-
- 3.7
26-
- 3.8
27-
- 3.9
22+
- "3.7"
23+
- "3.8"
24+
- "3.9"
2825
- "3.10"
2926
- "3.11"
3027
- "3.12"
3128
include:
3229
- os: ubuntu-latest
33-
setup-python-env: {}
3430

3531
# older versions need older OS
36-
- python-version: 3.5
37-
os: ubuntu-20.04
38-
setup-python-env:
39-
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
40-
- python-version: 3.6
41-
os: ubuntu-20.04
32+
- python-version: "3.7"
33+
os: ubuntu-22.04
34+
35+
- python-version: "3.8"
36+
os: ubuntu-22.04
4237

4338
runs-on: ${{ matrix.os }}
4439

4540
steps:
4641
- uses: actions/checkout@v3
4742

48-
- name: Set up Python 3.7 to bootstrap py3.6 and py3.5
49-
if: ${{ matrix.python-version == '3.6' || matrix.python-version == '3.5' }}
50-
uses: actions/setup-python@v5
51-
with:
52-
python-version: 3.7
53-
5443
- name: Set up Python ${{ matrix.python-version }}
5544
uses: actions/setup-python@v5
5645
with:
5746
python-version: ${{ matrix.python-version }}
58-
env: ${{ matrix.setup-python-env }}
59-
60-
# Python 3.6 & 3.7 cannot install directly from a pyproject.toml
61-
# Instead, build a wheel from py3.7 and then install it
62-
- name: Install via wheel
63-
if: ${{ matrix.python-version == '3.6' || matrix.python-version == '3.5' }}
64-
run: |
65-
python3.7 -m pip install build
66-
python3.7 -m build
67-
python --version
68-
python -m pip install ./dist/*.whl
6947

7048
- name: Install dependencies
7149
run: |
72-
python -m pip install -U pytest
50+
python -m pip install pytest
7351
sudo apt update
7452
sudo apt install libxml2-utils
7553
tests/schema/1685-2014/download_schema.sh
7654
tests/schema/1685-2009/download_schema.sh
7755
78-
- name: Install coverage tools
79-
if: ${{ matrix.python-version == 3.10 }}
80-
run: |
81-
python -m pip install pytest-cov coverage>=6.3
82-
8356
- name: Install
84-
if: ${{ matrix.python-version != '3.6' && matrix.python-version != '3.5' }}
8557
run: |
86-
python -m pip install .
58+
python -m pip install ".[cli]"
8759
8860
- name: Test
89-
if: ${{ matrix.python-version != 3.10 }}
9061
run: |
9162
cd tests
92-
pytest
63+
pytest --cov=peakrdl_ipxact
9364
94-
- name: Test with Coverage
95-
if: ${{ matrix.python-version == 3.10 }}
65+
- name: Coveralls
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
COVERALLS_PARALLEL: true
9669
run: |
9770
cd tests
98-
pytest --cov=peakrdl_ipxact --cov-report lcov:cov.info
99-
100-
- name: Coveralls
101-
if: ${{ matrix.python-version == 3.10 }}
102-
uses: coverallsapp/github-action@master
103-
with:
104-
github-token: ${{ secrets.GITHUB_TOKEN }}
105-
path-to-lcov: tests/cov.info
71+
coveralls --service=github
10672
10773
#-------------------------------------------------------------------------------
10874
lint:
@@ -116,11 +82,11 @@ jobs:
11682

11783
- name: Install dependencies
11884
run: |
119-
python -m pip install -U pylint
85+
python -m pip install pylint
12086
12187
- name: Install
12288
run: |
123-
python -m pip install .
89+
python -m pip install ".[cli]"
12490
12591
- name: Run Lint
12692
run: |
@@ -138,7 +104,11 @@ jobs:
138104

139105
- name: Install dependencies
140106
run: |
141-
python -m pip install -U mypy
107+
python -m pip install mypy
108+
109+
- name: Install
110+
run: |
111+
python -m pip install ".[cli]"
142112
143113
- name: Type Check
144114
run: |
@@ -162,13 +132,14 @@ jobs:
162132

163133
- name: Install dependencies
164134
run: |
165-
python -m pip install -U build
135+
python -m pip install build
166136
167137
- name: Build
168138
run: python -m build
169139

170140
- uses: actions/upload-artifact@v4
171141
with:
142+
name: dist
172143
path: |
173144
dist/*.tar.gz
174145
dist/*.whl
@@ -188,7 +159,7 @@ jobs:
188159
steps:
189160
- uses: actions/download-artifact@v4
190161
with:
191-
name: artifact
162+
name: dist
192163
path: dist
193164

194165
- uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "peakrdl-ipxact"
77
dynamic = ["version"]
8-
requires-python = ">=3.5.2"
8+
requires-python = ">=3.7"
99
dependencies = [
1010
"systemrdl-compiler >= 1.24.0, < 2",
1111
]
@@ -24,20 +24,18 @@ classifiers = [
2424
"Development Status :: 5 - Production/Stable",
2525
"Programming Language :: Python",
2626
"Programming Language :: Python :: 3",
27-
"Programming Language :: Python :: 3.6",
28-
"Programming Language :: Python :: 3.7",
29-
"Programming Language :: Python :: 3.8",
30-
"Programming Language :: Python :: 3.9",
31-
"Programming Language :: Python :: 3.10",
32-
"Programming Language :: Python :: 3.11",
33-
"Programming Language :: Python :: 3.12",
3427
"Programming Language :: Python :: 3 :: Only",
3528
"Intended Audience :: Developers",
3629
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
3730
"Operating System :: OS Independent",
3831
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
3932
]
4033

34+
[project.optional-dependencies]
35+
cli = [
36+
"peakrdl-cli >= 1.2.3",
37+
]
38+
4139
[project.urls]
4240
Documentation = "https://peakrdl-ipxact.readthedocs.io"
4341
Source = "https://github.com/SystemRDL/PeakRDL-ipxact"

src/peakrdl_ipxact/__about__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
__version__ = "3.5.0"
1+
version_info = (3, 5, 0)
2+
__version__ = ".".join([str(n) for n in version_info])

src/peakrdl_ipxact/__peakrdl__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from typing import TYPE_CHECKING
22
import re
33

4-
from peakrdl.plugins.importer import ImporterPlugin #pylint: disable=import-error
5-
from peakrdl.plugins.exporter import ExporterSubcommandPlugin #pylint: disable=import-error
4+
from peakrdl.plugins.importer import ImporterPlugin
5+
from peakrdl.plugins.exporter import ExporterSubcommandPlugin
66

77
from .exporter import IPXACTExporter, Standard
88
from .importer import IPXACTImporter

0 commit comments

Comments
 (0)