-
Notifications
You must be signed in to change notification settings - Fork 6
89 lines (77 loc) · 2.45 KB
/
pyinstaller_windows.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
name: PyInstaller Windows Build
on:
pull_request:
branches:
- 'main'
- 'release-*'
release:
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
# Needed to get tags so that git describe works during package build
fetch-depth: "0"
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%V")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Miniforge and Pip packages
uses: actions/cache@v4
env:
CACHE_NUMBER: 0
with:
path: |
~/conda_pkgs_dir
~/.cache/pip
key:
${{runner.os}}-condapkg-${{env.CACHE_NUMBER}}-${{steps.get-date.outputs.date}}-${{hashFiles('environment-dev.yml','conda/meta.yaml')}}
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: mantidimaging-dev
auto-activate-base: false
use-mamba: true
- name: Cache Miniforge environment
uses: actions/cache@v4
id: cache-miniforge-environment
env:
CACHE_NUMBER: 0
with:
path: ${{env.CONDA}}/envs/mantidimaging-dev
key:
${{runner.os}}-condaenv-${{env.CACHE_NUMBER}}-${{steps.get-date.outputs.date}}-${{hashFiles('environment-dev.yml','conda/meta.yaml')}}
- name: Mantid Imaging developer dependencies
if: steps.cache-miniforge-environment.outputs.cache-hit != 'true'
shell: bash -l {0}
run: |
conda deactivate
python ./setup.py create_dev_env
- name: List versions
shell: bash -l {0}
run: |
conda env list
python --version; conda list ; pip list
- name: PyInstaller Build
shell: bash -l {0}
run: |
nvcc -V
conda activate mantidimaging-dev
echo "Cuda path: $CUDA_PATH"
echo "path: $PATH"
echo "dev env path: '${{env.CONDA}}/envs/mantidimaging-dev'"
cd packaging
python PackageWithPyInstaller.py
- name: Archive PyInstalled File
uses: actions/upload-artifact@v3
with:
name: MantidImaging
path: packaging/MantidImaging.spec
- name: Archive PyInstalled File
uses: actions/upload-artifact@v3
with:
name: MantidImaging
path: packaging/dist