Commit ee103116 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

Merge branch 'upx' into 'main'

fix: use latest upx

See merge request just-ci/templates!201
parents 9cf06030 075a0322
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -29,9 +29,9 @@ variables:
      - dist
      - pip-log.txt
    when: always
  # rules:  # Reenable when this one is released: https://gitlab.com/gitlab-org/gitlab/-/issues/283881
  #   - exists:
  #       - $PYINSTALLER_TARGET
  rules:
    - exists:
        - $PYINSTALLER_TARGET

# This doesn't use a container image as shared runners use virtual machines
python:pyinstaller:windows:
@@ -43,19 +43,14 @@ python:pyinstaller:windows:
      }
    - choco install -y python --no-progress
      ${PYINSTALLER_WINDOWS_CHOCO_EXTRA_ARGS}.Split()
    - choco install -y upx --no-progress
    - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
      + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
    - wget
      https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-win64.zip
      -OutFile upx.zip
    - Expand-Archive upx.zip C:\
    - mv C:\upx* C:\upx
    - If (-Not ${PYTHON_CONTEXT}) { ${PYTHON_CONTEXT}="." }
    - pip install -q --log=${CI_PROJECT_DIR}/pip-log.txt wheel
    - !reference [".python:pyinstaller", script]
    - pyinstaller --version
    - pyinstaller "${PYINSTALLER_TARGET}" ${PYINSTALLER_EXTRA_ARGS}.Split()
      --upx-dir C:\upx
    - |
      if (-Not "${PWD}" -eq "${CI_PROJECT_DIR}") {
        echo "[*] Moving output files to job root dir."