1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- image: docker:20.10.22
- variables:
- DOCKER_DRIVER: overlay2
- DOCKER_TLS_CERTDIR: "/certs"
- DOCKER_HOST: tcp://docker:2376
- # Where to publish this build's tagged working container.
- DOCKER_SHA: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- DOCKER_BRANCH: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
- DOCKER_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
- DOCKER_LATEST: $CI_REGISTRY_IMAGE:latest
- services:
- - docker:20.10.22-dind
- stages:
- - build
- - test
- - release
- before_script:
- - docker info
- - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- build-upload:
- image: python:3.11
- stage: build
- before_script:
- - python -V
- - echo "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi"
- script:
- - pip install build twine flit
- - FLIT_INDEX_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi flit build
- - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
- only:
- - tags
- .build-upload-pypi:
- image: python:3.11
- stage: build
- before_script:
- - python -V
- - echo "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi"
- script:
- - pip install build twine flit
- - flit build
- - python -m twine upload dist/*
- only:
- - tags
- build-windows-exe:
- image: tobix/pywine:3.11 # Use this image instead of the custom one. It's maintained and easier. registry.rys.one/arrys/pyinstaller
- stage: build
- before_script:
- - echo "Building windows executable"
- script:
- - xvfb-run sh -c "wine python.exe -m pip install --upgrade pip; wineserver -w"
- - xvfb-run sh -c "wine python.exe -m pip install --no-warn-script-location -r requirements.txt; wineserver -w"
- # - xvfb-run sh -c "wine pyinstaller graph_exploring_tool/__main__.py --onefile --add-data data:data --collect-all graph-exploring-tool --windowed --noconfirm; wineserver -w"
- # - xvfb-run sh -c "wine pyinstaller graph_exploring_tool/__main__.py --name get.exe --paths=graph_exploring_tool --noconfirm; wineserver -w"
- - xvfb-run sh -c "wine pyinstaller graph_exploring_tool/__main__.py --name get.exe --paths=graph_exploring_tool --windowed --noconfirm; wineserver -w"
- - ls -la dist
- - mv dist/get.exe/* ./
- after_script:
- - rm -rf build # excluding build from artifacts doesn't work because of untracked being set to true
- rules:
- - if: $CI_COMMIT_TAG
- - if: $CI_PIPELINE_SOURCE == "push" || $CI_COMMIT_BRANCH == "dev"
- when: manual
- allow_failure: true
- artifacts:
- name: "graph_exploring_tool%$CI_COMMIT_TAG"
- untracked: true
- paths:
- - data
|