Compare commits
20 Commits
10a481e606
...
196baef9e0
Author | SHA1 | Date | |
---|---|---|---|
196baef9e0 | |||
b08a0b616e | |||
5ae7650e63 | |||
06be91dfa0 | |||
710084db73 | |||
74e58ef9d1 | |||
5f6a67c2b2 | |||
f5527b315e | |||
61ae41c8e0 | |||
39e17286b5 | |||
2b885a7be1 | |||
123ea65f2b | |||
845cc1ca16 | |||
1686372dbd | |||
82a0ffbdcf | |||
e80ccd4aeb | |||
a8e640cf2e | |||
778e3953f8 | |||
242b738871 | |||
0f65475b84 |
@ -15,16 +15,7 @@ workflow:
|
||||
when: never
|
||||
- when: always
|
||||
|
||||
|
||||
stages:
|
||||
- prepare
|
||||
- deps
|
||||
- build
|
||||
- deploy
|
||||
- release
|
||||
|
||||
prepare:
|
||||
stage: prepare
|
||||
before_script:
|
||||
- pip install setuptools_scm>=6.2
|
||||
script:
|
||||
@ -42,7 +33,6 @@ prepare:
|
||||
dotenv: build.env
|
||||
|
||||
update_windows_deps:
|
||||
stage: deps
|
||||
tags:
|
||||
- shared-windows
|
||||
- windows
|
||||
@ -51,31 +41,50 @@ update_windows_deps:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
- if: $CI_COMMIT_BRANCH == "main"
|
||||
changes:
|
||||
- Pipfile
|
||||
- Pipfile.lock
|
||||
when: always
|
||||
#- changes:
|
||||
# - Pipfile
|
||||
# - Pipfile.lock
|
||||
# when: always
|
||||
before_script:
|
||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||
- choco install python --version=$PYTHON_VERSION -y --no-progress
|
||||
- choco install openssh -y --no-progress
|
||||
- refreshenv
|
||||
- python --version
|
||||
- pip install pipenv
|
||||
- Get-Service -Name ssh-agent | Set-Service -StartupType Manual
|
||||
- ssh-agent
|
||||
- ssh-add "${WINDOWS_SSH_PRIVATE_KEY}"
|
||||
- git config --global user.name "Gitlab CI"
|
||||
- git config --global user.email "ci@gitlab.com"
|
||||
script:
|
||||
- pipenv lock --dev --keep-outdated
|
||||
- git commit -m "Updated windows deps from CI" Pipfile.lock
|
||||
- git push
|
||||
artifacts:
|
||||
paths:
|
||||
- Pipfile.lock
|
||||
|
||||
# commit from linux, because setting up SSH in Windows is a fucking nightmare
|
||||
commit_windows_deps:
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
- if: $CI_COMMIT_BRANCH == "main"
|
||||
changes:
|
||||
- Pipfile
|
||||
- Pipfile.lock
|
||||
when: always
|
||||
needs:
|
||||
- update_windows_deps
|
||||
image: alpine
|
||||
before_script:
|
||||
- apk add --update git openssh-client
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY_REPO_WRITE" | ssh-add -
|
||||
- git config --global user.name "Gitlab CI"
|
||||
- git config --global user.email "ci@gitlab.com"
|
||||
- git remote rm origin && git remote add origin "git@gitlab.com:${CI_PROJECT_PATH}.git"
|
||||
script:
|
||||
- dos2unix Pipfile.lock
|
||||
- git commit -m "Updated windows deps from CI" Pipfile.lock || echo "No changes"
|
||||
- GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git push origin HEAD:$CI_COMMIT_REF_NAME
|
||||
|
||||
package_linux:
|
||||
stage: build
|
||||
needs:
|
||||
- prepare
|
||||
before_script:
|
||||
- python --version
|
||||
- pip install pipenv
|
||||
@ -89,7 +98,8 @@ package_linux:
|
||||
- dist/fime_linux_*
|
||||
|
||||
package_windows:
|
||||
stage: build
|
||||
needs:
|
||||
- prepare
|
||||
tags:
|
||||
- shared-windows
|
||||
- windows
|
||||
@ -98,18 +108,21 @@ package_windows:
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
before_script:
|
||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||
- choco install python --version=$PYTHON_VERSION -y --no-progress
|
||||
- C:\\Python310\\python.exe --version
|
||||
- C:\\Python310\\python.exe -m pip install pipenv
|
||||
- C:\\Python310\\python.exe -m pipenv sync --dev
|
||||
- refreshenv
|
||||
- python --version
|
||||
- pip install pipenv
|
||||
- pipenv sync --dev
|
||||
script:
|
||||
- C:\\Python310\\python.exe -m pipenv run pyinstaller --onefile --windowed --name "${WINDOWS_AMD64_BINARY}" -i icon.ico src/fime/main.py
|
||||
- pipenv run pyinstaller --onefile --windowed --name "${WINDOWS_AMD64_BINARY}" -i icon.ico src/fime/main.py
|
||||
artifacts:
|
||||
paths:
|
||||
- dist/fime_windows_*
|
||||
|
||||
pypi_package:
|
||||
stage: deploy
|
||||
pypi_upload:
|
||||
needs:
|
||||
- package_linux
|
||||
environment: pypi
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
@ -118,8 +131,10 @@ pypi_package:
|
||||
script:
|
||||
- twine upload dist/fime-*.whl
|
||||
|
||||
gitlab_package:
|
||||
stage: deploy
|
||||
gitlab_package_upload:
|
||||
needs:
|
||||
- package_linux
|
||||
- package_windows
|
||||
image: curlimages/curl:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
@ -131,7 +146,8 @@ gitlab_package:
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "dist/${WINDOWS_AMD64_BINARY}.exe" "${PACKAGE_REGISTRY_URL}/${WINDOWS_AMD64_BINARY}.exe"
|
||||
|
||||
release_job:
|
||||
stage: release
|
||||
needs:
|
||||
- gitlab_package_upload
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
|
44
Pipfile.lock
generated
44
Pipfile.lock
generated
@ -32,14 +32,6 @@
|
||||
"markers": "python_full_version >= '3.6.0'",
|
||||
"version": "==2.1.1"
|
||||
},
|
||||
"colorama": {
|
||||
"hashes": [
|
||||
"sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da",
|
||||
"sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==0.4.5"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4",
|
||||
@ -131,14 +123,6 @@
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'",
|
||||
"version": "==1.26.12"
|
||||
},
|
||||
"win32-setctime": {
|
||||
"hashes": [
|
||||
"sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2",
|
||||
"sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==1.1.0"
|
||||
}
|
||||
},
|
||||
"develop": {
|
||||
@ -158,13 +142,6 @@
|
||||
"markers": "sys_platform == 'linux'",
|
||||
"version": "==0.8.0"
|
||||
},
|
||||
"future": {
|
||||
"hashes": [
|
||||
"sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"
|
||||
],
|
||||
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
||||
"version": "==0.18.2"
|
||||
},
|
||||
"packaging": {
|
||||
"hashes": [
|
||||
"sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb",
|
||||
@ -173,13 +150,6 @@
|
||||
"index": "pypi",
|
||||
"version": "==21.3"
|
||||
},
|
||||
"pefile": {
|
||||
"hashes": [
|
||||
"sha256:a5488a3dd1fd021ce33f969780b88fe0f7eebb76eb20996d7318f307612a045b"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==2022.5.30"
|
||||
},
|
||||
"pep517": {
|
||||
"hashes": [
|
||||
"sha256:4ba4446d80aed5b5eac6509ade100bff3e7943a8489de249654a5ae9b33ee35b",
|
||||
@ -221,21 +191,13 @@
|
||||
"markers": "python_full_version >= '3.6.8'",
|
||||
"version": "==3.0.9"
|
||||
},
|
||||
"pywin32-ctypes": {
|
||||
"hashes": [
|
||||
"sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942",
|
||||
"sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==0.2.0"
|
||||
},
|
||||
"setuptools": {
|
||||
"hashes": [
|
||||
"sha256:a8f6e213b4b0661f590ccf40de95d28a177cd747d098624ad3f69c40287297e9",
|
||||
"sha256:c2d2709550f15aab6c9110196ea312f468f41cd546bceb24127a1be6fdcaeeb1"
|
||||
"sha256:1b6bdc6161661409c5f21508763dc63ab20a9ac2f8ba20029aaaa7fdb9118012",
|
||||
"sha256:3050e338e5871e70c72983072fe34f6032ae1cdeeeb67338199c2f74e083a80e"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==65.4.0"
|
||||
"version": "==65.4.1"
|
||||
},
|
||||
"tomli": {
|
||||
"hashes": [
|
||||
|
Loading…
Reference in New Issue
Block a user