Compare commits

...

20 Commits

Author SHA1 Message Date
196baef9e0 [ci] Test CI windows dep update 2022-09-30 20:31:57 +02:00
b08a0b616e [ci] Finish setting up #2 2022-09-30 20:31:03 +02:00
5ae7650e63 [ci] Finish setting up 2022-09-30 20:29:10 +02:00
06be91dfa0 [ci] Add job to update windows deps #19 2022-09-30 20:27:10 +02:00
710084db73 [ci] Add job to update windows deps #18 2022-09-30 20:23:44 +02:00
74e58ef9d1 [ci] Add job to update windows deps #17 2022-09-30 20:20:25 +02:00
5f6a67c2b2 [ci] Add job to update windows deps #16 2022-09-30 20:18:42 +02:00
f5527b315e [ci] Add job to update windows deps #15 2022-09-30 20:06:48 +02:00
61ae41c8e0 [ci] Add job to update windows deps #14 2022-09-30 20:04:57 +02:00
39e17286b5 [ci] Add job to update windows deps #13 2022-09-30 19:35:49 +02:00
2b885a7be1 [ci] Add job to update windows deps #12 2022-09-30 19:34:42 +02:00
123ea65f2b [ci] Convert to DAG and commit windows artifacts from Linux, because SSH in Windows is really stubborn 2022-09-30 19:33:34 +02:00
845cc1ca16 [ci] Add job to update windows deps #11 2022-09-30 19:12:36 +02:00
1686372dbd [ci] Add job to update windows deps #10 2022-09-30 18:42:02 +02:00
82a0ffbdcf [ci] Add job to update windows deps #9 2022-09-30 18:02:55 +02:00
e80ccd4aeb [ci] Add job to update windows deps #8 2022-09-30 17:56:55 +02:00
a8e640cf2e [ci] Add job to update windows deps #7 2022-09-30 17:55:26 +02:00
778e3953f8 [ci] Add job to update windows deps #6 2022-09-30 17:46:40 +02:00
242b738871 [ci] Add job to update windows deps #5 2022-09-30 17:46:20 +02:00
0f65475b84 [ci] Add job to update windows deps #4 2022-09-30 17:33:21 +02:00
2 changed files with 52 additions and 74 deletions

View File

@ -15,16 +15,7 @@ workflow:
when: never when: never
- when: always - when: always
stages:
- prepare
- deps
- build
- deploy
- release
prepare: prepare:
stage: prepare
before_script: before_script:
- pip install setuptools_scm>=6.2 - pip install setuptools_scm>=6.2
script: script:
@ -42,7 +33,6 @@ prepare:
dotenv: build.env dotenv: build.env
update_windows_deps: update_windows_deps:
stage: deps
tags: tags:
- shared-windows - shared-windows
- windows - windows
@ -51,31 +41,50 @@ update_windows_deps:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
when: never when: never
- if: $CI_COMMIT_BRANCH == "main" - if: $CI_COMMIT_BRANCH == "main"
changes:
- Pipfile
- Pipfile.lock
when: always when: always
#- changes:
# - Pipfile
# - Pipfile.lock
# when: always
before_script: before_script:
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
- choco install python --version=$PYTHON_VERSION -y --no-progress - choco install python --version=$PYTHON_VERSION -y --no-progress
- choco install openssh -y --no-progress
- refreshenv - refreshenv
- python --version - python --version
- pip install pipenv - 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: script:
- pipenv lock --dev --keep-outdated - pipenv lock --dev --keep-outdated
- git commit -m "Updated windows deps from CI" Pipfile.lock artifacts:
- git push 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: package_linux:
stage: build needs:
- prepare
before_script: before_script:
- python --version - python --version
- pip install pipenv - pip install pipenv
@ -89,7 +98,8 @@ package_linux:
- dist/fime_linux_* - dist/fime_linux_*
package_windows: package_windows:
stage: build needs:
- prepare
tags: tags:
- shared-windows - shared-windows
- windows - windows
@ -98,18 +108,21 @@ package_windows:
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
before_script: before_script:
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
- choco install python --version=$PYTHON_VERSION -y --no-progress - choco install python --version=$PYTHON_VERSION -y --no-progress
- C:\\Python310\\python.exe --version - refreshenv
- C:\\Python310\\python.exe -m pip install pipenv - python --version
- C:\\Python310\\python.exe -m pipenv sync --dev - pip install pipenv
- pipenv sync --dev
script: 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: artifacts:
paths: paths:
- dist/fime_windows_* - dist/fime_windows_*
pypi_package: pypi_upload:
stage: deploy needs:
- package_linux
environment: pypi environment: pypi
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
@ -118,8 +131,10 @@ pypi_package:
script: script:
- twine upload dist/fime-*.whl - twine upload dist/fime-*.whl
gitlab_package: gitlab_package_upload:
stage: deploy needs:
- package_linux
- package_windows
image: curlimages/curl:latest image: curlimages/curl:latest
rules: rules:
- if: $CI_COMMIT_TAG - 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" curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "dist/${WINDOWS_AMD64_BINARY}.exe" "${PACKAGE_REGISTRY_URL}/${WINDOWS_AMD64_BINARY}.exe"
release_job: release_job:
stage: release needs:
- gitlab_package_upload
image: registry.gitlab.com/gitlab-org/release-cli:latest image: registry.gitlab.com/gitlab-org/release-cli:latest
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG

44
Pipfile.lock generated
View File

@ -32,14 +32,6 @@
"markers": "python_full_version >= '3.6.0'", "markers": "python_full_version >= '3.6.0'",
"version": "==2.1.1" "version": "==2.1.1"
}, },
"colorama": {
"hashes": [
"sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da",
"sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"
],
"markers": "sys_platform == 'win32'",
"version": "==0.4.5"
},
"idna": { "idna": {
"hashes": [ "hashes": [
"sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4", "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'", "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" "version": "==1.26.12"
},
"win32-setctime": {
"hashes": [
"sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2",
"sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"
],
"markers": "sys_platform == 'win32'",
"version": "==1.1.0"
} }
}, },
"develop": { "develop": {
@ -158,13 +142,6 @@
"markers": "sys_platform == 'linux'", "markers": "sys_platform == 'linux'",
"version": "==0.8.0" "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": { "packaging": {
"hashes": [ "hashes": [
"sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb", "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb",
@ -173,13 +150,6 @@
"index": "pypi", "index": "pypi",
"version": "==21.3" "version": "==21.3"
}, },
"pefile": {
"hashes": [
"sha256:a5488a3dd1fd021ce33f969780b88fe0f7eebb76eb20996d7318f307612a045b"
],
"markers": "sys_platform == 'win32'",
"version": "==2022.5.30"
},
"pep517": { "pep517": {
"hashes": [ "hashes": [
"sha256:4ba4446d80aed5b5eac6509ade100bff3e7943a8489de249654a5ae9b33ee35b", "sha256:4ba4446d80aed5b5eac6509ade100bff3e7943a8489de249654a5ae9b33ee35b",
@ -221,21 +191,13 @@
"markers": "python_full_version >= '3.6.8'", "markers": "python_full_version >= '3.6.8'",
"version": "==3.0.9" "version": "==3.0.9"
}, },
"pywin32-ctypes": {
"hashes": [
"sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942",
"sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"
],
"markers": "sys_platform == 'win32'",
"version": "==0.2.0"
},
"setuptools": { "setuptools": {
"hashes": [ "hashes": [
"sha256:a8f6e213b4b0661f590ccf40de95d28a177cd747d098624ad3f69c40287297e9", "sha256:1b6bdc6161661409c5f21508763dc63ab20a9ac2f8ba20029aaaa7fdb9118012",
"sha256:c2d2709550f15aab6c9110196ea312f468f41cd546bceb24127a1be6fdcaeeb1" "sha256:3050e338e5871e70c72983072fe34f6032ae1cdeeeb67338199c2f74e083a80e"
], ],
"markers": "python_version >= '3.7'", "markers": "python_version >= '3.7'",
"version": "==65.4.0" "version": "==65.4.1"
}, },
"tomli": { "tomli": {
"hashes": [ "hashes": [