-
Notifications
You must be signed in to change notification settings - Fork 1
166 lines (152 loc) · 5.43 KB
/
build.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
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
name: Build installers
on:
push:
branches:
- master
paths-ignore:
- '.github/**'
- 'readme.md'
- '*.ipynb'
- 'Fiji.app/**'
- docs/**
pull_request:
branches:
- master
jobs:
Build-Windows:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge, anaconda
channel-priority: true
mamba-version: "*"
activate-environment: cz
- name: Install dependencies
run: |
mamba install -n cz -c conda-forge python numpy caiman pyimagej openjdk=8 seaborn cx_Freeze
# mamba install -n cz -y --no-channel-priority -c https://marcelotduarte.github.io/packages/conda cx_Freeze
- name: build installer Windows
shell: powershell
run: |
mkdir cache
python setup.py bdist_msi
# - name: test
# shell: powershell
# run: |
# dir dist
- name: Release
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout distribution
mv -Path dist/CalciumZero-0.1-win64.msi -Destination CalciumZero-0.1-win64.msi -Force
Remove-Item -Path dist -Recurse
Remove-Item -Path build -Recurse
git lfs install
git lfs track CalciumZero-0.1-win64.msi
git add .gitattributes
git add CalciumZero-0.1-win64.msi
git commit -m "Pushing new Windows installer"
- name: Push changes
uses: ad-m/github-push-action@master
with:
force: true
branch: distribution
build-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge, anaconda
auto-activate-base: false
activate-environment: cz
environment-file: envs/cz.yaml
# - name: Install cx_Freeze
# run: |
# mamba install -n cz -y --no-channel-priority -c https://marcelotduarte.github.io/packages/conda cx_Freeze
- name: Build
run: |
which python
mkdir cache
python setup.py bdist_appimage # CalciumZero-0.1-x86_64.AppImage
- name: Release
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout distribution
mv dist/CalciumZero-0.1-x86_64.AppImage CalciumZero-0.1-x86_64.AppImage
rm -rf dist build
git lfs install
git lfs track CalciumZero-0.1-x86_64.AppImage
git add .gitattributes
git add CalciumZero-0.1-x86_64.AppImage
git commit -m "Pushing new Linux AppImage"
- name: Push changes
uses: ad-m/github-push-action@master
with:
force: true
branch: distribution
Build-MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge, anaconda, defaults
channel-priority: true
mamba-version: "*"
activate-environment: cz
- name: Install dependencies
run: |
mamba install -n cz -c conda-forge numpy=1.21 caiman pyimagej openjdk=8 seaborn cx_Freeze
# mamba install -n cz -y --no-channel-priority -c https://marcelotduarte.github.io/packages/conda cx_Freeze
- name: build disk file MacOS
shell: bash -l {0}
run: |
mkdir cache
python setup.py bdist_dmg
# - name: test
# shell: bash -l {0}
# run: |
# ls build
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout distribution
mv build/CalciumZero-0.1.dmg CalciumZero-0.1.dmg
rm -r dist
rm -r build
git lfs install
git lfs track CalciumZero-0.1.dmg
git add CalciumZero-0.1.dmg
git add .gitattributes
git commit -m "Pushing new MacOS installer"
- name: Push changes
uses: ad-m/github-push-action@master
with:
force: true
branch: distribution