Skip to content

Try to fix CI/CD in Windows. #68

Try to fix CI/CD in Windows.

Try to fix CI/CD in Windows. #68

Workflow file for this run

name: Sephera Workflows
on:
push:
branches:
- master
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Install Dependencies
shell: bash
run: |
if [[ "${{runner.os }}" == "Linux" ]]; then
sudo apt install clang ccache
fi
if [[ "${{ runner.os }}" == "Windows" ]]; then
choco install visualstudio2019buildtools
fi
pip install -r requirements.txt
- name: Check syntax
run: |
ruff check .
- name: Build CLI for Linux
shell: bash
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
THREADS=$(nproc)
python3 -m nuitka main.py \
--onefile \
--clang \
--lto=yes \
--jobs="$THREADS" \
--output-dir=build/cli \
--output-filename=sephera-cli-linux
fi
- name: Build CLI for macOS
shell: bash
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
THREADS=$(sysctl -n hw.logicalcpu)
brew install ccache
python3 -m nuitka main.py \
--onefile \
--clang \
--lto=yes \
--jobs="$THREADS" \
--output-dir=build/cli \
--output-filename=sephera-cli-macos
fi
- name: Build CLI for Windows
shell: cmd
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
set NUITKA_DEPENDS_DOWNLOAD_ALLOWED=1
set NUITKA_DEPENDS_DOWNLOAD_MODE=cached
set THREADS=%NUMBER_OF_PROCESSORS%
python -m nuitka main.py ^
--onefile ^
--lto=yes ^
--jobs=%THREADS% ^
--output-dir=build/cli ^
--output-filename=sephera-cli.exe
fi
- name: Build GUI App for Linux
shell: bash
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
THREADS=$(nproc)
python3 -m nuitka gui/main.py \
--onefile \
--enable-plugins=pyqt5 \
--lto=yes \
--clang \
--job="$THREADS" \
--output-dir=build/gui \
--output-filename=sephera-gui
fi
- name: Build GUI App for macOS
shell: bash
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
THREADS=$(sysctl -n hw.logicalcpu)
python3 -m nuitka gui/main.py \
--onefile \
--clang \
--enable-plugins=pyqt5 \
--macos-create-app-bundle \
--lto=yes \
--jobs="$THREADS" \
--output-dir=build/gui \
--output-filename=sephera-gui
fi
- name: Build GUI App for Windows
shell: cmd
run: |
set NUITKA_DEPENDS_DOWNLOAD_ALLOWED=1
set NUITKA_DEPENDS_DOWNLOAD_MODE=cached
set THREADS=%NUMBER_OF_PROCESSORS%
if [[ "${{ runner.os }}" == "Windows" ]]; then
THREADS=$(nproc)
echo "NUITKA_DEPENDS_DOWNLOAD_ALLOWED=$NUITKA_DEPENDS_DOWNLOAD_ALLOWED"
python -m nuitka gui/main.py ^
--onefile ^
--enable-plugins=pyqt5 ^
--lto=yes ^
--assume-yes-for-downloads ^
--jobs=%THREADS% ^
--output-dir=build/gui ^
--output-filename=sephera-gui.exe
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: sephera-${{ runner.os }}
path: |
build/cli/*
build/gui/*
if-no-files-found: error