From 4197c4366c953c2e4d3f82d03dc796fc8115dc38 Mon Sep 17 00:00:00 2001 From: Nova Date: Fri, 11 Jul 2025 15:30:00 +0330 Subject: [PATCH] add pdb and improve workflow --- .github/workflows/build.yml | 13 +++++-------- script/deploy_windows64.sh | 11 +++++++++++ script/env_deploy.sh | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb9dc47..ebd7e6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,13 +4,10 @@ on: workflow_dispatch: inputs: tag: - description: "Release Tag" + description: "Release Tag and version" required: true publish: - description: "Publish: If want ignore" - required: false - artifact-pack: - description: "artifact-pack: If want ignore" + description: "r for normal release, p for prerelease, leave empty to not publish anything" required: false jobs: build-go: @@ -98,6 +95,7 @@ jobs: runs-on: ${{ matrix.platform }} env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true + INPUT_VERSION: ${{ github.event.inputs.tag }} steps: - name: Checking out sources uses: actions/checkout@v4.2.2 @@ -149,7 +147,7 @@ jobs: export CMAKE_PREFIX_PATH=$PWD/qt6/build/lib/cmake mkdir build cd build - cmake -GNinja -DCMAKE_CXX_FLAGS="-static -DNDEBUG -s" .. + cmake -GNinja -DCMAKE_CXX_FLAGS="-static" -DCMAKE_BUILD_TYPE=Debug .. ninja -j2 cd .. ./script/deploy_windows64.sh @@ -192,7 +190,6 @@ jobs: path: artifacts.tgz publish: name: Pack & Publish Release - if: github.event.inputs.artifact-pack != 'y' runs-on: ubuntu-latest needs: - build-cpp @@ -264,6 +261,6 @@ jobs: run: | ./ghr -prerelease -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" deployment - name: Release - if: github.event.inputs.publish == '' + if: github.event.inputs.publish == 'r' run: | ./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" deployment diff --git a/script/deploy_windows64.sh b/script/deploy_windows64.sh index d5b5adf..1fe27b1 100755 --- a/script/deploy_windows64.sh +++ b/script/deploy_windows64.sh @@ -6,6 +6,17 @@ DEST=$DEPLOYMENT/windows64 rm -rf $DEST mkdir -p $DEST +#### get the pdb #### +curl -fLJO https://github.com/rainers/cv2pdb/releases/download/v0.53/cv2pdb-0.53.zip +7z x cv2pdb-0.53.zip -ocv2pdb +./cv2pdb/cv2pdb64.exe ./build/nekoray.exe ./tmp.exe ./nekoray.pdb +rm -rf cv2pdb-0.53.zip cv2pdb +cd build +strip -s nekoray.exe +cd .. +rm tmp.exe +mv nekoray.pdb $DEST + #### copy exe #### cp $BUILD/nekoray.exe $DEST diff --git a/script/env_deploy.sh b/script/env_deploy.sh index 5c174ff..74fc2ec 100755 --- a/script/env_deploy.sh +++ b/script/env_deploy.sh @@ -1,4 +1,4 @@ SRC_ROOT="$PWD" DEPLOYMENT="$SRC_ROOT/deployment" BUILD="$SRC_ROOT/build" -version_standalone="nekoray-"$(cat nekoray_version.txt) +version_standalone="nekoray-"$INPUT_VERSION