Fix shell syntax error #64
This file contains hidden or 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: 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 | |
| fi | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| choco install visualstudio2019buildtools | |
| fi | |
| pip install -r requirements.txt | |
| - name: Check syntax | |
| run: | | |
| ruff check . | |
| - name: Build CLI executable | |
| shell: bash | |
| run: | | |
| echo "Building for ${{ runner.os }}..." | |
| if [[ "${{ runner.os }}" == "Linux" || "${{ runner.os }}" == "Windows" ]]; then | |
| THREADS=$(nproc) | |
| elif [[ "${{ runner.os }}" == "macOS" ]]; then | |
| THREADS=$(sysctl -n hw.logicalcpu) | |
| fi | |
| if [[ "${{ runner.os }}" == "Linux" ]]; then | |
| python3 -m nuitka main.py \ | |
| --onefile \ | |
| --clang \ | |
| --lto=yes \ | |
| --jobs="$THREADS" \ | |
| --output-dir=build/cli \ | |
| --output-filename=sephera-cli-linux | |
| fi | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| brew install ccache | |
| python3 -m nuitka main.py \ | |
| --onefile \ | |
| --clang \ | |
| --lto=yes \ | |
| --jobs="$THREADS" \ | |
| --output-dir=build/cli \ | |
| --output-filename=sephera-cli-macos | |
| fi | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| export NUITKA_DEPENDS_DOWNLOAD_ALLOWED=1 | |
| export NUITKA_DEPENDS_DOWNLOAD_MODE=cached | |
| ext=".exe" | |
| python -m nuitka main.py \ | |
| --onefile \ | |
| --lto=yes \ | |
| --jobs="$THREADS" \ | |
| --output-dir=build/cli \ | |
| --output-filename=sephera-cli${ext} | |
| fi | |
| - name: Build GUI executable | |
| shell: bash | |
| run: | | |
| if [[ "${{ runner.os }}" == "Linux" || "${{ runner.os }}" == "Windows" ]]; then | |
| THREADS=$(nproc) | |
| elif [[ "${{ runner.os }}" == "macOS" ]]; then | |
| THREADS=$(sysctl -n hw.logicalcpu) | |
| fi | |
| if [[ "${{ runner.os }}" == "Linux" ]]; then | |
| python3 -m nuitka gui/main.py \ | |
| --onefile \ | |
| --enable-plugins=pyqt5 \ | |
| --lto=yes \ | |
| --clang \ | |
| --jobs="$THREADS" \ | |
| --output-dir=build/gui \ | |
| --output-filename=sephera-gui | |
| fi | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| 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 | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| export NUITKA_DEPENDS_DOWNLOAD_ALLOWED=1 | |
| export NUITKA_DEPENDS_DOWNLOAD_MODE=cached | |
| ext=".exe" | |
| python3 -m nuitka gui/main.py \ | |
| --onefile \ | |
| --enable-plugins=pyqt5 \ | |
| --lto=yes \ | |
| --output-dir=build/gui \ | |
| --jobs="$THREADS" \ | |
| --output-filename=sephera-gui${ext} | |
| fi | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sephera-${{ runner.os }} | |
| path: | | |
| build/cli/* | |
| build/gui/* | |
| if-no-files-found: error |