Windows packaging & merge two workflow yaml files (#898)
* chore: add win setup assets & using CPack * chore: add windows packaging & merge the previous cmake-windows.yml into build_cmake.yml
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
name: Packaging
|
||||
name: Packaging(Linux)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE'
|
||||
|
||||
env:
|
||||
PRODUCT: flameshot
|
||||
@@ -22,6 +28,7 @@ jobs:
|
||||
deb-pack:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
dist: [debian-10, ubuntu-20.04]
|
||||
steps:
|
||||
@@ -61,6 +68,7 @@ jobs:
|
||||
rpm-pack:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
dist: [fedora-31, fedora-32, opensuse-leap-15.2]
|
||||
steps:
|
||||
131
.github/workflows/Windows-pack.yml
vendored
Normal file
131
.github/workflows/Windows-pack.yml
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
name: Packaging(Windows)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE'
|
||||
|
||||
env:
|
||||
PRODUCT: flameshot
|
||||
VERSION: 0.8.0
|
||||
|
||||
jobs:
|
||||
windows-pack:
|
||||
name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
|
||||
runs-on: windows-2019
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
qt_ver: [5.15.0]
|
||||
qt_target: [desktop]
|
||||
config:
|
||||
- {
|
||||
arch: x86,
|
||||
generator: "-G'Visual Studio 16 2019' -A Win32",
|
||||
vcpkg_triplet: x86-windows,
|
||||
qt_arch: win32_msvc2019,
|
||||
qt_arch_install: msvc2019,
|
||||
pak_arch: win32
|
||||
}
|
||||
- {
|
||||
arch: x64,
|
||||
generator: "-G'Visual Studio 16 2019' -A x64",
|
||||
vcpkg_triplet: x64-windows,
|
||||
qt_arch: win64_msvc2019_64,
|
||||
qt_arch_install: msvc2019_64,
|
||||
pak_arch: win64
|
||||
}
|
||||
type: [portable, installer]
|
||||
env:
|
||||
VCINSTALLDIR: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/
|
||||
Qt5_DIR: ${{ github.workspace }}\build\Qt\${{ matrix.qt_ver }}\${{ matrix.config.qt_arch_install }}\lib\cmake\Qt5\
|
||||
QTDIR: ${{ github.workspace }}\build\Qt\${{ matrix.qt_ver }}\${{ matrix.config.qt_arch_install }}\
|
||||
|
||||
steps:
|
||||
- name: Checkout Source code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Cache Qt
|
||||
id: cache-qt
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ./build/Qt/${{ matrix.qt_ver }}/${{ matrix.config.qt_arch_install }}
|
||||
key: ${{ runner.os }}-QtCache/${{ matrix.qt_ver }}/${{ matrix.config.qt_arch }}
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ matrix.qt_ver }}
|
||||
target: ${{ matrix.qt_target }}
|
||||
arch: ${{ matrix.config.qt_arch }}
|
||||
dir: '${{ github.workspace }}/build/'
|
||||
modules: 'qtscript'
|
||||
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
||||
|
||||
- name: Configure
|
||||
working-directory: build
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake .. ${{matrix.config.generator}} `
|
||||
-DCMAKE_BUILD_TYPE=Release `
|
||||
-DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }}
|
||||
|
||||
- name: Compile
|
||||
working-directory: build
|
||||
shell: pwsh
|
||||
run: cmake --build . --config Release
|
||||
|
||||
- name: CPack
|
||||
working-directory: build
|
||||
shell: pwsh
|
||||
run: |
|
||||
If ($env:TYPE -eq "installer")
|
||||
{
|
||||
cpack -G WIX -B "$env:GITHUB_WORKSPACE\build\Package"
|
||||
}
|
||||
ElseIf($env:TYPE -eq "portable")
|
||||
{
|
||||
cpack -G ZIP -B "$env:GITHUB_WORKSPACE\build\Package"
|
||||
}
|
||||
env:
|
||||
TYPE: ${{matrix.type}}
|
||||
|
||||
- name: Package Clean
|
||||
run: rm -r $env:GITHUB_WORKSPACE\build\Package\_CPack_Packages
|
||||
|
||||
- name: SHA256Sum of Windows installer(daily build)
|
||||
if: matrix.type == 'installer'
|
||||
shell: bash
|
||||
run: |
|
||||
sha256sum $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi
|
||||
|
||||
- name: SHA256Sum of Windows portable(daily build)
|
||||
if: matrix.type == 'portable'
|
||||
shell: bash
|
||||
run: |
|
||||
sha256sum $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip
|
||||
|
||||
- name: Upload Windows installer(daily build)
|
||||
if: matrix.type == 'installer'
|
||||
shell: bash
|
||||
run: |
|
||||
python -m pip install -U -q requests
|
||||
echo "================Windows installer downlod link================"
|
||||
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi)
|
||||
echo "=====no operation for you can see link in the log console====="
|
||||
|
||||
- name: Upload Windows portable(daily build)
|
||||
if: matrix.type == 'portable'
|
||||
shell: bash
|
||||
run: |
|
||||
python -m pip install -U -q requests
|
||||
echo "================Windows portable downlod link================"
|
||||
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip)
|
||||
echo "=====no operation for you can see link in the log console====="
|
||||
158
.github/workflows/build_cmake.yml
vendored
158
.github/workflows/build_cmake.yml
vendored
@@ -1,67 +1,125 @@
|
||||
name: CMake
|
||||
name: Building(CMake)
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'LICENSE'
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
linux-build:
|
||||
name: ${{ matrix.os}}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
os: [ubuntu-20.04]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get -y -qq update
|
||||
sudo apt-get -y --no-install-recommends install \
|
||||
cmake \
|
||||
extra-cmake-modules \
|
||||
build-essential \
|
||||
qt5-default \
|
||||
qt5-qmake \
|
||||
qttools5-dev-tools \
|
||||
qttools5-dev \
|
||||
libqt5dbus5 \
|
||||
libqt5network5 \
|
||||
libqt5core5a \
|
||||
libqt5widgets5 \
|
||||
libqt5gui5 \
|
||||
libqt5svg5-dev
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get -y -qq update
|
||||
sudo apt-get -y --no-install-recommends install \
|
||||
cmake \
|
||||
extra-cmake-modules \
|
||||
build-essential \
|
||||
qt5-default \
|
||||
qt5-qmake \
|
||||
qttools5-dev-tools \
|
||||
qttools5-dev \
|
||||
libqt5dbus5 \
|
||||
libqt5network5 \
|
||||
libqt5core5a \
|
||||
libqt5widgets5 \
|
||||
libqt5gui5 \
|
||||
libqt5svg5-dev
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
#
|
||||
# We need to source the profile file to make sure conan is in PATH
|
||||
run: |
|
||||
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
#
|
||||
# We need to source the profile file to make sure conan is in PATH
|
||||
run: |
|
||||
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C $BUILD_TYPE
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C $BUILD_TYPE
|
||||
|
||||
windows-build:
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "Windows 2019 MSVC",
|
||||
artifact: "Windows-MSVC.tar.xz",
|
||||
os: windows-2019,
|
||||
cc: "cl", cxx: "cl",
|
||||
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
|
||||
}
|
||||
- {
|
||||
name: "Windows 2019 MinGW",
|
||||
artifact: "Windows-MinGW.tar.xz",
|
||||
os: windows-2019,
|
||||
cc: "gcc", cxx: "g++"
|
||||
}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Cache Qt
|
||||
id: cache-qt
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ./build/Qt
|
||||
key: ${{ runner.os }}-QtCache
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: 5.15.0
|
||||
target: desktop
|
||||
dir: '${{ github.workspace }}/build/'
|
||||
|
||||
- name: Configure
|
||||
working-directory: build
|
||||
shell: powershell
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE ../
|
||||
|
||||
- name: Build
|
||||
working-directory: build
|
||||
shell: powershell
|
||||
run: |
|
||||
cmake --build . --config $env:BUILD_TYPE
|
||||
44
.github/workflows/cmake-windows.yml
vendored
44
.github/workflows/cmake-windows.yml
vendored
@@ -1,44 +0,0 @@
|
||||
name: Windows Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.config.name }}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "Windows Latest MSVC", artifact: "Windows-MSVC.tar.xz",
|
||||
os: windows-latest,
|
||||
cc: "cl", cxx: "cl",
|
||||
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
|
||||
}
|
||||
- {
|
||||
name: "Windows Latest MinGW", artifact: "Windows-MinGW.tar.xz",
|
||||
os: windows-latest,
|
||||
cc: "gcc", cxx: "g++"
|
||||
}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
|
||||
- name: Configure
|
||||
shell: powershell
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D CMAKE_BUILD_TYPE=Release ../
|
||||
- name: Build
|
||||
shell: powershell
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config Release
|
||||
|
||||
Reference in New Issue
Block a user