Skip to content

6.3.3

6.3.3 #194

Workflow file for this run

name: CMake Build
on:
release:
types: [published]
push:
branches:
- 'release/**'
workflow_dispatch:
env:
BUILD_TYPE: Release
VERSION_NAME: ${{ github.event.release.tag_name }}
jobs:
linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get install -y libyaml-cpp-dev libarchive-dev wget ninja-build libxkbcommon0 libxkbcommon-x11-0
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20220822-1/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
sudo add-apt-repository universe
sudo apt install libfuse2
- name: Switch to Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
target: desktop
- name: Configure CMake
working-directory: ${{github.workspace}}
run: cmake -DCMAKE_BUILD_TYPE=Release . -G Ninja
- name: Build
working-directory: ${{github.workspace}}
run: ninja
- name: Deploy
run: |
./linuxdeploy-x86_64.AppImage --appdir=csmm-x86_64 -e csmm -d csmm.desktop -i AppIcon.png -p qt
cp -r -t csmm-x86_64/usr/bin wit szs py csmmpython
ARCH=x86_64 ./linuxdeploy-x86_64.AppImage --appdir=csmm-x86_64 -p qt -o appimage
mv csmm*.AppImage csmm-$VERSION_NAME-linux.AppImage
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/csmm-${{github.event.release.tag_name}}-linux.AppImage
macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: brew install libarchive ninja [email protected] yaml-cpp
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
target: desktop
- name: Configure CMake
working-directory: ${{github.workspace}}
run: cmake -DCMAKE_BUILD_TYPE=Release . -G Ninja
- name: Build
working-directory: ${{github.workspace}}
run: ninja
- name: Switch to Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Configure Python virtual environment
working-directory: ${{github.workspace}}
run: |
python -m venv ./csmm-venv
source ./csmm-venv/bin/activate
- name: Install Pip in CSMM
working-directory: ${{github.workspace}}
run: |
wget https://bootstrap.pypa.io/get-pip.py
./csmm.app/Contents/MacOS/csmmpython -m get-pip --break-system-packages
- name: Install Pip Modules In Embedded Python
working-directory: ${{github.workspace}}
run: ./csmm.app/Contents/MacOS/csmmpython -m pip install sphinx==7.2.6 pillow==10.1.0 --break-system-packages
- name: Build docs
working-directory: ${{github.workspace}}/docs
run: |
export SPHINXBUILD="${{github.workspace}}/csmm.app/Contents/MacOS/csmmpython -m sphinx"
make html
cd _build
zip -r "csmm-$VERSION_NAME-pydocs.zip" html
- name: Shut down XProtectBehaviorService, which interferes with macdeployqt
working-directory: ${{github.workspace}}
run: |
echo killing...; sudo pkill -9 XProtect >/dev/null || true;
echo waiting...; while pgrep XProtect; do sleep 3; done;
- name: Deploy
working-directory: ${{github.workspace}}
run: |
HOMEBREW_PREFIX=$(brew --prefix [email protected])
echo $HOMEBREW_PREFIX
mkdir -p $HOMEBREW_PREFIX/lib/Python.framework/
sudo cp -a $HOMEBREW_PREFIX/Frameworks/Python.framework/. $HOMEBREW_PREFIX/lib/Python.framework/
macdeployqt 'csmm.app' -dmg
- name: Rename
working-directory: ${{github.workspace}}
run: mv 'csmm.dmg' "csmm-$VERSION_NAME-macos.dmg"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{github.workspace}}/csmm-${{github.event.release.tag_name}}-macos.dmg
${{github.workspace}}/docs/_build/csmm-${{github.event.release.tag_name}}-pydocs.zip
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
target: desktop
arch: win64_msvc2019_64
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup VS Environment
uses: seanmiddleditch/gha-setup-vsdevenv@master
- name: Configure CMake
working-directory: ${{github.workspace}}
shell: bash
run: cmake -DCMAKE_BUILD_TYPE=Release . -G Ninja
- name: Build
working-directory: ${{github.workspace}}
run: ninja
- name: Switch to Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Configure Python virtual environment
working-directory: ${{github.workspace}}
run: |
py -m venv .venv
.\.venv\Scripts\activate
- name: Install Pip in CSMM
working-directory: ${{github.workspace}}
shell: pwsh
run: |
.\.venv\Scripts\activate
Invoke-WebRequest -Uri https://bootstrap.pypa.io/get-pip.py -OutFile get-pip.py
.\csmmpython -m get-pip --break-system-packages
- name: Install Pip Modules In Embedded Python
working-directory: ${{github.workspace}}
run: .\csmmpython -m pip install pillow==10.1.0 --break-system-packages
- name: Rename
working-directory: ${{github.workspace}}
shell: bash
run: |
mkdir "csmm-$VERSION_NAME"
mv "csmm.exe" "csmm-$VERSION_NAME/csmm.exe"
mv "wit" "csmm-$VERSION_NAME/wit"
mv "szs" "csmm-$VERSION_NAME/szs"
mv "csmmpython.exe" "csmm-$VERSION_NAME/csmmpython.exe"
- name: Deploy
working-directory: ${{github.workspace}}
shell: bash
run: windeployqt "csmm-$VERSION_NAME/csmm.exe"
- name: Copy dlls
working-directory: ${{github.workspace}}
shell: bash
run: |
PYVER=$(py --version | sed 's/Python //')
CONDENSEDPYVER=$(echo $PYVER | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1\2/')
cp "C:\Program Files\OpenSSL\bin\libcrypto-1_1-x64.dll" "csmm-$VERSION_NAME"
cp "C:\Program Files\OpenSSL\bin\libssl-1_1-x64.dll" "csmm-$VERSION_NAME"
cp "C:/hostedtoolcache/windows/Python/$PYVER/x64/python$CONDENSEDPYVER.dll" "csmm-$VERSION_NAME"
- name: Copy Python stdlib
working-directory: ${{github.workspace}}
shell: bash
run: |
mkdir "csmm-$VERSION_NAME/py"
cp -R "py/Lib" "csmm-$VERSION_NAME/py"
- name: Archive
uses: thedoctor0/zip-release@main
with:
type: 'zip'
directory: ${{github.workspace}}
filename: csmm-${{github.event.release.tag_name}}-windows.zip
path: ./csmm-${{github.event.release.tag_name}}/
- name: Release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{github.workspace}}/csmm-${{github.event.release.tag_name}}-windows.zip
tag: ${{ github.ref }}
overwrite: true