mirror of https://gitlab.com/pamhyr/pamhyr2
ci: Merge build and dir creation.
parent
5d6ae31ee9
commit
24aebfbcf8
135
.gitlab-ci.yml
135
.gitlab-ci.yml
|
|
@ -89,52 +89,6 @@ build-linux:
|
|||
stage: build
|
||||
tags:
|
||||
- linux
|
||||
script:
|
||||
- mkdir -p linux
|
||||
- cd linux
|
||||
# Setup virtual env
|
||||
- python3 -m venv linux-venv
|
||||
- . linux-venv/bin/activate
|
||||
- pip3 install -r ../requirements.txt
|
||||
# Run Pyinstaller
|
||||
- pyinstaller -y --paths linux-venv/lib/python3.8/site-packages ../src/pamhyr.py
|
||||
artifacts:
|
||||
paths:
|
||||
- linux/dist/pamhyr
|
||||
|
||||
build-windows:
|
||||
stage: build
|
||||
tags:
|
||||
- wine
|
||||
script:
|
||||
- mkdir windows
|
||||
- cd windows
|
||||
# Setup env
|
||||
- python -m pip install -r ..\requirements.txt
|
||||
# Run Pyinstaller
|
||||
- pyinstaller -y ../src/pamhyr.py
|
||||
artifacts:
|
||||
paths:
|
||||
- windows/dist/pamhyr
|
||||
|
||||
#########
|
||||
# TESTS #
|
||||
#########
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- echo "TODO PAMHYR tests"
|
||||
|
||||
############
|
||||
# PACKAGES #
|
||||
############
|
||||
|
||||
linux-package-dir:
|
||||
stage: package
|
||||
tags:
|
||||
- release
|
||||
- linux
|
||||
needs:
|
||||
- job: dl-mage-linux
|
||||
artifacts: true
|
||||
|
|
@ -144,13 +98,16 @@ linux-package-dir:
|
|||
artifacts: true
|
||||
- job: build-linux
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||
artifacts:
|
||||
paths:
|
||||
- linux/pamhyr
|
||||
script:
|
||||
- mkdir -p linux
|
||||
- cd linux
|
||||
# Setup virtual env
|
||||
- python3 -m venv linux-venv
|
||||
- . linux-venv/bin/activate
|
||||
- pip3 install -r ../requirements.txt
|
||||
# Run Pyinstaller
|
||||
- pyinstaller -y --paths linux-venv/lib/python3.8/site-packages ../src/pamhyr.py
|
||||
# Create directory
|
||||
- mkdir -p pamhyr
|
||||
# Copy Pamhyr info
|
||||
- cp -v ../VERSION pamhyr/
|
||||
|
|
@ -160,7 +117,7 @@ linux-package-dir:
|
|||
- mkdir -p pamhyr/mage
|
||||
- cp -v ../mage-linux/* pamhyr/mage/
|
||||
# Copy Pamhyr
|
||||
- cp -r ../dist/pamhyr pamhyr/
|
||||
- cp -r dist/pamhyr pamhyr/
|
||||
# Copy Pamhyr resources
|
||||
- mkdir -p pamhyr/pamhyr/View
|
||||
- mkdir -p pamhyr/pamhyr/View/ui
|
||||
|
|
@ -175,28 +132,13 @@ linux-package-dir:
|
|||
- mkdir -p pamhyr/tests_cases/
|
||||
- mkdir -p pamhyr/tests_cases/Saar
|
||||
- cp ../tests_cases/Saar/Saar.pamhyr pamhyr/tests_cases/Saar/
|
||||
|
||||
linux-package-tar:
|
||||
stage: package
|
||||
tags:
|
||||
- release
|
||||
- linux
|
||||
needs:
|
||||
- job: linux-package-dir
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||
artifacts:
|
||||
paths:
|
||||
- linux/pamhyr-gnulinux.tar.xz
|
||||
script:
|
||||
- cd linux
|
||||
- tar --xz -cf pamhyr-gnulinux.tar.xz ./pamhyr --checkpoint=.100
|
||||
- linux/pamhyr
|
||||
|
||||
windows-package-dir:
|
||||
stage: package
|
||||
build-windows:
|
||||
stage: build
|
||||
tags:
|
||||
- release
|
||||
- wine
|
||||
needs:
|
||||
- job: dl-mage-windows
|
||||
|
|
@ -207,13 +149,14 @@ windows-package-dir:
|
|||
artifacts: true
|
||||
- job: build-windows
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||
artifacts:
|
||||
paths:
|
||||
- windows/pamhyr
|
||||
script:
|
||||
- mkdir windows
|
||||
- cd windows
|
||||
# Setup env
|
||||
- python -m pip install -r ..\requirements.txt
|
||||
# Run Pyinstaller
|
||||
- pyinstaller -y ../src/pamhyr.py
|
||||
# Create directory
|
||||
- mkdir pamhyr
|
||||
# Copy Pamhyr info
|
||||
- copy /y ..\VERSION pamhyr\
|
||||
|
|
@ -221,10 +164,9 @@ windows-package-dir:
|
|||
- copy /y ..\LICENSE pamhyr\
|
||||
# Copy mage
|
||||
- mkdir pamhyr\mage
|
||||
- copy /y ..\mage-linux\* pamhyr\mage\
|
||||
- copy /y ..\mage-windows\* pamhyr\mage\
|
||||
# Copy Pamhyr
|
||||
- mkdir pamhyr\pamhyr
|
||||
- copy /y ..\dist\pamhyr pamhyr\
|
||||
- copy /y dist\pamhyr pamhyr\
|
||||
# Copy Pamhyr resources
|
||||
- mkdir pamhyr\pamhyr\View
|
||||
- mkdir pamhyr\pamhyr\View\ui
|
||||
|
|
@ -239,6 +181,39 @@ windows-package-dir:
|
|||
- mkdir pamhyr\tests_cases\
|
||||
- mkdir pamhyr\tests_cases\Saar
|
||||
- copy ..\tests_cases\Saar\Saar.pamhyr pamhyr\tests_cases\Saar\
|
||||
artifacts:
|
||||
paths:
|
||||
- windows/pamhyr
|
||||
|
||||
#########
|
||||
# TESTS #
|
||||
#########
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- echo "TODO PAMHYR tests"
|
||||
|
||||
############
|
||||
# PACKAGES #
|
||||
############
|
||||
|
||||
linux-package-tar:
|
||||
stage: package
|
||||
tags:
|
||||
- release
|
||||
- linux
|
||||
needs:
|
||||
- job: build-linux
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||
artifacts:
|
||||
paths:
|
||||
- linux/pamhyr-gnulinux.tar.xz
|
||||
script:
|
||||
- cd linux
|
||||
- tar --xz -cf pamhyr-gnulinux.tar.xz ./pamhyr --checkpoint=.100
|
||||
|
||||
windows-package-zip:
|
||||
stage: package
|
||||
|
|
@ -246,7 +221,7 @@ windows-package-zip:
|
|||
- release
|
||||
- linux
|
||||
needs:
|
||||
- job: windows-package-dir
|
||||
- job: build-windows
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||
|
|
@ -263,7 +238,7 @@ windows-package-exe:
|
|||
- release
|
||||
- wine
|
||||
needs:
|
||||
- job: windows-package-dir
|
||||
- job: build-windows
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||
|
|
|
|||
Loading…
Reference in New Issue