forked from LBRYCommunity/lbry-sdk
gitlab builds on windows
what's left: - github build progress notifications (need to upgrade to Gitlab Silver for this) - github releases - uploading coverage results to codecov.io - what directories to cache between builds
This commit is contained in:
parent
6112f60681
commit
68367125e1
2 changed files with 45 additions and 0 deletions
|
@ -119,6 +119,33 @@ build:mac:
|
||||||
after_script:
|
after_script:
|
||||||
- rm -rf "${VENV}"
|
- rm -rf "${VENV}"
|
||||||
|
|
||||||
|
build:windows:
|
||||||
|
extends: .build
|
||||||
|
tags: [windows] # makes gitlab use the windows runner
|
||||||
|
variables:
|
||||||
|
OS: windows
|
||||||
|
GIT_DEPTH: 5
|
||||||
|
before_script:
|
||||||
|
- ./build/install_choco.ps1
|
||||||
|
- choco install -y --x86 python3 7zip checksum
|
||||||
|
# - python --version | findstr /B "Python 3\.7\." # dont upgrade python on every run. just make sure we're on the right Python
|
||||||
|
# - pip --version | findstr /E '\(python 3\.7\)'
|
||||||
|
- pip install virtualenv pywin32
|
||||||
|
- virtualenv venv
|
||||||
|
- venv/Scripts/activate.ps1
|
||||||
|
after_script:
|
||||||
|
- rmdir -Recurse venv
|
||||||
|
script:
|
||||||
|
- pip install pyinstaller
|
||||||
|
- pip install -e torba\.
|
||||||
|
- cd lbry
|
||||||
|
- python scripts\set_build.py
|
||||||
|
- pip install -e .
|
||||||
|
- pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico -F -n lbrynet lbry/extras/cli.py
|
||||||
|
- cd dist
|
||||||
|
- 7z a -tzip $env:CI_PROJECT_DIR/lbrynet-${OS}.zip lbrynet.exe
|
||||||
|
- checksum --type=sha256 --file=$env:CI_PROJECT_DIR/lbrynet-${OS}.zip
|
||||||
|
- ./lbrynet.exe --version
|
||||||
|
|
||||||
|
|
||||||
# upload could be done by making it a yaml alias and putting it right into the build step. that way if one OS fails, the others still get uploaded
|
# upload could be done by making it a yaml alias and putting it right into the build step. that way if one OS fails, the others still get uploaded
|
||||||
|
@ -146,6 +173,13 @@ s3:mac:
|
||||||
dependencies:
|
dependencies:
|
||||||
- build:mac
|
- build:mac
|
||||||
|
|
||||||
|
s3:windows:
|
||||||
|
extends: .upload
|
||||||
|
variables:
|
||||||
|
OS: windows
|
||||||
|
dependencies:
|
||||||
|
- build:windows
|
||||||
|
|
||||||
#release:linux:
|
#release:linux:
|
||||||
# stage: release
|
# stage: release
|
||||||
# only: [tags]
|
# only: [tags]
|
||||||
|
|
11
build/install_choco.ps1
Normal file
11
build/install_choco.ps1
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# requires powershell and .NET 4+. see https://chocolatey.org/install for more info.
|
||||||
|
|
||||||
|
$chocoVersion = powershell choco -v
|
||||||
|
if(-not($chocoVersion)){
|
||||||
|
Write-Output "Chocolatey is not installed, installing now"
|
||||||
|
Write-Output "IF YOU KEEP GETTING THIS MESSAGE ON EVERY BUILD, TRY RESTARTING THE GITLAB RUNNER SO IT GETS CHOCO INTO IT'S ENV"
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Write-Output "Chocolatey version $chocoVersion is already installed"
|
||||||
|
}
|
Loading…
Reference in a new issue