-
Notifications
You must be signed in to change notification settings - Fork 2
/
windows.yaml
61 lines (47 loc) · 2.3 KB
/
windows.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
steps :
# Note: For windows we use the official python.org embedded python
- pwsh: |
Invoke-WebRequest -uri "https://www.python.org/ftp/python/3.10.5/python-3.10.5-embed-amd64.zip" -Method "GET" -Outfile $(BUILD_PATH)\cpython-3.10.5-x86_64.zip
Expand-Archive -Path $(BUILD_PATH)\cpython-3.10.5-x86_64.zip -DestinationPath $(PYTHON_DIR)
displayName: 'Pull embedded python'
- pwsh: |
Invoke-WebRequest -uri "https://bootstrap.pypa.io/get-pip.py" -Method "GET" -Outfile $(PYTHON_DIR)\get-pip.py
$(PYTHON_EXE) $(PYTHON_DIR)\get-pip.py
displayName: 'Install pip'
- pwsh: |
cp -r .\contrib\sitecustomize.py $(PYTHON_DIR)\sitecustomize.py
cp -r .\contrib\python310._pth $(PYTHON_DIR)\python310._pth
ls $(PYTHON_DIR)
$env:TOP_LEVEL_DIR=$PWD
git clone --depth 1 https://github.com/electrumsv/electrumsv-sdk.git "$(SDK_REPO_DIR)"
cd $(SDK_REPO_DIR)
$(PYTHON_EXE) -m pip install .
cd $env:TOP_LEVEL_DIR
displayName: 'Install ElectrumSV-SDK'
- template: preinstall_components.yaml
- template: test_components.yaml
- pwsh: |
rm $(SDK_HOME_DIR)\component_state.json
touch $(SDK_HOME_DIR)\component_state.json
rm -r $(SDK_HOME_DIR)\component_datadirs\electrumsv
rm -r $(SDK_HOME_DIR)\logs
mkdir -p $(SDK_HOME_DIR)\logs
displayName: 'Reset component_state.json'
continueOnError: true
# Overwrites existing $env:PYTHON_DIR.zip archive
- pwsh: |
cd $(BUILD_PATH)
mkdir $(BUILD_PATH)/headless_sdk
cp -r $(PYTHON_DIR) $(BUILD_PATH)/headless_sdk/python
cp -r $(SDK_HOME_DIR) $(BUILD_PATH)/headless_sdk/SDK_HOME_DIR
cp $(Build.Repository.LocalPath)/contrib/launcher/electrumsv-sdk.py $(BUILD_PATH)/headless_sdk/python/Scripts/electrumsv-sdk.py
cp $(Build.Repository.LocalPath)/contrib/launcher/electrumsv-sdk.bat $(BUILD_PATH)/headless_sdk/electrumsv-sdk.bat
cp $(Build.Repository.LocalPath)/contrib/launcher/.env $(BUILD_PATH)/headless_sdk/.env
Compress-Archive -Path "$env:BUILD_PATH/headless_sdk" -DestinationPath "headless-sdk-$env:SDK_VERSION-win32-x86_64.zip"
ls $(BUILD_PATH)/headless_sdk
displayName: 'Create compressed archives'
- task: PublishBuildArtifacts@1
displayName: 'Publish ElectrumSV-SDK datadir'
inputs:
artifactName: 'Win32SDKHeadless'
pathtoPublish: "$(BUILD_PATH)/headless-sdk-$(SDK_VERSION)-win32-x86_64.zip"