123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- 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"
- - apt install -qy zip
- script:
- - xvfb-run sh -c "wine pip install --no-warn-script-location -r requirements.py; 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 --onefile --windowed --noconfirm; wineserver -w"
- - mkdir -p dist/data/
- - cp -r data/* dist/data/
- only:
- - tags
- artifacts:
- name: "graph_exploring_tool%$CI_COMMIT_TAG"
- paths:
- - ./dist/*
|