Skip to content

Commit

Permalink
GitHub action: install integrations library
Browse files Browse the repository at this point in the history
  • Loading branch information
zehnm committed Oct 24, 2023
1 parent e5f0e79 commit 592e56f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GitHub Action to build a self contained binary of the Denon AVR Python driver
# GitHub Action to build a self-contained binary of the Denon AVR Python driver
---
name: "Build & Release"

Expand All @@ -15,6 +15,7 @@ on:
env:
INTG_NAME: denonavr
HASH_FILENAME: uc-intg-denonavr.hash
INTG_LIB_VER: 0.0.10

jobs:
build:
Expand All @@ -29,15 +30,17 @@ jobs:
run: |
git clone https://martonborzak:${{ secrets.PAT }}@github.com/aitatoi/integration-python-library.git
ls -lah
cd integration-python-library
git checkout v${INTG_LIB_VER}
- name: Prepare
run: |
sudo apt-get update && sudo apt-get install -y qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --name builder --platform=aarch64 -v ${GITHUB_WORKSPACE}:/io -d ubuntu:focal tail -f /dev/null
docker exec builder bash -c "apt-get update && apt-get install -y python3-pip"
docker exec builder bash -c "cd /io/integration-python-library && python3 setup.py bdist_wheel && pip3 install -I dist/ucapi-0.0.10-py3-none-any.whl"
docker exec builder bash -c "cd /io/integration-python-library && python3 setup.py bdist_wheel && pip3 install -I dist/ucapi-${INTG_LIB_VER}-py3-none-any.whl"
docker exec builder bash -c "pip3 install pyinstaller -r /io/requirements.txt"
docker exec builder bash -c "cd /io && pyinstaller --clean --onefile --name intg-denonavr driver.py"
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/python-code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,29 @@ on:
permissions:
contents: read

env:
INTG_LIB_VER: 0.0.10

jobs:
test:
runs-on: ubuntu-22.04

name: Check Python code formatting
steps:
- uses: actions/checkout@v3

# We need the integration library, this is temporary until we decide to publish it to pypi
- name: Clone & install integrations library
shell: bash
run: |
git clone https://martonborzak:${{ secrets.PAT }}@github.com/aitatoi/integration-python-library.git
ls -lah
cd integration-python-library
git checkout v${INTG_LIB_VER}
python3 setup.py bdist_wheel
ls -lah dist
pip3 install -I dist/ucapi-${INTG_LIB_VER}-py3-none-any.whl
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down

0 comments on commit 592e56f

Please sign in to comment.