Skip to content

build

build #75

Workflow file for this run

# Example: https://data-dive.com/multi-os-deployment-in-cloud-using-pyinstaller-and-github-actions
name: build
on:
push:
# build once a month to ensure the artifacts are available
schedule:
- cron: "0 0 1 * *"
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
env:
# Run the executable in test and debug mode.
TEST: 1
QT_DEBUG_PLUGINS: 1
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
# https://github.com/Nuitka/Nuitka/issues/2138#issuecomment-1498994385
# https://doc.qt.io/qt-6/linux-requirements.html
- name: Install system dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt update
sudo apt install --yes \
libegl-dev \
libfontconfig1-dev \
libfreetype6-dev \
libx11-dev \
libx11-xcb-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxrender-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libatspi2.0-dev \
'^libxcb.*-dev'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build executable with pyinstaller
run: python -m PyInstaller joplin_sticky_notes.spec --noconfirm
- uses: actions/upload-artifact@v3
with:
name: joplin-sticky-notes-${{ matrix.os }}
path: ./dist/joplin-sticky-notes*
- name: Run the executable
uses: coactions/setup-xvfb@v1
with:
run: ./dist/joplin-sticky-notes