-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (140 loc) · 4.36 KB
/
python_build_all_os.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
name: Python Package using Conda
on:
push:
tags:
- 'v*.*.*'
env:
python_version: '3.10'
defaults:
run:
shell: bash -l {0}
jobs:
Run-on-ubuntu:
name: run on ubuntu
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{env.python_version}}
uses: actions/setup-python@v4
with:
python-version: ${{env.python_version}}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, defaults
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
auto-update-conda: true
auto-activate-base: true
# - name: Install numpy
# run: |
# conda install --channel conda-forge numpy
- name: Install pydantic
run: |
conda install --channel conda-forge pydantic
- name: Install pyscipopt
run: |
conda install --channel conda-forge pyscipopt
- name: Install cx_freeze
run: |
conda install --channel conda-forge cx_freeze
- name: Build Files
run: |
python setup.py build
git status --porcelain
- name: Zip build folder
uses: montudor/action-zip@v1
with:
args: zip -qq -r ${{format('{0}_linux.zip', github.ref_name)}} build/exe.linux-x86_64-3.11
- name: Create GitHub Release
uses: ncipollo/[email protected]
with:
artifacts: ${{format('{0}_linux.zip', github.ref_name)}}
body: "TODO Document me!"
allowUpdates: true
Run-on-mac:
name: run on mac
permissions:
contents: write
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{env.python_version}}
uses: actions/setup-python@v4
with:
python-version: ${{env.python_version}}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, defaults
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
auto-update-conda: true
auto-activate-base: true
# - name: Install numpy
# run: |
# conda install --channel conda-forge numpy
- name: Install pydantic
run: |
conda install --channel conda-forge pydantic
- name: Install pyscipopt
run: |
conda install --channel conda-forge pyscipopt
- name: Install cx_freeze
run: |
conda install --channel conda-forge cx_freeze
- name: Build Files
run: |
python setup.py build
git status --porcelain
- name: Zip build folder
run: zip -r ${{format('{0}_macos.zip', github.ref_name)}} build/exe.macosx-10.9-x86_64-3.11
- name: Create GitHub Release
uses: ncipollo/[email protected]
with:
artifacts: ${{format('{0}_macos.zip', github.ref_name)}}
body: "TODO Document me!"
allowUpdates: true
Run-on-windows:
name: run on windows
runs-on: windows-latest
permissions: write-all
defaults:
run:
shell: PowerShell
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{env.python_version}}
uses: actions/setup-python@v4
with:
python-version: ${{env.python_version}}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, defaults
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
auto-update-conda: true
auto-activate-base: true
# - name: Install numpy
# run: |
# conda install --channel conda-forge numpy
- name: Install pydantic
run: |
conda install --channel conda-forge pydantic
- name: Install pyscipopt
run: |
conda install --channel conda-forge pyscipopt
- name: Install cx_freeze
run: |
conda install --channel conda-forge cx_freeze
- name: Build Files
run: |
python setup.py build
- name: Zip build folder
run: Compress-Archive build/exe.win-amd64-3.11 ${{format('{0}_windows.zip', github.ref_name)}}
- name: Create GitHub Release
uses: ncipollo/[email protected]
with:
artifacts: ${{format('{0}_windows.zip', github.ref_name)}}
body: "TODO Document me!"
allowUpdates: true