-
Notifications
You must be signed in to change notification settings - Fork 67
259 lines (251 loc) · 7.73 KB
/
package.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
name: Package
on:
push:
tags:
- 'v*'
jobs:
ubuntu-jammy:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Ubuntu dependencies
run: |
sudo apt update
sudo apt-get install -y software-properties-common \
build-essential \
python3-dev python3-pip python3.11-venv \
pkg-config libssl-dev libdbus-1-dev libdbus-glib-1-dev libffi-dev libkrb5-dev
- name: Build the executable
run: |
python3 -m venv venv
source venv/bin/activate
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
make
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-ubuntu_jammy.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
- name: Make artifacts
uses: actions/upload-artifact@v2
with:
name: ubuntu-jammy
path: dist/*.tar.gz
retention-days: 30
ubuntu-focal:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Ubuntu-Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get install -y build-essential
sudo apt-get install -y python3-dev python3-pip python3-virtualenv
sudo apt-get install -y pkg-config libssl-dev libdbus-1-dev libdbus-glib-1-dev python-dbus libffi-dev libkrb5-dev
- run: |
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
- name: Build executable
run: make
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-ubuntu_focal.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
- name: Make artifacts
uses: actions/upload-artifact@v2
with:
name: ubuntu-focal
path: dist/*.tar.gz
retention-days: 30
windows:
runs-on: windows-latest
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- run: |
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
- run: make standalone
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
7z a user-sync-${{ steps.get_version.outputs.version }}${{matrix.variant_tag}}-win64.zip user-sync.exe
- name: Make artifact
uses: actions/upload-artifact@v2
with:
name: windows
path: dist/*.zip
retention-days: 30
centos:
runs-on: ubuntu-latest
env:
LC_ALL: en_US.utf8
LANG: en_US.utf8
container:
image: centos:8
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v2
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Centos-Install dependencies
run: |
yum install -y pkgconfig gcc openssl-devel dbus-glib-devel dbus-python sqlite-devel libffi-devel wget make
mkdir tmp && cd tmp
wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
tar xzf Python-3.9.7.tgz
cd Python-3.9.7
./configure --enable-optimizations --enable-shared --enable-loadable-sqlite-extensions
make altinstall
cd ../..
- name: Build executable
run: |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
/usr/local/bin/python3.9 -m venv venv
source venv/bin/activate
# for some reason, pycryptodome won't install when
# setuptools is installed/upgraded, so install it before
# install/upgrade setuptools
pip install pycryptodome==3.9.7
python -m pip install --upgrade pip pyinstaller setuptools
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
make
deactivate
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-centos.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
- name: Make artifact
uses: actions/upload-artifact@v2
with:
name: centos
path: dist/*.tar.gz
retention-days: 30
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: user-sync-examples-zip
run: |
cd examples
zip -r user-sync-examples.zip .
- uses: actions/upload-artifact@v2
with:
name: examples
path: examples/*.zip
retention-days: 30
- name: user-sync.tar.gz
run: |
tar -czvf "user-sync-examples.tar.gz" examples
- uses: actions/upload-artifact@v2
with:
name: examples
path: user-sync-examples.tar.gz
retention-days: 30
release:
runs-on: ubuntu-latest
needs: [centos, ubuntu-jammy, ubuntu-focal, examples, windows]
steps:
- uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: User Sync Tool ${{ github.ref }}
body_path: .changelog/latest.md
draft: false
prerelease: false
upload-assets:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- uses: AButler/[email protected]
with:
files: 'examples/*;ubuntu-jammy/*;ubuntu-focal/*;centos/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ steps.get_version.outputs.version }}