Bump black from 23.12.1 to 24.3.0 #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push] | |
jobs: | |
Build: | |
name: "Build for ubuntu-latest" | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "windows-latest"] | |
python-version: ["3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install OS dependencies | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt-get install -y libzbar0 libmtdev1 libmtdev-dev | |
sudo ldconfig -v | |
- name: Setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade Cython | |
pip install poetry | |
poetry install | |
# With linux, build needs some display. | |
# Running without a headless display | |
# into github-action worker | |
# will cause a "Couldn't connect to X Server" | |
# To fix that, setup a headless window server | |
- name: Build executables for linux | |
if: ${{ runner.os == 'Linux' }} | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: poetry run poe build | |
# Github-action with windows | |
# will show `GL: Minimum required OpenGL version (2.0) NOT found!` | |
# to fix that use the given solution: | |
# https://github.com/kivy/kivy/issues/5248#issuecomment-384308843 | |
- name: Build executables for Windows | |
if: ${{ runner.os == 'Windows' }} | |
env: | |
KIVY_GL_BACKEND: angle_sdl2 | |
run: poetry run poe build | |
# Upload artifacts | |
- name: Upload ksigner-cli and ksigner-gui artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ksigner-${{ runner.os }}-py${{ matrix.python-version }} | |
path: ./dist/ksigner-* |