Skip to content

Commit

Permalink
Upload the archive for Windows and run a test to download the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
MinyazevR committed Dec 13, 2024
1 parent 79ddb52 commit 1b09b43
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ on:
required: false
type: number
default: 0
shell:
required: false
type: string
default: shell
deploy_archive:
required: false
type: boolean
default: false
jobs:
job:
defaults:
run:
shell: bash
shell: ${{ inputs.shell }}

runs-on: ${{ inputs.os }}
container: ${{ inputs.container_name }}
Expand Down Expand Up @@ -67,6 +75,16 @@ jobs:
env:
CONCURRENCY: ${{ inputs.concurrency }}

- name: Push zip archive to dl
if: ${{ inputs.deploy_archive && github.event_name != 'pull_request' && github.repository_owner == 'trikset' }}
run: |
BRANCH_NAME="${GITHUB_REF#refs/*/}" && BRANCH_NAME=${BRANCH_NAME//\//-}
zip -r trik-studio.zip "$APP_DIR"
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.DL_PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
rsync -v --rsh="ssh -o StrictHostKeyChecking=no" trik-studio.zip ${{ secrets.DL_USERNAME }}@${{ secrets.DL_HOST }}:~/dl/ts/fresh/installer/trik-studio-"$BRANCH_NAME"-x86_64.zip
if: startsWith(inputs.os, 'windows')

- name: Reinstall trik-studio and dll search
run: |
export UNINSTALL_SCRIPT_PATH=$GITHUB_WORKSPACE/trik_studio_uninstallscript.qs
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/windows_build_with_installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,12 @@ jobs:
.\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN
choco install far dependencies
.\ngrok\ngrok.exe tcp 3389
install-windows-installer:
needs: [build]
uses: ./.github/workflows/installer.yml
with:
os: windows-latest
artifact_name: trik-studio-auto-installer-qt5.15
shell: msys2 {0}
secrets: inherit
27 changes: 27 additions & 0 deletions buildScripts/github/install_installer_Windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -eux

./"$INSTALLER_NAME" --verbose --script trik_studio_installscript.qs --mco "$CONCURRENCY"

PREFIX="/C"

BIN_DIR="$PREFIX"/TRIKStudio && echo "BIN_DIR=$BIN_DIR" >> $GITHUB_ENV
LIB_DIR="$PREFIX"/TRIKStudio && echo "LIB_DIR=$LIB_DIR" >> $GITHUB_ENV
APP_DIR="$PREFIX"/TRIKStudio && echo "APP_DIR=$APP_DIR" >> $GITHUB_ENV

export LD_LIBRARY_PATH="$LIB_DIR"
"$BIN_DIR"/2D-model.exe --version
"$APP_DIR"/maintenance.exe --version
"$APP_DIR"/trik-studio.exe --version
"$BIN_DIR"/patcher.exe --version

cd "$LIB_DIR"

# Find dependencies that have not been packaged, but are still in the system
()
ls -- *.dll* | xargs ldd | grep -Ev "not found$" | grep dll | sed -e '/^[^\t]/ d' | sed -e 's/\t//' \
| sed -e 's/.*=..//' | sed -e 's/ (0.*)//' | grep -Ev "(System|SYSTEM)32.*dll.*" \
| grep -Ev "$LD_LIBRARY_PATH"

ls -- *.dll* | xargs ldd | grep "not found" || exit 0
exit 1

0 comments on commit 1b09b43

Please sign in to comment.