mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Merge branch 'master' of https://github.com/Serial-Studio/Serial-Studio
This commit is contained in:
commit
502f3e0d80
138
.github/workflows/Build.yml
vendored
138
.github/workflows/Build.yml
vendored
@ -12,6 +12,8 @@ on:
|
|||||||
paths-ignore: # File-patterns to ignore
|
paths-ignore: # File-patterns to ignore
|
||||||
- '**.md' # Ignore changes to *.md files
|
- '**.md' # Ignore changes to *.md files
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
# Define application name & version
|
# Define application name & version
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
@ -29,210 +31,150 @@ env:
|
|||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
#
|
|
||||||
|
|
||||||
# GNU/Linux build (we run on Ubuntu 16.04 to generate AppImage)
|
# GNU/Linux build (we run on Ubuntu 16.04 to generate AppImage)
|
||||||
#
|
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ubuntu-16.04
|
||||||
|
name: '🐧 Ubuntu 16.04'
|
||||||
steps:
|
steps:
|
||||||
#
|
|
||||||
# Checkout the repository
|
- name: '🧰 Checkout'
|
||||||
#
|
|
||||||
- name: Checkout repository and submodules
|
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
#
|
- name: '⚙️ Cache Qt'
|
||||||
# Cache Qt
|
|
||||||
#
|
|
||||||
- name: Cache Qt
|
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ../Qt
|
path: ../Qt
|
||||||
key: ${{runner.os}}-QtCache
|
key: ${{runner.os}}-QtCache
|
||||||
|
|
||||||
#
|
- name: '⚙️ Install Qt'
|
||||||
# Install Qt
|
|
||||||
#
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v2
|
||||||
with:
|
with:
|
||||||
modules: qtcharts
|
modules: qtcharts
|
||||||
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
||||||
|
|
||||||
#
|
|
||||||
# Install additional dependencies, stolen from:
|
# Install additional dependencies, stolen from:
|
||||||
# https://github.com/mapeditor/tiled/blob/master/.github/workflows/packages.yml
|
# https://github.com/mapeditor/tiled/blob/master/.github/workflows/packages.yml
|
||||||
#
|
- name: '⚙️ Install dependencies'
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install libgl1-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libzstd-dev
|
sudo apt-get install libgl1-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libzstd-dev
|
||||||
|
|
||||||
#
|
- name: '🚧 Compile application'
|
||||||
# Compile the application
|
|
||||||
#
|
|
||||||
- name: Compile
|
|
||||||
run: |
|
run: |
|
||||||
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release PREFIX=/usr
|
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release PREFIX=/usr
|
||||||
make -j8
|
make -j8
|
||||||
|
|
||||||
#
|
- name: '📦 Create AppImage'
|
||||||
# Create the AppImage
|
|
||||||
#
|
|
||||||
- name: Create AppImage
|
|
||||||
run: |
|
run: |
|
||||||
make INSTALL_ROOT=appdir install
|
make INSTALL_ROOT=appdir install
|
||||||
|
|
||||||
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" -O linuxdeployqt
|
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" -O linuxdeployqt
|
||||||
chmod a+x linuxdeployqt
|
chmod a+x linuxdeployqt
|
||||||
./linuxdeployqt appdir/usr/share/applications/*.desktop -appimage -bundle-non-qt-libs -extra-plugins=imageformats/libqsvg.so -qmldir="${{env.QML_DIR_NIX}}"
|
./linuxdeployqt appdir/usr/share/applications/*.desktop -appimage -bundle-non-qt-libs -extra-plugins=imageformats/libqsvg.so -qmldir="${{env.QML_DIR_NIX}}"
|
||||||
|
|
||||||
#
|
|
||||||
# Rename AppImage to match "%AppName%-%Version%-Linux.AppImage" format
|
# Rename AppImage to match "%AppName%-%Version%-Linux.AppImage" format
|
||||||
#
|
mv *.AppImage ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
|
||||||
- name: Rename AppImage
|
|
||||||
run: mv *.AppImage ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
|
|
||||||
|
|
||||||
#
|
- name: '📤 Upload artifact: AppImage'
|
||||||
# Upload AppImage to build artifacts
|
|
||||||
#
|
|
||||||
- name: Upload AppImage
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
|
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
|
||||||
path: ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
|
path: ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
|
||||||
|
|
||||||
#
|
|
||||||
# macOS build
|
# macOS build
|
||||||
#
|
|
||||||
build-mac:
|
build-mac:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
name: '🍎 macOS'
|
||||||
steps:
|
steps:
|
||||||
#
|
|
||||||
# Checkout the repository
|
- name: '🧰 Checkout'
|
||||||
#
|
|
||||||
- name: Checkout repository and submodules
|
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
#
|
- name: '⚙️ Cache Qt'
|
||||||
# Cache Qt
|
|
||||||
#
|
|
||||||
- name: Cache Qt
|
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ../Qt
|
path: ../Qt
|
||||||
key: ${{runner.os}}-QtCache
|
key: ${{runner.os}}-QtCache
|
||||||
|
|
||||||
#
|
- name: '⚙️ Install Qt'
|
||||||
# Install Qt
|
|
||||||
#
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v2
|
||||||
with:
|
with:
|
||||||
modules: qtcharts
|
modules: qtcharts
|
||||||
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
||||||
|
|
||||||
#
|
- name: '🚧 Compile application'
|
||||||
# Compile application
|
|
||||||
#
|
|
||||||
- name: Compile
|
|
||||||
run: |
|
run: |
|
||||||
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release
|
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release
|
||||||
make -j8
|
make -j8
|
||||||
|
|
||||||
#
|
- name: '📦 Package application (macdeployqt and zipfile)'
|
||||||
# Deploy application
|
|
||||||
#
|
|
||||||
- name: Deploy app
|
|
||||||
run: |
|
run: |
|
||||||
macdeployqt ${{env.EXECUTABLE}}.app -qmldir="${{env.QML_DIR_NIX}}"
|
macdeployqt ${{env.EXECUTABLE}}.app -qmldir="${{env.QML_DIR_NIX}}"
|
||||||
mv "${{env.EXECUTABLE}}.app" "${{env.APPLICATION}}.app"
|
mv "${{env.EXECUTABLE}}.app" "${{env.APPLICATION}}.app"
|
||||||
|
|
||||||
#
|
|
||||||
# ZIP application "%AppName%-%Version%-macOS.zip"
|
# ZIP application "%AppName%-%Version%-macOS.zip"
|
||||||
# We use ditto instead of zip to use the same commands as Finder
|
# We use ditto instead of zip to use the same commands as Finder
|
||||||
#
|
|
||||||
- name: Create ZIP file
|
|
||||||
run: |
|
|
||||||
ditto -c -k --sequesterRsrc --keepParent "${{env.APPLICATION}}.app" ${{env.EXECUTABLE}}-${{env.VERSION}}-macOS.zip
|
ditto -c -k --sequesterRsrc --keepParent "${{env.APPLICATION}}.app" ${{env.EXECUTABLE}}-${{env.VERSION}}-macOS.zip
|
||||||
|
|
||||||
#
|
- name: '📤 Upload artifact: ZIP'
|
||||||
# Upload ZIP to build artifacts
|
|
||||||
#
|
|
||||||
- name: Upload ZIP
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-macOS.zip
|
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-macOS.zip
|
||||||
path: ${{env.EXECUTABLE}}-${{env.VERSION}}-macOS.zip
|
path: ${{env.EXECUTABLE}}-${{env.VERSION}}-macOS.zip
|
||||||
|
|
||||||
#
|
|
||||||
# Windows build
|
# Windows build
|
||||||
#
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
name: '🧊 Windows'
|
||||||
steps:
|
steps:
|
||||||
#
|
|
||||||
# Checkout the repository
|
- name: '🧰 Checkout'
|
||||||
#
|
|
||||||
- name: Checkout repository and submodules
|
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
#
|
- name: '⚙️ Configure MSVC'
|
||||||
# Configure MSVC
|
|
||||||
#
|
|
||||||
- name: Configure MSVC
|
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
with:
|
with:
|
||||||
arch: x64
|
arch: x64
|
||||||
spectre: true
|
spectre: true
|
||||||
|
|
||||||
#
|
- name: '⚙️ Cache Qt'
|
||||||
# Cache Qt
|
|
||||||
#
|
|
||||||
- name: Cache Qt
|
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ../Qt
|
path: ../Qt
|
||||||
key: ${{runner.os}}-QtCache
|
key: ${{runner.os}}-QtCache
|
||||||
|
|
||||||
#
|
- name: '⚙️ Install Qt'
|
||||||
# Install Qt
|
|
||||||
#
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v2
|
||||||
with:
|
with:
|
||||||
modules: qtcharts
|
modules: qtcharts
|
||||||
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
||||||
|
|
||||||
#
|
- name: '⚙️ Install NSIS'
|
||||||
# Install NSIS
|
|
||||||
#
|
|
||||||
- name: Install NSIS
|
|
||||||
run: |
|
run: |
|
||||||
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
|
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
|
||||||
scoop bucket add extras
|
scoop bucket add extras
|
||||||
scoop install nsis
|
scoop install nsis
|
||||||
|
|
||||||
#
|
- name: '🚧 Compile application'
|
||||||
# Compile application
|
|
||||||
#
|
|
||||||
- name: Compile
|
|
||||||
run: |
|
run: |
|
||||||
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release
|
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release
|
||||||
nmake
|
nmake
|
||||||
|
|
||||||
#
|
# Copy Qt DLLs, compiler runtime & application icon
|
||||||
# Copy Qt & OpenSSL DLLs, compiler runtime & application icon
|
- name: '📦 Package application (windeployqt)'
|
||||||
#
|
|
||||||
- name: Deploy
|
|
||||||
run: |
|
run: |
|
||||||
mkdir bin
|
mkdir bin
|
||||||
move release/${{env.EXECUTABLE}}.exe bin
|
move release/${{env.EXECUTABLE}}.exe bin
|
||||||
@ -242,20 +184,14 @@ jobs:
|
|||||||
xcopy deploy\windows\resources\icon.ico "${{env.APPLICATION}}"
|
xcopy deploy\windows\resources\icon.ico "${{env.APPLICATION}}"
|
||||||
xcopy deploy\windows\openssl\*.dll "${{env.APPLICATION}}\bin"
|
xcopy deploy\windows\openssl\*.dll "${{env.APPLICATION}}\bin"
|
||||||
|
|
||||||
#
|
- name: '📦 Make NSIS installer'
|
||||||
# Create NSIS installer
|
|
||||||
#
|
|
||||||
- name: Make NSIS installer
|
|
||||||
run: |
|
run: |
|
||||||
move "${{env.APPLICATION}}" deploy\windows\nsis\
|
move "${{env.APPLICATION}}" deploy\windows\nsis\
|
||||||
cd deploy\windows\nsis
|
cd deploy\windows\nsis
|
||||||
makensis /X"SetCompressor /FINAL lzma" setup.nsi
|
makensis /X"SetCompressor /FINAL lzma" setup.nsi
|
||||||
ren *.exe ${{env.EXECUTABLE}}-${{env.VERSION}}-Windows.exe
|
ren *.exe ${{env.EXECUTABLE}}-${{env.VERSION}}-Windows.exe
|
||||||
|
|
||||||
#
|
- name: '📤 Upload artifact: NSIS installer'
|
||||||
# Upload installer to build artifacts
|
|
||||||
#
|
|
||||||
- name: Upload NSIS installer
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-Windows.exe
|
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-Windows.exe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user