-
Notifications
You must be signed in to change notification settings - Fork 13
145 lines (127 loc) · 4.64 KB
/
build-windows-installers.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: 'Build Orange Windows installers'
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build ${{ matrix.name }}
runs-on: windows-2019
env:
# Build the package locally or use the build packages from
# conda-forge / PyPI. The BUILD_COMMIT must match the package version
# to build.
# Comment/override this if building release versions.
BUILD_LOCAL: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1
# build env dependencies for building orange3 wheels or any of its
# dependencies that do not have wheels available
BUILD_DEPS: wheel~=0.37.0 pip~=22.0.3
# conda build envs
CONDA: C:\Miniconda\Scripts\conda
MINICONDA_VERSION: 'py39_4.12.0'
CONDA_BUILD_VERSION: '3.22'
CONDA_USE_ONLY_TAR_BZ2: ""
CONDA_SPEC_FILE:
MINICONDA_PYTHON: C:\Miniconda\python
# python-pip build
ENVSPEC: ../specs/win/PY38.txt
strategy:
fail-fast: False
# Note the python version here refers to the one included in the installer
# not the one used for building/packaging
matrix:
include:
- name: Conda
python_version: '3.9.12'
plattag: win_amd64
inst_python: C:\test-install\python
- name: PIP-based
python_version: '3.9.13'
plattag: win_amd64
inst_python: C:\test-install\Scripts\python
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set worker Python version
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Checkout Orange
uses: actions/checkout@v3
with:
# git repo from which to pull orange3 sources
repository: biolab/orange3
# Branch/ref from which to pull
ref: 3.35.0 #master
path: orange3
- name: Build Miniconda installer
if: matrix.name == 'Conda'
shell: cmd
run: |
cd orange3
rmdir /q /s "C:\Program Files (x86)\Windows Kits\10\include\wdf"
%GITHUB_WORKSPACE%\ci\build-miniconda-installer.bat
env:
PYTHON_VERSION: ${{ matrix.python_version }}
PLATTAG: ${{ matrix.plattag }}
- name: Build PIP-based installer
if: matrix.name == 'PIP-based'
shell: cmd
run: |
cd orange3
%GITHUB_WORKSPACE%\ci\build-win-installer.bat
env:
PYTHON_VERSION: ${{ matrix.python_version }}
PLATTAG: ${{ matrix.plattag }}
- name: Find installers
shell: cmd
run: |
for %%s in ( orange3/dist/Orange3*.exe ) do (
echo "INSTALLER=%%s"
echo INSTALLER=%%s >> %GITHUB_ENV%
)
- name: Test script
shell: cmd
run: |
echo INSTALLER = %INSTALLER%
:: cleanup registry of anaconda reg keys
reg delete HKEY_LOCAL_MACHINE\Software\Python\ContinuumAnalytics /f || cd .
reg delete HKEY_CURRENT_USER\Software\Python\ContinuumAnalytics /f || cd .
dir orange3\dist
:: Install in silent mode. Output has to be piped somewhere so the installer
:: runs 'attached' to the console.
echo "Installing Orange"
orange3\dist\%INSTALLER% /S /D=C:\test-install > nul
if "${{ matrix.name }}" == "Conda" ( ci\make-portable-installer.bat C:\test-install %GITHUB_WORKSPACE%\orange3\dist\Orange.zip )
"%PYTHON%" --version
"%PYTHON%" -m pip --version
"%PYTHON%" -m pip list --format=freeze
:: Test that orange and all dependencies are installed in a consistent state
"%PYTHON%" -m pip install --no-index --no-cache-dir orange3
:: Run test suite in the installed environment.
set ORANGE_DEPRECATIONS_ERROR=1
set PYTHONWARNINGS=module
"%PYTHON%" -m unittest -v Orange.tests Orange.widgets.tests || cd .
:: Log the filename and the sha checksum
for /f %%s in ( 'sha256sum -b orange3/dist/%INSTALLER%' ) do ( set "CHECKSUM=%%s" )
echo INSTALLER = %INSTALLER%
echo SHA256 = %CHECKSUM%
env:
PYTHON: ${{ matrix.inst_python }}
- name: Archive installer - ${{ matrix.name }}
uses: actions/upload-artifact@v3
with:
name: Installer
path: orange3/dist/${{ env.INSTALLER }}
if-no-files-found: error
- name: Archive build zip
uses: actions/upload-artifact@v3
if: matrix.name == 'Conda'
with:
name: Installer - ZIP
path: orange3/dist/Orange.zip
if-no-files-found: error