Skip to content

convert Travis CI file to Github Actions #3

convert Travis CI file to Github Actions

convert Travis CI file to Github Actions #3

Workflow file for this run

name: Build and Deploy
on:
push:
paths-ignore:
- 'LICENSE'
- 'README.md'
jobs:
linux-gcc:
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [x86_64]
env:
CMAKE_BUILD_TYPE: Release
QT_PPA: beineri/opt-qt-5.12.10-focal
QT_VER: 512
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup QT
run: |
sudo add-apt-repository -y ppa:$QT_PPA
sudo apt-get update -qq
sudo apt-get install -y git build-essential cmake python3-dev python3-pip libpython3-stdlib zlib1g-dev libssl-dev libffi-dev libx11-dev mesa-common-dev
sudo apt-get install -y qt${QT_VER}base qt${QT_VER}declarative qt${QT_VER}imageformats qt${QT_VER}multimedia qt${QT_VER}tools qt${QT_VER}svg qt${QT_VER}x11extras qt${QT_VER}xmlpatterns
sudo pip3 install -Iv setuptools==41.0.1
sudo pip3 install ssh2-python
- name: Install Dependencies
run: |
source /opt/qt${QT_VER}/bin/qt${QT_VER}-env.sh
- name: Build and Install
run: |
mkdir build
cd build
git clone https://github.com/Orochimarufan/PythonQt
cd PythonQt
git checkout 18d4c24
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DPythonQt_Python3=ON -DPYTHONQT_WITH_WEBKIT=OFF -DBUILD_SHARED_LIBS=ON
sudo cmake --build . --config $CMAKE_BUILD_TYPE --target install
- name: Deploy Linux
run: |
mkdir appdir
make install DESTDIR=appdir
sudo mkdir -p appdir/usr/lib/python3.4
sudo cp -r /usr/lib/python3.4/* appdir/usr/lib/python3.4/
sudo mkdir -p appdir/usr/local/lib/python3.4/dist-packages/ssh2
sudo cp -r /usr/local/lib/python3.4/dist-packages/ssh2/* appdir/usr/local/lib/python3.4/dist-packages/ssh2/
sudo chown -R $(id -nu) appdir
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
wget -c -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool-x86_64.AppImage
unset QTDIR; unset QT_PLUGIN_PATH; unset LD_LIBRARY_PATH
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
unlink appdir/AppRun
cp ../res/screencloud.sh appdir/AppRun
rm -r appdir/usr/plugins/bearer
rm -r appdir/usr/plugins/mediaservice
rm -r appdir/usr/plugins/platforminputcontexts
rm -r appdir/usr/plugins/printsupport
rm -r appdir/usr/plugins/sqldrivers
rm -r appdir/usr/plugins/xcbglintegrations
./appimagetool-x86_64.AppImage appdir
mkdir .snapcraft
mkdir snap
cp ../deploy/linux/snapcraft.yaml snap/snapcraft.yaml
openssl aes-256-cbc -K ${{ secrets.SNAPCRAFT_KEY }} -iv ${{ secrets.SNAPCRAFT_IV }} -in ../.snapcraft/ci_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d
docker run -v $(pwd):$(pwd) -t yakshaveinc/snapcraft:core18 sh -c "cd $(pwd) && snapcraft"
curl -v --upload-file $(ls | grep screencloud | grep .snap) https://oshi.at
curl -v --upload-file $(ls | grep ScreenCloud | grep .AppImage) https://oshi.at
macos-xcode9:
runs-on: macos-13
env:
CMAKE_BUILD_TYPE: Release
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Dependencies
run: |
brew install qt quazip
export PATH="$(brew --prefix qt)/bin:$PATH"
sudo pip install ssh2-python
- name: Build and Install
run: |
mkdir build
cd build
git clone https://github.com/Orochimarufan/PythonQt
cd PythonQt
git checkout 18d4c24
sudo cmake . -DCMAKE_PREFIX_PATH="$(brew --prefix qt)" -DPYTHON_INCLUDE_DIR=./pythonincludes -DPythonQt_Python3=OFF -DPYTHONQT_WITH_WEBKIT=OFF -DBUILD_SHARED_LIBS=ON
sudo cmake --build . --config $CMAKE_BUILD_TYPE --target install
- name: Deploy macOS
run: |
sudo make install
sudo cp -R /usr/local/lib/python2.7/site-packages/ssh2/. screencloud.app/Contents/Resources/modules/ssh2
sudo macdeployqt screencloud.app -verbose=3
sudo chown -R $(id -nu) screencloud.app
mkdir -p dmgdir/ScreenCloud.app
cp -r screencloud.app/* dmgdir/ScreenCloud.app/
ln -s /Applications dmgdir/Applications
hdiutil create -volname ScreenCloud-$VERSION -srcfolder dmgdir -ov -format UDZO ScreenCloud-$VERSION.dmg
curl -v --upload-file $(ls | grep ScreenCloud | grep .dmg) https://oshi.at
windows-vs2017:
runs-on: windows-latest
env:
PLATFORM: Win32
TOOLCHAIN: win32_msvc2017
CMAKE_BUILD_TYPE: Release
PYTHON_BASE_DIR: "'/c/Python38'"
PYTHON_PACKAGE: "'python3 --version 3.8.0 --forcex86'"
OPENSSL_LIB_SUFFIX: ""
QT_VERSION: 5.12.9
QT5_BASE_DIR: "'/c/Qt/5.12.9/msvc2017'"
WIX_PATH: "'/c/Program Files (x86)/WiX Toolset v3.11/bin'"
MSBUILD_PATH: "'/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin'"
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Dependencies
run: |
powershell Install-WindowsFeature Net-Framework-Core
choco install python --version 3.8.0
choco install wixtoolset
.\tools\install-qt.sh --toolchain ${TOOLCHAIN} --version ${QT_VERSION} qtbase qttools qtmultimedia qtsvg qtwinextras qtimageformats qt3d qtquickcontrols qtquickcontrols2 qtdeclarative qtxmlpatterns
git clone --branch 1.1.1g-20200510 https://github.com/janbar/openssl-cmake
mkdir openssl-cmake/build
cd openssl-cmake/build
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd) -DCMAKE_GENERATOR_PLATFORM=${PLATFORM} -DBUILD_SHARED_LIBS=ON
cmake --build . --config $CMAKE_BUILD_TYPE --target install
mv bin/libcrypto*.dll bin/libcrypto-1_1${OPENSSL_LIB_SUFFIX}.dll
mv bin/libssl*.dll bin/libssl-1_1${OPENSSL_LIB_SUFFIX}.dll
rm ${PYTHON_BASE_DIR}/DLLs/libssl*.dll
rm ${PYTHON_BASE_DIR}/DLLs/libcrypto*.dll
cp bin/libcrypto*.dll ${PYTHON_BASE_DIR}/DLLs/
cp bin/libssl*.dll ${PYTHON_BASE_DIR}/DLLs/
- name: Build and Install
run: |
mkdir build
cd build
git clone https://github.com/Orochimarufan/PythonQt
cd PythonQt
git checkout 18d4c24
cmake . -DCMAKE_INSTALL_PREFIX=$(pwd) -DCMAKE_GENERATOR_PLATFORM=${PLATFORM} -DPythonQt_Python3=ON -DPYTHONQT_WITH_WEBKIT=OFF -DBUILD_SHARED_LIBS=ON -DPYTHON_INCLUDE_DIR=${PYTHON_BASE_DIR}/include -DPYTHON_LIBRARY=${PYTHON_BASE_DIR}/libs/python38.lib
cmake --build . --config $CMAKE_BUILD_TYPE --target install
- name: Deploy Windows
run: |
cp -r ${PYTHON_BASE_DIR}/DLLs DLLs
cp -r ${PYTHON_BASE_DIR}/Lib/site-packages/ssh2 modules/ssh2
7z a -tzip -mx=9 python38.zip ${PYTHON_BASE_DIR}/Lib/*
cmake --build . --config $CMAKE_BUILD_TYPE --target install
curl -v --upload-file $(ls | grep ScreenCloud | grep .msi) https://oshi.at