Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Github] Add Windows Qt5 Build, Update GH Actions & Fix macos build errors. #139

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 56 additions & 39 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,71 @@ on:
types: [published]

jobs:
build-x86_64:
name: 'Build NSO-RPC - x86_64'
runs-on: ${{ matrix.os }}
build-windows:
name: 'Build NSO-RPC - Windows'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'ubuntu-latest', 'macos-latest']
pyqt_version:
- 'pyqt6'
- 'pyqt5'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4

# Windows Build
- name: "Build"
if: matrix.os == 'windows-latest'
run: |
python -m pip install ${{ matrix.pyqt_version }} &&
cd scripts &&
python -m pip install pyqt6 &&
./build.bat

- name: "Rename executable"
if: matrix.pyqt_version == 'pyqt5'
run: mv client/dist/NSO-RPC.exe client/dist/NSO-RPC-qt5.exe
- name: "Upload Build"
if: matrix.os == 'windows-latest'
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2.0.4
with:
files: client/dist/NSO-RPC.exe
files: |
client/dist/NSO-RPC*.exe

# Linux Build
build-linux:
name: 'Build NSO-RPC - Linux'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: "Upload script"
if: matrix.os == 'ubuntu-latest'
uses: softprops/action-gh-release@v0.1.15
run: |
cd scripts &&
chmod +x linux.sh
continue-on-error: false
- name: "Upload Build"
uses: softprops/action-gh-release@v2.0.4
with:
files: scripts/linux.sh

# MacOS Build
build-macos:
name: 'Build NSO-RPC - MacOS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: "Build"
if: matrix.os == 'macos-latest'
run: |
cd scripts &&
python -m pip install pyqt6 &&
bash ./build.sh &&
./build.sh &&
cd ../client/dist &&
ln -s /Applications "Applications (admin)" &&
hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-installer.dmg &&
zip -yr mac-portable.zip NSO-RPC.app/

- name: "Upload Build"
if: matrix.os == 'macos-latest'
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2.0.4
with:
files: |
client/dist/mac-installer.dmg
Expand All @@ -62,9 +78,10 @@ jobs:
name: 'Build NSO-RPC - Universal2'
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

# MacOS Universal Build
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: "Install Python 3.11.4 and build NSO-RPC"
run: |
curl https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg -o python-3.11.4-macos11.pkg
Expand All @@ -76,24 +93,24 @@ jobs:
ln -s /Applications "Applications (admin)" &&
hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-universal2-installer.dmg &&
zip -yr mac-universal2-portable.zip NSO-RPC.app/

- name: "Upload NSO-RPC Universal2 Build"
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2.0.4
with:
files: |
client/dist/mac-universal2-installer.dmg
client/dist/mac-universal2-portable.zip

get-hashes:
runs-on: "ubuntu-latest"
needs: ["build-x86_64", "build-universal2"]
name: 'Generate Checksums'
runs-on: ubuntu-latest
needs: [build-windows, build-linux, build-macos, build-universal2]
steps:
- name: "Generate checksums.txt"
uses: MCJack123/ghaction-generate-release-hashes@v4
with:
hash-type: sha256
file-name: checksums.txt
get-assets: true
- uses: softprops/action-gh-release@v0.1.15
with:
files: checksums.txt
- name: "Generate checksums.txt"
uses: MCJack123/ghaction-generate-release-hashes@v4
with:
hash-type: sha256
file-name: checksums.txt
get-assets: true
- uses: softprops/action-gh-release@v2.0.4
with:
files: checksums.txt
3 changes: 3 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash
python3 -m venv --upgrade-deps venv
source venv/bin/activate
cd ../client
python3 -m pip install -r requirements.txt py2app GitPython
python3 _version.py
Expand Down
2 changes: 2 additions & 0 deletions scripts/macos-universal2/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
python3 -m venv --upgrade-deps venv
source venv/bin/activate
python3 -m pip install wheel PyQt6
bash prep-PyQt.sh
cd ../../client
Expand Down