Compare commits
3 Commits
35aff1254c
...
5e97c6696d
Author | SHA1 | Date |
---|---|---|
|
5e97c6696d | |
|
a1084d5976 | |
|
07d45b953b |
|
@ -0,0 +1,504 @@
|
||||||
|
name: Example App Build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '*.txt'
|
||||||
|
- 'lib_source/**'
|
||||||
|
- 'example/**'
|
||||||
|
- 'scripts/**'
|
||||||
|
- '3rdparty/**'
|
||||||
|
- '.github/workflows/app_build_workflow.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '*.txt'
|
||||||
|
- 'example/**'
|
||||||
|
- 'lib_source/**'
|
||||||
|
- 'scripts/**'
|
||||||
|
- '3rdparty/**'
|
||||||
|
- '.github/workflows/app_build_workflow.yml'
|
||||||
|
|
||||||
|
env:
|
||||||
|
REPO_NAME: ${{ github.event.repository.name }}
|
||||||
|
APP_NAME: RibbonUI-APP
|
||||||
|
QT_VERSION: 6.6.3
|
||||||
|
QT_MODULES: qt5compat qtshadertools qtimageformats
|
||||||
|
OS_MAC: macos-14
|
||||||
|
QT_ARCH_MAC: clang_64
|
||||||
|
QT_ARCH_WIN_MINGW: win64_mingw
|
||||||
|
QT_ARCH_WIN_MSVC: win64_msvc2019_64
|
||||||
|
QT_ARCH_LINUX: gcc_64
|
||||||
|
QT_MINGW_TOOLS: "tools_cmake,qt.tools.cmake tools_mingw90,qt.tools.win64_mingw900"
|
||||||
|
QT_MINGW_TOOLS_INSTALL: mingw1120_64
|
||||||
|
QT_MSVC_ARCH: x64
|
||||||
|
QT_MSVC_TOOLS: "tools_cmake,qt.tools.cmake"
|
||||||
|
QT_MSVC_TOOLS_INSTALL: msvc2019_64
|
||||||
|
OS_WIN: windows-latest
|
||||||
|
OS_LINUX: ubuntu-latest
|
||||||
|
RELEASE_OR_NIGHTLY: ${{ startsWith(github.ref, 'refs/tags/v') && 'RELEASE' || 'NIGHTLY' }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-macos-shared:
|
||||||
|
name: macOS (Shared Library)
|
||||||
|
runs-on: macos-14
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.QT_VERSION }}
|
||||||
|
arch: ${{ env.QT_ARCH_MAC }}
|
||||||
|
modules: ${{ env.QT_MODULES }}
|
||||||
|
|
||||||
|
- name: Set up Ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
|
- name: build macos
|
||||||
|
run: |
|
||||||
|
cmake --version
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
|
cmake --build . --target all --config Release --parallel
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
run: |
|
||||||
|
sudo find /Users/runner/work/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/macos/qml -name "*.dSYM" | xargs rm -r
|
||||||
|
sudo macdeployqt /Users/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/${APP_NAME}.app -qmldir=. -verbose=1 -dmg
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.APP_NAME }}_${{ env.OS_MAC }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}
|
||||||
|
path: /Users/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/${{ env.APP_NAME }}.dmg
|
||||||
|
|
||||||
|
- name: uploadRelease
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: /Users/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/${{ env.APP_NAME }}.dmg
|
||||||
|
asset_name: ${{ env.APP_NAME }}_${{ github.ref_name }}_${{ env.OS_MAC }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}.dmg
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
build-macos-static:
|
||||||
|
name: macOS (Static Library)
|
||||||
|
runs-on: macos-14
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.QT_VERSION }}
|
||||||
|
arch: ${{ env.QT_ARCH_MAC }}
|
||||||
|
modules: ${{ env.QT_MODULES }}
|
||||||
|
|
||||||
|
- name: Set up Ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
|
- name: build macos
|
||||||
|
run: |
|
||||||
|
cmake --version
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -D${{ env.REPO_NAME }}_BUILD_STATIC_LIB=ON -GNinja ..
|
||||||
|
cmake --build . --target all --config Release --parallel
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
run: |
|
||||||
|
sudo find /Users/runner/work/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/macos/qml -name "*.dSYM" | xargs rm -r
|
||||||
|
sudo macdeployqt /Users/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/${APP_NAME}.app -qmldir=. -verbose=1 -dmg
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.APP_NAME }}_${{ env.OS_MAC }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}
|
||||||
|
path: /Users/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/${{ env.APP_NAME }}.dmg
|
||||||
|
|
||||||
|
- name: uploadRelease
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: /Users/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/${{ env.APP_NAME }}.dmg
|
||||||
|
asset_name: ${{ env.APP_NAME }}_${{ github.ref_name }}_${{ env.OS_MAC }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}.dmg
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
build-ubuntu-shared:
|
||||||
|
name: Ubuntu (Shared Library)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.QT_VERSION }}
|
||||||
|
arch: ${{ env.QT_ARCH_LINUX }}
|
||||||
|
modules: ${{ env.QT_MODULES }}
|
||||||
|
|
||||||
|
- name: Set up Ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
|
- name: ubuntu install GL library
|
||||||
|
run: sudo apt install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev
|
||||||
|
|
||||||
|
- name: ubuntu install libfuse2
|
||||||
|
run: sudo apt install libfuse2
|
||||||
|
|
||||||
|
- name: build ubuntu
|
||||||
|
run: |
|
||||||
|
ninja --version
|
||||||
|
cmake --version
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
|
cmake --build . --target all --config Release --parallel
|
||||||
|
|
||||||
|
- name: install QT linux deploy
|
||||||
|
uses: miurahr/install-linuxdeploy-action@v1
|
||||||
|
with:
|
||||||
|
plugins: qt appimage
|
||||||
|
|
||||||
|
- name: Check if svg file exists
|
||||||
|
run: if [ ! -f "${APP_NAME}.svg" ]; then echo "File not found, creating..."; touch ${APP_NAME}.svg; fi
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
run: |
|
||||||
|
# make sure Qt plugin finds QML sources so it can deploy the imported files
|
||||||
|
export QML_SOURCES_PATHS=./
|
||||||
|
linuxdeploy-x86_64.AppImage --plugin=qt --output=appimage --create-desktop-file --icon-file=${APP_NAME}.svg --executable=/home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/${APP_NAME} --appdir /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/
|
||||||
|
mv ${{ env.APP_NAME }}-*.AppImage ${{ env.APP_NAME }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}.AppImage
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.APP_NAME }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}
|
||||||
|
path: ${{ env.APP_NAME }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}.AppImage
|
||||||
|
|
||||||
|
- name: uploadRelease
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ${{ env.APP_NAME }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}.AppImage
|
||||||
|
asset_name: ${{ env.APP_NAME }}_${{ github.ref_name }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}.AppImage
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
build-ubuntu-static:
|
||||||
|
name: Ubuntu (Static Library)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.QT_VERSION }}
|
||||||
|
arch: ${{ env.QT_ARCH_LINUX }}
|
||||||
|
modules: ${{ env.QT_MODULES }}
|
||||||
|
|
||||||
|
- name: Set up Ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
|
- name: ubuntu install GL library
|
||||||
|
run: sudo apt-get install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev
|
||||||
|
|
||||||
|
- name: ubuntu install libfuse2
|
||||||
|
run: sudo apt install libfuse2
|
||||||
|
|
||||||
|
- name: build ubuntu
|
||||||
|
run: |
|
||||||
|
ninja --version
|
||||||
|
cmake --version
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -D${{ env.REPO_NAME }}_BUILD_STATIC_LIB=ON -GNinja ..
|
||||||
|
cmake --build . --target all --config Release --parallel
|
||||||
|
|
||||||
|
- name: install QT linux deploy
|
||||||
|
uses: miurahr/install-linuxdeploy-action@v1
|
||||||
|
with:
|
||||||
|
plugins: qt appimage
|
||||||
|
|
||||||
|
- name: Check if svg file exists
|
||||||
|
run: if [ ! -f "${APP_NAME}.svg" ]; then echo "File not found, creating..."; touch ${APP_NAME}.svg; fi
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
run: |
|
||||||
|
# make sure Qt plugin finds QML sources so it can deploy the imported files
|
||||||
|
export QML_SOURCES_PATHS=./
|
||||||
|
linuxdeploy-x86_64.AppImage --plugin=qt --output=appimage --create-desktop-file --icon-file=${APP_NAME}.svg --executable=/home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/${APP_NAME} --appdir /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/app/release/
|
||||||
|
mv ${{ env.APP_NAME }}-*.AppImage ${{ env.APP_NAME }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}.AppImage
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.APP_NAME }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}
|
||||||
|
path: ${{ env.APP_NAME }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}.AppImage
|
||||||
|
|
||||||
|
- name: uploadRelease
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ${{ env.APP_NAME }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}.AppImage
|
||||||
|
asset_name: ${{ env.APP_NAME }}_${{ github.ref_name }}_${{ env.OS_LINUX }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}.AppImage
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
build-win-mingw-shared:
|
||||||
|
name: Windows MinGW (Shared Library)
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.QT_VERSION }}
|
||||||
|
arch: ${{ env.QT_ARCH_WIN_MINGW }}
|
||||||
|
modules: ${{ env.QT_MODULES }}
|
||||||
|
tools: ${{ env.QT_MINGW_TOOLS }}
|
||||||
|
|
||||||
|
- name: mingw-build
|
||||||
|
id: build
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
${{ env.Qt6_DIR }}\..\..\Tools\CMake_64\bin\cmake.exe -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:/a/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/mingw_64 -DCMAKE_C_COMPILER=D:/a/${{ env.REPO_NAME }}/Qt/Tools/${{ env.QT_MINGW_TOOLS_INSTALL }}/bin/gcc.exe -DCMAKE_CXX_COMPILER=D:/a/${{ env.REPO_NAME }}/Qt/Tools/${{ env.QT_MINGW_TOOLS_INSTALL }}/bin/g++.exe -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
|
${{ env.Qt6_DIR }}\..\..\Tools\CMake_64\bin\cmake.exe --build . --target all --config Release --parallel
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
id: package
|
||||||
|
env:
|
||||||
|
archiveName: ${{ env.APP_NAME }}_${{ env.QT_ARCH_WIN_MINGW }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe ${env:REPO_NAME}
|
||||||
|
$name = ${env:archiveName}
|
||||||
|
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ steps.package.outputs.packageName }}
|
||||||
|
path: ${{ steps.package.outputs.packageName }}
|
||||||
|
|
||||||
|
- name: uploadRelease
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ${{ steps.package.outputs.packageName }}.zip
|
||||||
|
asset_name: ${{ env.APP_NAME }}_${{ github.ref_name }}_${{ env.QT_ARCH_WIN_MINGW }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}.zip
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
build-win-mingw-static:
|
||||||
|
name: Windows MinGW (Static Library)
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.QT_VERSION }}
|
||||||
|
arch: ${{ env.QT_ARCH_WIN_MINGW }}
|
||||||
|
modules: ${{ env.QT_MODULES }}
|
||||||
|
tools: ${{ env.QT_MINGW_TOOLS }}
|
||||||
|
|
||||||
|
- name: mingw-build
|
||||||
|
id: build
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
${{ env.Qt6_DIR }}\..\..\Tools\CMake_64\bin\cmake.exe -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:/a/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/mingw_64 -DCMAKE_C_COMPILER=D:/a/${{ env.REPO_NAME }}/Qt/Tools/${{ env.QT_MINGW_TOOLS_INSTALL }}/bin/gcc.exe -DCMAKE_CXX_COMPILER=D:/a/${{ env.REPO_NAME }}/Qt/Tools/${{ env.QT_MINGW_TOOLS_INSTALL }}/bin/g++.exe -DCMAKE_BUILD_TYPE=Release -D${{ env.REPO_NAME }}_BUILD_STATIC_LIB=ON -GNinja ..
|
||||||
|
${{ env.Qt6_DIR }}\..\..\Tools\CMake_64\bin\cmake.exe --build . --target all --config Release --parallel
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
id: package
|
||||||
|
env:
|
||||||
|
archiveName: ${{ env.APP_NAME }}_${{ env.QT_ARCH_WIN_MINGW }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe ${env:REPO_NAME}
|
||||||
|
$name = ${env:archiveName}
|
||||||
|
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ steps.package.outputs.packageName }}
|
||||||
|
path: ${{ steps.package.outputs.packageName }}
|
||||||
|
|
||||||
|
- name: uploadRelease
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ${{ steps.package.outputs.packageName }}.zip
|
||||||
|
asset_name: ${{ env.APP_NAME }}_${{ github.ref_name }}_${{ env.QT_ARCH_WIN_MINGW }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}.zip
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
build-win-msvc-shared:
|
||||||
|
name: Windows MSVC (Shared Library)
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.QT_VERSION }}
|
||||||
|
arch: ${{ env.QT_ARCH_WIN_MSVC }}
|
||||||
|
modules: ${{ env.QT_MODULES }}
|
||||||
|
tools: ${{ env.QT_MSVC_TOOLS }}
|
||||||
|
|
||||||
|
- name: msvc-build
|
||||||
|
id: build
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ env.QT_MSVC_ARCH }}
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
${{ env.Qt6_DIR }}\..\..\Tools\CMake_64\bin\cmake.exe -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:/a/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
||||||
|
${{ env.Qt6_DIR }}\..\..\Tools\CMake_64\bin\cmake.exe --build . --target all --config Release --parallel
|
||||||
|
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
||||||
|
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
||||||
|
echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV%
|
||||||
|
echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV%
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
id: package
|
||||||
|
env:
|
||||||
|
archiveName: ${{ env.APP_NAME }}_${{ env.QT_ARCH_WIN_MSVC }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}
|
||||||
|
msvcArch: ${{ env.QT_MSVC_ARCH }}
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
& scripts\windows-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe ${env:REPO_NAME}
|
||||||
|
$name = ${env:archiveName}
|
||||||
|
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ steps.package.outputs.packageName }}
|
||||||
|
path: ${{ steps.package.outputs.packageName }}
|
||||||
|
|
||||||
|
- name: uploadRelease
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ${{ steps.package.outputs.packageName }}.zip
|
||||||
|
asset_name: ${{ env.APP_NAME }}_${{ github.ref_name }}_${{ env.QT_ARCH_WIN_MSVC }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}.zip
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
build-win-msvc-static:
|
||||||
|
name: Windows MSVC (Static Library)
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||||
|
with:
|
||||||
|
version: 1.10.2
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.QT_VERSION }}
|
||||||
|
arch: ${{ env.QT_ARCH_WIN_MSVC }}
|
||||||
|
modules: ${{ env.QT_MODULES }}
|
||||||
|
tools: ${{ env.QT_MSVC_TOOLS }}
|
||||||
|
|
||||||
|
- name: msvc-build
|
||||||
|
id: build
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ env.QT_MSVC_ARCH }}
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
${{ env.Qt6_DIR }}\..\..\Tools\CMake_64\bin\cmake.exe -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:/a/${{ env.REPO_NAME }}/Qt/${{ env.QT_VERSION }}/msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -D${{ env.REPO_NAME }}_BUILD_STATIC_LIB=ON -GNinja ..
|
||||||
|
${{ env.Qt6_DIR }}\..\..\Tools\CMake_64\bin\cmake.exe --build . --target all --config Release --parallel
|
||||||
|
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
||||||
|
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
||||||
|
echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV%
|
||||||
|
echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV%
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
id: package
|
||||||
|
env:
|
||||||
|
archiveName: ${{ env.APP_NAME }}_${{ env.QT_ARCH_WIN_MSVC }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}
|
||||||
|
msvcArch: ${{ env.QT_MSVC_ARCH }}
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
& scripts\windows-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe ${env:REPO_NAME}
|
||||||
|
$name = ${env:archiveName}
|
||||||
|
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ steps.package.outputs.packageName }}
|
||||||
|
path: ${{ steps.package.outputs.packageName }}
|
||||||
|
|
||||||
|
- name: uploadRelease
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ${{ steps.package.outputs.packageName }}.zip
|
||||||
|
asset_name: ${{ env.APP_NAME }}_${{ github.ref_name }}_${{ env.QT_ARCH_WIN_MSVC }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}.zip
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
|
@ -1,77 +0,0 @@
|
||||||
name: MacOS (Shared Library)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'example/**'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/macos-shared.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'example/**'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/macos-shared.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [macos-14]
|
|
||||||
qt_ver: [6.6.3]
|
|
||||||
qt_arch: [clang_64]
|
|
||||||
env:
|
|
||||||
targetName: RibbonUI-APP
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
|
||||||
|
|
||||||
- name: Set up Ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: build macos
|
|
||||||
run: |
|
|
||||||
cmake --version
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/RibbonUI/Qt/${{ matrix.qt_ver }}/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
run: |
|
|
||||||
# 先删除所有dSYM文件,减少包的体积
|
|
||||||
sudo find /Users/runner/work/RibbonUI/Qt/${{ matrix.qt_ver }}/macos/qml -name "*.dSYM" | xargs rm -r
|
|
||||||
# 拷贝依赖
|
|
||||||
sudo macdeployqt /Users/runner/work/RibbonUI/RibbonUI/build/app/release/${targetName}.app -qmldir=. -verbose=1 -dmg
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}_shared
|
|
||||||
path: /Users/runner/work/RibbonUI/RibbonUI/build/app/release/${{ env.targetName }}.dmg
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: /Users/runner/work/RibbonUI/RibbonUI/build/app/release/${{ env.targetName }}.dmg
|
|
||||||
asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}_shared.dmg
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,77 +0,0 @@
|
||||||
name: MacOS (Static Library)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'example/**'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/macos-static.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'example/**'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/macos-static.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [macos-14]
|
|
||||||
qt_ver: [6.6.3]
|
|
||||||
qt_arch: [clang_64]
|
|
||||||
env:
|
|
||||||
targetName: RibbonUI-APP
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
|
||||||
|
|
||||||
- name: Set up Ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: build macos
|
|
||||||
run: |
|
|
||||||
cmake --version
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/RibbonUI/Qt/${{ matrix.qt_ver }}/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DRIBBONUI_BUILD_STATIC_LIB=ON -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
run: |
|
|
||||||
# 先删除所有dSYM文件,减少包的体积
|
|
||||||
sudo find /Users/runner/work/RibbonUI/Qt/${{ matrix.qt_ver }}/macos/qml -name "*.dSYM" | xargs rm -r
|
|
||||||
# 拷贝依赖
|
|
||||||
sudo macdeployqt /Users/runner/work/RibbonUI/RibbonUI/build/app/release/${targetName}.app -qmldir=. -verbose=1 -dmg
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}_static
|
|
||||||
path: /Users/runner/work/RibbonUI/RibbonUI/build/app/release/${{ env.targetName }}.dmg
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: /Users/runner/work/RibbonUI/RibbonUI/build/app/release/${{ env.targetName }}.dmg
|
|
||||||
asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}_static.dmg
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,94 +0,0 @@
|
||||||
name: Ubuntu (Shared Library)
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'example/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/ubuntu-shared.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'example/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/ubuntu-shared.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
qt_ver: [6.6.3]
|
|
||||||
qt_arch: [gcc_64]
|
|
||||||
env:
|
|
||||||
targetName: RibbonUI-APP
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
|
||||||
|
|
||||||
- name: Set up Ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: ubuntu install GL library
|
|
||||||
run: sudo apt install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev
|
|
||||||
|
|
||||||
- name: ubuntu install libfuse2
|
|
||||||
run: sudo apt install libfuse2
|
|
||||||
|
|
||||||
- name: build ubuntu
|
|
||||||
run: |
|
|
||||||
ninja --version
|
|
||||||
cmake --version
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/RibbonUI/Qt/${{ matrix.qt_ver }}/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
|
|
||||||
- name: install QT linux deploy
|
|
||||||
uses: miurahr/install-linuxdeploy-action@v1
|
|
||||||
with:
|
|
||||||
plugins: qt appimage
|
|
||||||
|
|
||||||
- name: Check if svg file exists
|
|
||||||
run: if [ ! -f "${targetName}.svg" ]; then echo "File not found, creating..."; touch ${targetName}.svg; fi
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
run: |
|
|
||||||
# make sure Qt plugin finds QML sources so it can deploy the imported files
|
|
||||||
export QML_SOURCES_PATHS=./
|
|
||||||
# 拷贝依赖
|
|
||||||
linuxdeploy-x86_64.AppImage --plugin=qt --output=appimage --create-desktop-file --icon-file=${targetName}.svg --executable=/home/runner/work/RibbonUI/RibbonUI/build/app/release/${targetName} --appdir /home/runner/work/RibbonUI/RibbonUI/build/app/release/
|
|
||||||
mv ${{ env.targetName }}-*.AppImage ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}_shared.AppImage
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}_shared
|
|
||||||
path: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}_shared.AppImage
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}_shared.AppImage
|
|
||||||
asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}_shared.AppImage
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,94 +0,0 @@
|
||||||
name: Ubuntu (Static Library)
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'example/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/ubuntu-static.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'example/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/ubuntu-static.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
qt_ver: [6.6.3]
|
|
||||||
qt_arch: [gcc_64]
|
|
||||||
env:
|
|
||||||
targetName: RibbonUI-APP
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
|
||||||
|
|
||||||
- name: Set up Ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: ubuntu install GL library
|
|
||||||
run: sudo apt-get install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev
|
|
||||||
|
|
||||||
- name: ubuntu install libfuse2
|
|
||||||
run: sudo apt install libfuse2
|
|
||||||
|
|
||||||
- name: build ubuntu
|
|
||||||
run: |
|
|
||||||
ninja --version
|
|
||||||
cmake --version
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/RibbonUI/Qt/${{ matrix.qt_ver }}/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DRIBBONUI_BUILD_STATIC_LIB=ON -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
|
|
||||||
- name: install QT linux deploy
|
|
||||||
uses: miurahr/install-linuxdeploy-action@v1
|
|
||||||
with:
|
|
||||||
plugins: qt appimage
|
|
||||||
|
|
||||||
- name: Check if svg file exists
|
|
||||||
run: if [ ! -f "${targetName}.svg" ]; then echo "File not found, creating..."; touch ${targetName}.svg; fi
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
run: |
|
|
||||||
# make sure Qt plugin finds QML sources so it can deploy the imported files
|
|
||||||
export QML_SOURCES_PATHS=./
|
|
||||||
# 拷贝依赖
|
|
||||||
linuxdeploy-x86_64.AppImage --plugin=qt --output=appimage --create-desktop-file --icon-file=${targetName}.svg --executable=/home/runner/work/RibbonUI/RibbonUI/build/app/release/${targetName} --appdir /home/runner/work/RibbonUI/RibbonUI/build/app/release/
|
|
||||||
mv ${{ env.targetName }}-*.AppImage ${{ env.targetName }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}_static.AppImage
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ env.targetName }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}_static
|
|
||||||
path: ${{ env.targetName }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}_static.AppImage
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ env.targetName }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}_static.AppImage
|
|
||||||
asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}_static.AppImage
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,97 +0,0 @@
|
||||||
name: Windows MinGW (Shared Library)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'example/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/windows-mingw-shared.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'example/**'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/windows-mingw-shared.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- qt_arch: win64_mingw
|
|
||||||
qt_ver: 6.6.3
|
|
||||||
qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900"
|
|
||||||
qt_tools_mingw_install: mingw900_64
|
|
||||||
env:
|
|
||||||
targetName: RibbonUI-APP.exe
|
|
||||||
fileName: RibbonUI-APP
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
|
||||||
|
|
||||||
- name: Qt6 environment configuration
|
|
||||||
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
|
|
||||||
- name: where is cmake & where is mingw32-make
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Get-Command -Name 'cmake' | Format-List
|
|
||||||
Get-Command -Name 'mingw32-make' | Format-List
|
|
||||||
|
|
||||||
- name: mingw-build
|
|
||||||
id: build
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\RibbonUI\Qt\${{ matrix.qt_ver }}\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
id: package
|
|
||||||
env:
|
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}-shared
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
|
||||||
$name = ${env:archiveName}
|
|
||||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ steps.package.outputs.packageName }}
|
|
||||||
path: ${{ steps.package.outputs.packageName }}
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
|
||||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}_shared.zip
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,97 +0,0 @@
|
||||||
name: Windows MinGW (Static Library)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'example/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/windows-mingw-static.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'example/**'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/windows-mingw-static.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- qt_arch: win64_mingw
|
|
||||||
qt_ver: 6.6.3
|
|
||||||
qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900"
|
|
||||||
qt_tools_mingw_install: mingw900_64
|
|
||||||
env:
|
|
||||||
targetName: RibbonUI-APP.exe
|
|
||||||
fileName: RibbonUI-APP
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
|
||||||
|
|
||||||
- name: Qt6 environment configuration
|
|
||||||
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
|
|
||||||
- name: where is cmake & where is mingw32-make
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Get-Command -Name 'cmake' | Format-List
|
|
||||||
Get-Command -Name 'mingw32-make' | Format-List
|
|
||||||
|
|
||||||
- name: mingw-build
|
|
||||||
id: build
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\RibbonUI\Qt\${{ matrix.qt_ver }}\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DRIBBONUI_BUILD_STATIC_LIB=ON -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
id: package
|
|
||||||
env:
|
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}-static
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
|
||||||
$name = ${env:archiveName}
|
|
||||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ steps.package.outputs.packageName }}
|
|
||||||
path: ${{ steps.package.outputs.packageName }}
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
|
||||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}_static.zip
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,91 +0,0 @@
|
||||||
name: Windows MSVC (Shared Library)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'example/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/windows-msvc-shared.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'example/**'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/windows-msvc-shared.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [windows-latest]
|
|
||||||
include:
|
|
||||||
- qt_ver: 6.6.3
|
|
||||||
qt_arch: win64_msvc2019_64
|
|
||||||
msvc_arch: x64
|
|
||||||
qt_arch_install: msvc2019_64
|
|
||||||
env:
|
|
||||||
targetName: RibbonUI-APP.exe
|
|
||||||
fileName: RibbonUI-APP
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
|
||||||
|
|
||||||
- name: msvc-build
|
|
||||||
id: build
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\RibbonUI\Qt\${{ matrix.qt_ver }}\msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
|
||||||
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
|
||||||
echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV%
|
|
||||||
echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV%
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
id: package
|
|
||||||
env:
|
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}-shared
|
|
||||||
msvcArch: ${{ matrix.msvc_arch }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
& scripts\windows-publish.ps1 ${env:archiveName} ${env:targetName}
|
|
||||||
$name = ${env:archiveName}
|
|
||||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ steps.package.outputs.packageName }}
|
|
||||||
path: ${{ steps.package.outputs.packageName }}
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
|
||||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}_shared.zip
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,91 +0,0 @@
|
||||||
name: Windows MSVC (Static Library)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'example/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/windows-msvc-static.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'example/**'
|
|
||||||
- 'lib_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '3rdparty/**'
|
|
||||||
- '.github/workflows/windows-msvc-static.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [windows-latest]
|
|
||||||
include:
|
|
||||||
- qt_ver: 6.6.3
|
|
||||||
qt_arch: win64_msvc2019_64
|
|
||||||
msvc_arch: x64
|
|
||||||
qt_arch_install: msvc2019_64
|
|
||||||
env:
|
|
||||||
targetName: RibbonUI-APP.exe
|
|
||||||
fileName: RibbonUI-APP
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
|
||||||
|
|
||||||
- name: msvc-build
|
|
||||||
id: build
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\RibbonUI\Qt\${{ matrix.qt_ver }}\msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -DRIBBONUI_BUILD_STATIC_LIB=ON -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
|
|
||||||
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
|
|
||||||
echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV%
|
|
||||||
echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV%
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
id: package
|
|
||||||
env:
|
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}-static
|
|
||||||
msvcArch: ${{ matrix.msvc_arch }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
& scripts\windows-publish.ps1 ${env:archiveName} ${env:targetName}
|
|
||||||
$name = ${env:archiveName}
|
|
||||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ${{ steps.package.outputs.packageName }}
|
|
||||||
path: ${{ steps.package.outputs.packageName }}
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
|
||||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}_static.zip
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,12 +1,7 @@
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param (
|
param (
|
||||||
[string] $archiveName, [string] $targetName
|
[string] $archiveName, [string] $APP_NAME, [string] $REPO_NAME
|
||||||
)
|
)
|
||||||
# 外部环境变量包括:
|
|
||||||
# archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
|
||||||
|
|
||||||
|
|
||||||
# archiveName: 5.15.2-win64_mingw81
|
|
||||||
|
|
||||||
$scriptDir = $PSScriptRoot
|
$scriptDir = $PSScriptRoot
|
||||||
$currentDir = Get-Location
|
$currentDir = Get-Location
|
||||||
|
@ -17,9 +12,9 @@ function Main() {
|
||||||
|
|
||||||
New-Item -ItemType Directory $archiveName
|
New-Item -ItemType Directory $archiveName
|
||||||
# 拷贝exe
|
# 拷贝exe
|
||||||
Copy-Item D:\a\RibbonUI\RibbonUI\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
Copy-Item D:\a\$REPO_NAME\$REPO_NAME\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
||||||
# 拷贝依赖
|
# 拷贝依赖
|
||||||
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName
|
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$APP_NAME
|
||||||
# 删除不必要的文件
|
# 删除不必要的文件
|
||||||
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
|
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
|
||||||
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
|
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
|
||||||
|
@ -27,8 +22,8 @@ function Main() {
|
||||||
Compress-Archive -Path $archiveName $archiveName'.zip'
|
Compress-Archive -Path $archiveName $archiveName'.zip'
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($null -eq $archiveName || $null -eq $targetName) {
|
if ($null -eq $archiveName || $null -eq $APP_NAME || $null -eq $REPO_NAME) {
|
||||||
Write-Host "args missing, archiveName is" $archiveName ", targetName is" $targetName
|
Write-Host "args missing, archiveName is" $archiveName ", APP_NAME is" $APP_NAME ", REPO_NAME is" $REPO_NAME
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Main
|
Main
|
||||||
|
|
|
@ -1,22 +1,7 @@
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param (
|
param (
|
||||||
[string] $archiveName, [string] $targetName
|
[string] $archiveName, [string] $APP_NAME, [string] $REPO_NAME
|
||||||
)
|
)
|
||||||
# 外部环境变量包括:
|
|
||||||
# archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
|
||||||
# winSdkDir: ${{ steps.build.outputs.winSdkDir }}
|
|
||||||
# winSdkVer: ${{ steps.build.outputs.winSdkVer }}
|
|
||||||
# vcToolsInstallDir: ${{ steps.build.outputs.vcToolsInstallDir }}
|
|
||||||
# vcToolsRedistDir: ${{ steps.build.outputs.vcToolsRedistDir }}
|
|
||||||
# msvcArch: ${{ matrix.msvc_arch }}
|
|
||||||
|
|
||||||
|
|
||||||
# winSdkDir: C:\Program Files (x86)\Windows Kits\10\
|
|
||||||
# winSdkVer: 10.0.19041.0\
|
|
||||||
# vcToolsInstallDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\
|
|
||||||
# vcToolsRedistDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.28.29325\
|
|
||||||
# archiveName: 5.9.9-win32_msvc2015
|
|
||||||
# msvcArch: x86
|
|
||||||
|
|
||||||
$scriptDir = $PSScriptRoot
|
$scriptDir = $PSScriptRoot
|
||||||
$currentDir = Get-Location
|
$currentDir = Get-Location
|
||||||
|
@ -27,9 +12,9 @@ function Main() {
|
||||||
|
|
||||||
New-Item -ItemType Directory $archiveName
|
New-Item -ItemType Directory $archiveName
|
||||||
# 拷贝exe
|
# 拷贝exe
|
||||||
Copy-Item D:\a\RibbonUI\RibbonUI\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
Copy-Item D:\a\$REPO_NAME\$REPO_NAME\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
||||||
# 拷贝依赖
|
# 拷贝依赖
|
||||||
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName
|
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$APP_NAME
|
||||||
# 删除不必要的文件
|
# 删除不必要的文件
|
||||||
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
|
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
|
||||||
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
|
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
|
||||||
|
@ -43,8 +28,8 @@ function Main() {
|
||||||
Compress-Archive -Path $archiveName $archiveName'.zip'
|
Compress-Archive -Path $archiveName $archiveName'.zip'
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($null -eq $archiveName || $null -eq $targetName) {
|
if ($null -eq $archiveName || $null -eq $APP_NAME || $null -eq $REPO_NAME) {
|
||||||
Write-Host "args missing, archiveName is" $archiveName ", targetName is" $targetName
|
Write-Host "args missing, archiveName is" $archiveName ", APP_NAME is" $APP_NAME ", REPO_NAME is" $REPO_NAME
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Main
|
Main
|
||||||
|
|
Loading…
Reference in New Issue