Commit e9f490f0 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

ci: Add windows.bat and change gitlab-ci for build with wine runner.

Showing with 70 additions and 36 deletions
+70 -36
stages: stages:
- build - build
- test - test
- package
- release - release
######### #########
...@@ -12,11 +13,16 @@ build: ...@@ -12,11 +13,16 @@ build:
script: script:
- echo "TODO build pamhyr" - echo "TODO build pamhyr"
# build-lang: build-lang:
# stage: build stage: build
# script: tags:
# - cd ./src/lang/ - linux
# - ./create_ts.sh script:
- cd ./src/lang/
- ./create_ts.sh
artifacts:
paths:
- src/lang/*.qm
######### #########
# TESTS # # TESTS #
...@@ -32,56 +38,64 @@ test: ...@@ -32,56 +38,64 @@ test:
############ ############
linux-package: linux-package:
stage: release stage: package
tags: tags:
- release - release
- linux - linux
rules: needs:
- if: $CI_COMMIT_BRANCH == 'master' - job: build-lang
- if: $CI_COMMIT_TAG artifacts: true
when: never # rules:
# - if: $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
# when: never
artifacts: artifacts:
paths: paths:
# - packages/pamhyr-src.tar.gz
- packages/pamhyr-gnulinux-amd64.tar.xz - packages/pamhyr-gnulinux-amd64.tar.xz
script: script:
- cd packages - cd packages
- ./linux.sh - ./linux.sh
# windows-package: windows-package:
# stage: release stage: package
# tags: tags:
# - release - release
# - wine - wine
# rules: needs:
# - if: $CI_COMMIT_BRANCH == 'master' - job: build-lang
# - if: $CI_COMMIT_TAG artifacts: true
# when: never # rules:
# artifacts: # - if: $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
# paths: # when: never
# - packages/pamhyr-win-amd64.zip artifacts:
# - packages/pamhyr-win-amd64.exe paths:
# script: - packages/pamhyr-win-amd64.exe
# - cd packages script:
# - ./wine.sh ci - cd packages
- ./windows.bat
###########
# RELEASE #
###########
tag-release: tag-release:
stage: release stage: release
tags: tags:
- release - release
- linux - linux
- wine needs:
- job: linux-package
artifacts: true
- job: windows-package
artifacts: true
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
artifacts: artifacts:
paths: paths:
- packages/pamhyr-gnulinux-amd64.tar.xz - packages/pamhyr-gnulinux-amd64.tar.xz
# - packages/pamhyr-win-amd64.zip
# - packages/pamhyr-win-amd64.exe
script: script:
- cd packages - cd packages
- ./linux.sh # - ./linux.sh
# - ./wine.sh ci # # - ./wine.sh ci
release: release:
name: '$CI_COMMIT_TAG' name: '$CI_COMMIT_TAG'
description: 'Automatic release from tag $CI_COMMIT_TAG' description: 'Automatic release from tag $CI_COMMIT_TAG'
...@@ -97,7 +111,7 @@ tag-release: ...@@ -97,7 +111,7 @@ tag-release:
# url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/packages/pamhyr-win-amd64.zip' # url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/packages/pamhyr-win-amd64.zip'
# filepath: '/packages/pamhyr-win-amd64.zip' # filepath: '/packages/pamhyr-win-amd64.zip'
# link_type: 'Packages' # link_type: 'Packages'
# - name: 'Windows amd64 (exe)' - name: 'Windows amd64 (exe)'
# url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/packages/pamhyr-win-amd64.exe' url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/packages/pamhyr-win-amd64.exe'
# filepath: '/packages/pamhyr-win-amd64.exe' filepath: '/packages/pamhyr-win-amd64.exe'
# link_type: 'Packages' link_type: 'other'
rem Windows batch for pamhyr windows version building
@ECHO ON
rem Python environment
python -m pip install -r ..\requirements.txt
rem Build windows version
pyinstaller ..\src\pamhyr.py -y
rem Copy data
mkdir dist\pamhyr\View\ui\ressources
mkdir dist\pamhyr\View\ui\Widgets
copy /y ..\src\View\ui\ressources\ dist\pamhyr\View\ui\ressources
copy /y ..\src\View\ui\Widgets\*.ui dist\pamhyr\View\ui\Widgets
copy /y ..\src\View\ui\*.ui dist\pamhyr\View\ui\
copy /y ..\src\lang\*.qm dist\pamhyr\lang\
rem Make installer
"C:\Program Files (x86)\NSIS\makensis.exe" pamhyr.nsi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment