Recreate gitlab jobs to attempt to be less resource intensive

This commit is contained in:
Manuel Cortez 2021-12-15 13:56:02 -06:00
parent d12a934280
commit e5c5c69d69
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790

View File

@ -6,11 +6,6 @@ variables:
NSIS: "C:\\program files (x86)\\nsis\\makensis.exe" NSIS: "C:\\program files (x86)\\nsis\\makensis.exe"
PIP_CACHE_DIR: "$CI_PROJECT_DIR\\.cache\\pip" PIP_CACHE_DIR: "$CI_PROJECT_DIR\\.cache\\pip"
cache:
paths:
- ".cache"
- "C:\\python37-32\\lib\\site-packages"
# The project defines 3 stages: # The project defines 3 stages:
# 1. Generate_docs: generates the documentation and update translation files. This uses the python docker image. # 1. Generate_docs: generates the documentation and update translation files. This uses the python docker image.
# 2. Build: Creates the executable file by using a windows runner. # 2. Build: Creates the executable file by using a windows runner.
@ -18,6 +13,7 @@ cache:
stages: stages:
- generate_docs - generate_docs
- build - build
- make_installer
- upload - upload
# This configures the environment for both channels # This configures the environment for both channels
@ -31,7 +27,6 @@ stages:
- echo ${time} - echo ${time}
- echo "started by ${GITLAB_USER_NAME}" - echo "started by ${GITLAB_USER_NAME}"
- choco install python --version 3.7.9 -y -ForceX86 - choco install python --version 3.7.9 -y -ForceX86
- choco install nsis -y -ForceX86
- '&$env:PYTHON3_32 -V' - '&$env:PYTHON3_32 -V'
- '&$env:PYTHON3_32 -m pip install --upgrade pip' - '&$env:PYTHON3_32 -m pip install --upgrade pip'
- '&$env:PYTHON3_32 -m pip install --upgrade -r requirements.txt' - '&$env:PYTHON3_32 -m pip install --upgrade -r requirements.txt'
@ -45,6 +40,7 @@ pages:
image: python image: python
interruptible: true interruptible: true
cache: cache:
key: 32bits
paths: paths:
- "C:\\Users\\gitlab_runner\\AppData\\Local\\Nuitka\\Nuitka\\Cache" - "C:\\Users\\gitlab_runner\\AppData\\Local\\Nuitka\\Nuitka\\Cache"
- ".cache" - ".cache"
@ -116,16 +112,15 @@ pages:
# build it all. # build it all.
- '&$env:PYTHON3_32 -m nuitka --mingw64 --standalone --enable-plugin=anti-bloat --noinclude-pytest-mode=nofollow --noinclude-setuptools-mode=nofollow --nofollow-import-to=numpy --nofollow-import-to=babel --nofollow-import-to=cx_freeze --nofollow-import-to=pil --include-data-file=../windows-dependencies/x86/oggenc2.exe=oggenc2.exe --include-data-file=../windows-dependencies/x86/bootstrap.exe=bootstrap.exe --include-data-file=app-configuration.defaults=app-configuration.defaults --include-data-dir=locales=locales --include-data-dir=documentation=documentation --include-data-dir=sounds=sounds --include-data-file=session.defaults=session.defaults --windows-disable-console --windows-file-description="Accessible VK Client for Windows" --windows-product-version=2021.12.14.0 --windows-file-version=2021.12.14.0 --windows-product-name="Socializer" --windows-company-name="MCV Software" --python-flag=no_site --assume-yes-for-downloads --remove-output "socializer.py"' - '&$env:PYTHON3_32 -m nuitka --mingw64 --standalone --enable-plugin=anti-bloat --noinclude-pytest-mode=nofollow --noinclude-setuptools-mode=nofollow --nofollow-import-to=numpy --nofollow-import-to=babel --nofollow-import-to=cx_freeze --nofollow-import-to=pil --include-data-file=../windows-dependencies/x86/oggenc2.exe=oggenc2.exe --include-data-file=../windows-dependencies/x86/bootstrap.exe=bootstrap.exe --include-data-file=app-configuration.defaults=app-configuration.defaults --include-data-dir=locales=locales --include-data-dir=documentation=documentation --include-data-dir=sounds=sounds --include-data-file=session.defaults=session.defaults --windows-disable-console --windows-file-description="Accessible VK Client for Windows" --windows-product-version=2021.12.14.0 --windows-file-version=2021.12.14.0 --windows-product-name="Socializer" --windows-company-name="MCV Software" --python-flag=no_site --assume-yes-for-downloads --remove-output "socializer.py"'
- '&$env:PYTHON3_32 ..\scripts\copy_missing_files.py' - '&$env:PYTHON3_32 ..\scripts\copy_missing_files.py'
# Once built, make the installer.
- '&$env:NSIS installer.nsi'
- cd .. - cd ..
- mkdir artifacts - mkdir artifacts
- cd scripts
# Zips the folder in order to create the portable socializer version. # Zips the folder in order to create the portable socializer version.
- cd scripts
- '&$env:PYTHON3_32 prepare_zipversion.py' - '&$env:PYTHON3_32 prepare_zipversion.py'
- cd .. - cd ..
- move src\socializer.zip artifacts\socializer_x86.zip - move src\socializer.zip artifacts\socializer_x86.zip
- mv src/socializer.dist artifacts/socializer
- move src/installer.nsi artifacts
- '&$env:PYTHON3_32 scripts/generate_update_file.py' - '&$env:PYTHON3_32 scripts/generate_update_file.py'
- move *.json artifacts - move *.json artifacts
only: only:
@ -135,6 +130,29 @@ pages:
- artifacts - artifacts
expire_in: 1 day expire_in: 1 day
generate_versions:
stage: make_installer
tags:
- shared-windows
- windows
- windows-1809
before_script:
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
- echo ${time}
- echo "started by ${GITLAB_USER_NAME}"
- choco install nsis -y -ForceX86
script:
- cd artifacts
- '&$env:NSIS installer.nsi'
only:
- tags
- master
- schedules
artifacts:
paths:
- artifacts
expire_in: 1 day
upload: upload:
stage: upload stage: upload
tags: tags: