-
Notifications
You must be signed in to change notification settings - Fork 13
169 lines (151 loc) · 5.02 KB
/
build-conda-installer.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name : Build Windows Conda Installer
on:
pull_request:
workflow_dispatch:
push:
branches:
- 'master'
- 'releases/**'
- 'testing/**'
jobs:
build:
runs-on: windows-2019
timeout-minutes: 60
env:
REPO: https://github.com/biolab/orange3.git
BUILD_BRANCH: master
BUILD_COMMIT: "3.37.0"
BUILD_LOCAL: ""
PYTHONFAULTHANDLER: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP_CACHE_DIR: .pip-cache
PIP_PREFER_BINARY: 1
CONDA_BUILD_VERSION: "3.26.*"
# CONDA_SPEC_FILE: ..\specs\win\conda-spec.txt
strategy:
fail-fast: False
matrix:
include:
- python-version: "3.11.8"
miniconda-version: "py311_24.1.2-0"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: mamba-org/setup-micromamba@v1
with:
condarc: >-
channels:
- conda-forge
- defaults
environment-name: build
create-args: conda conda-build boa python=3.11
init-shell: bash cmd.exe
generate-run-shell: true
- name: Checkout orange3
shell: bash
run: |
set -e
git clone -q $REPO
cd orange3
git fetch origin $BUILD_BRANCH
git checkout $BUILD_COMMIT
- name: Prepare conda packages
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
if [[ $BUILD_LOCAL ]]; then
conda mambabuild --no-test --python $PYTHON_VERSION ./orange3/conda-recipe
VERSION=$(cd orange3; python setup.py --version)
EXTRA_ARGS=(-c file:///C:/users/runneradmin/micromamba/envs/build/conda-bld)
else
VERSION=$BUILD_COMMIT
EXTRA_ARGS=()
fi
if [[ ! $CONDA_SPEC_FILE ]]; then
micromamba create -p ./env --yes \
${EXTRA_ARGS[*]} \
python=$PYTHON_VERSION \
numpy=1.25.* \
scipy=1.13.* \
scikit-learn=1.4.* \
pandas=1.5.* \
pyqtgraph=0.13.* \
bottleneck=1.3.* \
pyqt=5.15.* \
pyqtwebengine=5.15.* \
Orange3=$VERSION \
openpyxl=3.1.2 \
blas=*=openblas
conda list -p ./env --export --explicit --md5 > env-spec.txt
cat env-spec.txt
echo "CONDA_SPEC_FILE=env-spec.txt" >> $GITHUB_ENV
fi
- name: Build installer
env:
PLATTAG: win_amd64
MINICONDA_VERSION: ${{ matrix.miniconda-version }}
run: |
mkdir dist
export PATH="$(cygpath -u 'C:\Program Files (x86)\NSIS'):$PATH"
echo PATH=$PATH
bash -e ./scripts/windows/build-conda-installer.sh \
--platform $PLATTAG \
--cache-dir .cache \
--dist-dir dist \
--miniconda-version "$MINICONDA_VERSION" \
--env-spec "$CONDA_SPEC_FILE" \
--online no
INSTALLER=( dist/Orange3*.exe )
SHA256=$( sha256sum -b $INSTALLER )
echo INSTALLER = $INSTALLER
echo SHA256 = $( sha256sum -b $INSTALLER )
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: orange-win-conda-installer
path: dist/Orange3-*.exe
if-no-files-found: error
test:
name: Test
needs: build
runs-on: windows-2019
steps:
- name: Download installer
uses: actions/download-artifact@v4
with:
name: orange-win-conda-installer
- name: Install
shell: cmd
run: |
rem # Install in silent mode. Output has to be piped somewhere so the installer
rem # runs 'attached' to the console.
for %%s in ( Orange3*.exe ) do ( set "INSTALLER=%%s" )
echo INSTALLER = %INSTALLER%
%INSTALLER% /S /D=D:\test-install > nul
- name: Run tests
shell: bash
run: |
PYTHON=$(cygpath -u 'D:\test-install\python')
$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.
export ORANGE_DEPRECATIONS_ERROR=1
export PYTHONWARNINGS=module
$PYTHON -m unittest -v Orange.tests Orange.widgets.tests
- name: Test conda
shell: cmd
run: |
D:\test-install\Scripts\conda.bat --help
D:\test-install\Scripts\conda.bat info
D:\test-install\Scripts\activate.bat
echo %CONDA_PREFIX%