Skip to content

Fix vcdlls

Fix vcdlls #323

Workflow file for this run

name: CMake
on:
push:
branches:
- "**"
tags-ignore:
- "**"
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
Windows:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
strategy:
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Configure SSH
run: |
Set-Service ssh-agent -StartupType Manual
Start-Service ssh-agent
git config --global core.sshCommand "'C:\Windows\System32\OpenSSH\ssh.exe'"
- name: Add SSH key
run: |
echo $env:SSH_PRIVATE_KEY | ssh-add -
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
- name: Add github.com to known_hosts
run: |
mkdir ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
#- name: Create VHD
# run: diskpart /s %GITHUB_WORKSPACE%\dsk.txt
#shell: cmd
- name: dir
run: |
dir "C:/Program Files (x86)/Windows Kits/10/Redist/"
dir "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Redist/MSVC/"
dir "C:/Program Files (x86)/Windows Kits/10/bin/"
shell: cmd
- name: Mkdir and Checkout submodule
run: |
mkdir programming
cd programming
mkdir bak
cd bak
git config --global http.postBuffer 5242880000
git config --global http.maxRequestBuffer 5242880000
git config --global pack.WindowMemory 5242880000
git config --global pack.packsizelimit 524288000
git config --global pack.window 1
git clone --jobs 1 [email protected]:kenkit/neon_service_b.git neon_service
cd neon_service
git submodule update --init --recursive
shell: cmd
working-directory: d:/
- name: Getting new tag
run: |
git fetch --tags --force
echo "name=$(./c_tag.sh )" >> $GITHUB_ENV
id: new_tag
shell: bash
- name: Test
run: echo $name
- uses: actions/cache@v3
id: cache
with:
path: d:\programming\qt-everywhere-opensource-src-4.8.7\
key: ${{ runner.os }}
- uses: suisei-cn/[email protected]
if: steps.cache.outputs.cache-hit != 'true'
id: downloadfile # Remember to give an ID if you need the output filename
name: download qt
with:
url: "https://www.dropbox.com/s/qsysephjsqa3b3i/pack.zip.gpg?dl=1"
target: d:/programming/
- uses: suisei-cn/[email protected]
id: downloadfile2 # Remember to give an ID if you need the output filename
name: download openssl
with:
url: "https://raw.githubusercontent.com/kenkit/neon_server/master/openssl.zip"
target: d:/programming/
- name: decrypt qt
if: steps.cache.outputs.cache-hit != 'true'
run: gpg --batch --yes --passphrase 1234 -o pack.zip -d pack.zip.gpg
working-directory: d:/programming/
- name: xtract qt
if: steps.cache.outputs.cache-hit != 'true'
run: 7z x d:/programming/pack.zip
working-directory: d:/programming/
- name: xtract openssl
run: 7z x d:/programming/openssl.zip
working-directory: d:/programming/
- name: echo qt path
run: dir d:\programming\qt-everywhere-opensource-src-4.8.7\lib
shell: cmd
working-directory: d:/programming/
- name: Install boost
uses: MarkusJx/[email protected]
id: install-boost
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/actions/boost-versions/blob/main/versions-manifest.json
boost_version: 1.81.0
platform_version: 2022
# OPTIONAL: Specify a toolset on windows
toolset: msvc
- 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 d:/programming/bak/neon_service/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: cmd
working-directory: d:/programming/bak/neon_service/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
run:
set PATH=%PATH%;D:\programming\qt-everywhere-opensource-src-4.8.7\bin &&
cmake -A Win32 ../
-DSTATIC_CRT=0
-DENABLE_LIBARCHIVE_PLUGIN=1
-DQT_QMAKE_EXECUTABLE=D:\programming\qt-everywhere-opensource-src-4.8.7/bin/qmake.exe
-DCMAKE_BUILD_TYPE=%BUILD_TYPE%
-DENABLE_WERROR=0
-DDISABLE_UTILITIES_PLUGIN=FALSE
-DDISABLE_BINARY_SIGN=TRUE
-DCMAKE_USE_WINSSL=0
-DCURL_USE_SCHANNEL=1
-DCMAKE_USE_OPENSSL=0
-DBUILD_TESTING=0
-DBUILD_SHARED_LIBS=1
-DENABLE_QTAPP_LOCAL_TESTING=0
-DHAVE_WCSCPY=1
-DHAVE_WCSLEN=1
-DUSE_MEDIAINFO=0
-DENABLE_CLOG=1
-DENABLE_LOG_PERFORMANCE=1
-DHAVE_FFMPEG=0
-DUSE_PREBUILT_3RDPARTY=1
-DENABLE_SHARED_PTR=1
-DUSE_FREEIMAGE=0
-DENABLE_SSL_SERVER=1
-DWINDOWS_KIT_VER=10.0.22000.0 -DVC_CRED_VER=14.38.33130
-DVC_EDITION=Enterprise
-DQT_MOC_EXECUTABLE=D:\programming\qt-everywhere-opensource-src-4.8.7\bin\moc.exe
-DQT_RCC_EXECUTABLE=D:\programming\qt-everywhere-opensource-src-4.8.7\bin\rcc.exe
-DOTHER_APP=MTK-QTAPP
-DENABLE_SPDLOG=1
-DENABLE_MEGA_CMAKE_PATCH=0
-DUSE_PDFIUM=0
-DENABLE_NBO_UNPACKER=1
-DBIT7Z_AUTO_FORMAT=1
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
OPENSSL_ROOT_DIR: D:\programming\openssl
CPACK_WIX_UPGRADE_GUID_NEON_SERVICE:
${{ secrets.CPACK_WIX_UPGRADE_GUID_NEON_SERVICE }}
#QTDIR : E:\programming\qt-everywhere-opensource-src-4.8.7
#QT4_DIR : E:\programming\qt-everywhere-opensource-src-4.8.7
#QT_BIN : E:\programming\qt-everywhere-opensource-src-4.8.7\bin
- name: Build
working-directory: d:/programming/bak/neon_service/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build . --config $BUILD_TYPE -j 2
- name: Create MSI Package
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: cmd
working-directory: d:/programming/bak/neon_service/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
run: cpack -C %BUILD_TYPE%
env:
CPACK_WIX_UPGRADE_GUID_NEON_SERVICE: ${{ secrets.CPACK_WIX_UPGRADE_GUID_NEON_SERVICE }}
- name: changelog
run: |
echo "NEON SERVICE CHANGELOG" | Add-Content -Encoding UTF8 -Path CHANGELOG.md
echo "************************" | Add-Content -Encoding UTF8 -Path CHANGELOG.md
git log -10 --pretty="%aD--%B" |Add-Content -Encoding UTF8 -Path CHANGELOG.md
shell: powershell
working-directory: d:/programming/bak/neon_service/
- name: "Upload symbols"
shell: cmd
working-directory: d:/programming/bak/neon_service/build
env:
QTAPP_SYMBOL_TOKEN: ${{ secrets.QTAPP_SYMBOL_TOKEN }}
NEON_SYMBOL_TOKEN: ${{ secrets.NEON_SYMBOL_TOKEN }}
SYMBOL_PASS: ${{ secrets.SYMBOL_PASS }}
run: |
cd %BUILD_TYPE%
7z a -tzip -ir!*.pdb archive.zip -mfb=64 -mx=9 -aoa
7z a -tzip -ir!*.pdb symbols.zip -mfb=64 -mx=9 -aoa -p%SYMBOL_PASS%
curl --progress-bar --data-binary @archive.zip -H \"Expect:\" %QTAPP_SYMBOL_TOKEN%
curl --progress-bar --data-binary @archive.zip -H \"Expect:\" %NEON_SYMBOL_TOKEN%
- name: "Create Release"
uses: ncipollo/release-action@v1
with:
artifacts: "d:/programming/bak/neon_service/build/*.msi,d:/programming/bak/neon_service/build/Debug/symbols.zip"
bodyFile: d:/programming/bak/neon_service/CHANGELOG.md
tag: ${{ env.name }}
token: ${{ secrets.SECRET_TOKEN }}
#- name: "Test"
# 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
# git diff --check HEAD^
#working-directory: d:/programming/bak/neon_service/build/
# shell: bash