Skip to content

Commit

Permalink
Merge pull request #340 from linien-org/release/v0.8.0
Browse files Browse the repository at this point in the history
Release v0.8.0
  • Loading branch information
bleykauf authored Jul 6, 2023
2 parents 9fef6df + 035c46d commit 47f8c58
Show file tree
Hide file tree
Showing 82 changed files with 3,281 additions and 2,664 deletions.
38 changes: 38 additions & 0 deletions .github/actions/build-linien/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Linien
description: Build all linien packages

runs:
using: "composite"
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Update pip
shell: bash
run: python -m pip install --upgrade pip

- name: Install build dependencies
shell: bash
run: pip install build wheel

- name: Build linien-common
shell: bash
working-directory: linien-common
run: python -m build

- name: Build linien-server
shell: bash
working-directory: linien-server
run: python -m build

- name: Build linien-client
shell: bash
working-directory: linien-client
run: python -m build

- name: Build linien-gui
shell: bash
working-directory: linien-gui
run: python -m build
6 changes: 5 additions & 1 deletion .github/actions/install-linien/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ runs:
using: "composite"
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Update pip
shell: bash
run: python -m pip install --upgrade pip

- name: Install linien-common
shell: bash
working-directory: linien-common
Expand Down
35 changes: 21 additions & 14 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,38 @@ on:
workflow_dispatch:
push:
paths:
- .github/workflows/mypy.yml
- .github/actions/install-linien/**
- linien-common/**
- linien-client/**
- linien-gui/**
- linien-server/**

permissions:
contents: read

jobs:
build:
mypy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Check out repository
uses: actions/checkout@v3

- name: Install linien-common
working-directory: linien-common
run: pip install .
- name: Install Linien
uses: ./.github/actions/install-linien

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy types-appdirs
- name: Install additional dependencies
run: pip install mypy types-appdirs pyqt5-stubs types-requests

- name: mypy for linien-common
run: mypy linien-common
run: mypy linien-common/linien_common

- name: mypy for linien-server
run: mypy linien-server/linien_server

- name: mypy for linien-client
run: mypy linien-client/linien_client

- name: mypy for linien-gui
run: mypy linien-gui/linien_gui
37 changes: 7 additions & 30 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Packages
name: Upload Packages to PyPI

on:
workflow_dispatch:
Expand All @@ -15,52 +15,29 @@ jobs:
with:
lfs: "true"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
- name: Build linien-common
working-directory: linien-common
run: python -m build

- name: Build linien-server
working-directory: linien-server
run: python -m build

- name: Build linien-client
working-directory: linien-client
run: python -m build

- name: Build linien-gui
working-directory: linien-gui
run: python -m build
- name: Build Linien
uses: ./.github/actions/build-linien

- name: Publish linien-common
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: linien-common/dist/
packages-dir: linien-common/dist/
password: ${{ secrets.PYPI_API_TOKEN_COMMON }}

- name: Publish linien-server
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: linien-server/dist/
packages-dir: linien-server/dist/
password: ${{ secrets.PYPI_API_TOKEN_SERVER }}

- name: Publish linien-client
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: linien-client/dist/
packages-dir: linien-client/dist/
password: ${{ secrets.PYPI_API_TOKEN_CLIENT }}

- name: Publish linien-gui
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: linien-gui/dist/
packages-dir: linien-gui/dist/
password: ${{ secrets.PYPI_API_TOKEN_GUI }}
43 changes: 10 additions & 33 deletions .github/workflows/publish-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,56 +15,33 @@ jobs:
with:
lfs: "true"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
- name: Build linien-common
working-directory: linien-common
run: python -m build

- name: Build linien-server
working-directory: linien-server
run: python -m build

- name: Build linien-client
working-directory: linien-client
run: python -m build

- name: Build linien-gui
working-directory: linien-gui
run: python -m build
- name: Build Linien
uses: ./.github/actions/build-linien

- name: Publish linien-common to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: linien-common/dist/
packages-dir: linien-common/dist/
password: ${{ secrets.TEST_PYPI_API_TOKEN_COMMON }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish linien-server to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: linien-server/dist/
packages-dir: linien-server/dist/
password: ${{ secrets.TEST_PYPI_API_TOKEN_SERVER }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish linien-client to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: linien-client/dist/
packages-dir: linien-client/dist/
password: ${{ secrets.TEST_PYPI_API_TOKEN_CLIENT }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish linien-gui to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: linien-gui/dist/
packages-dir: linien-gui/dist/
password: ${{ secrets.TEST_PYPI_API_TOKEN_GUI }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
8 changes: 4 additions & 4 deletions .github/workflows/pyinstaller-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
with:
python-version: "3.10"

- name: Install dependencies
run: sudo apt-get install -y qt5-default qttools5-dev-tools binutils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

- run: pip install pyinstaller
- name: Install additional dependencies
run: |
sudo apt-get install -y qt5-default qttools5-dev-tools binutils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa
pip install pyinstaller
- name: Install linien-common
working-directory: linien-common
Expand Down
23 changes: 6 additions & 17 deletions .github/workflows/pyinstaller-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_dispatch:
push:
paths:
- .github/workflows/pyinstaller-windows.yml
- .github/actions/install-linien/**
- linien-common/**
- linien-client/**
- linien-gui/**
Expand All @@ -17,24 +19,11 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- run: pip install pyinstaller

- name: Install linien-common
working-directory: linien-common
run: pip install .
- name: Install Linien
uses: ./.github/actions/install-linien

- name: Install linien-client
working-directory: linien-client
run: pip install .

- name: Install linien-gui
working-directory: linien-gui
run: pip install .
- name: Install Pyinstaller
run: pip install pyinstaller

- run: pyinstaller pyinstaller.spec
working-directory: linien-gui
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_dispatch:
push:
paths:
- .github/workflows/pytest.yml
- .github/actions/install-linien/**
- gateware/**
- linien-common/**
- linien-server/**
Expand All @@ -17,25 +19,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Check out repository
uses: actions/checkout@v3

- name: Install linien-common
working-directory: linien-common
run: pip install .

- name: Install linien-server
working-directory: linien-server
run: pip install .
- name: Install Linien
uses: ./.github/actions/install-linien

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest migen pytest-plt git+https://github.com/m-labs/misoc
- name: Test with pytest
run: |
pytest .
run: pytest .
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black
exclude: ^(gateware/logic/|gateware/lowlevel/|gateware/linien_module.py|linien-server/linien_server/csrmap.py)
Expand Down
Loading

0 comments on commit 47f8c58

Please sign in to comment.