@@ -18,131 +18,130 @@ jobs:
1818 source :
1919 runs-on : ubuntu-20.04
2020 steps :
21- - uses : actions/checkout@v3
21+ - uses : actions/checkout@v3
2222
23- - uses : actions/setup-python@v4
24- with :
25- python-version : 3.9
26- architecture : x64
23+ - uses : actions/setup-python@v4
24+ with :
25+ python-version : 3.9
26+ architecture : x64
2727
28- - run : pip3 install poetry
29- - run : |
30- cd libs/gl-client-py
31- poetry build --format=sdist
28+ - run : pip3 install poetry
29+ - run : |
30+ cd libs/gl-client-py
31+ poetry build --format=sdist
3232
33- - name : Upload wheels
34- uses : actions/upload-artifact@v3
35- with :
36- name : wheels
37- path : libs/gl-client-py/dist/gl_client-*.tar.gz
33+ - name : Upload wheels
34+ uses : actions/upload-artifact@v4
35+ with :
36+ name : wheels-source
37+ path : libs/gl-client-py/dist/gl_client-*.tar.gz
3838
3939 linux :
4040 runs-on : ubuntu-20.04
4141 strategy :
4242 fail-fast : false
4343 matrix :
4444 target :
45- - x86_64
46- - i686
47- # aarch64 does not compile due to an old(-ish) compiler with the error
48- # `ARM assembler must define __ARM_ARCH`
49- # - aarch64
50- # Temporarily disable armv7 as to github issues fetching a manifest for the architecture.
51- # - armv7
45+ - x86_64
46+ - i686
47+ # aarch64 does not compile due to an old(-ish) compiler with the error
48+ # `ARM assembler must define __ARM_ARCH`
49+ # - aarch64
50+ # Temporarily disable armv7 as to github issues fetching a manifest for the architecture.
51+ # - armv7
5252 steps :
53- - uses : actions/checkout@v3
54-
55- - uses : actions/setup-python@v4
56- with :
57- python-version : 3.9
58-
59- - name : Install Protoc
60- uses : arduino/setup-protoc@v2
61- with :
62- version : " 23.2" # Fixed since we mount the path below
63- repo-token : ${{ secrets.GITHUB_TOKEN }}
64-
65- - name : Build wheels
66- uses : PyO3/maturin-action@v1
67- with :
68- working-directory : libs/gl-client-py
69- rust-toolchain : stable
70- target : ${{ matrix.target }}
71- manylinux : auto
72- args : --release --out dist
73- docker-options : -v /opt/hostedtoolcache/protoc/v23.2/x64/bin/protoc:/usr/bin/protoc:ro
74-
75- - name : Install built wheel (emulated)
76- 77- if : matrix.target != 'ppc64' && matrix.target != 'x86_64' && matrix.target != 'i686'
78- with :
79- arch : ${{ matrix.target }}
80- distro : ubuntu22.04
81- githubToken : ${{ github.token }}
82- install : |
83- apt-get update
84- apt-get install -y --no-install-recommends python3 python3-pip
85- pip3 install -U pip pytest
53+ - uses : actions/checkout@v3
54+
55+ - uses : actions/setup-python@v4
56+ with :
57+ python-version : 3.9
58+
59+ - name : Install Protoc
60+ uses : arduino/setup-protoc@v2
61+ with :
62+ version : " 23.2" # Fixed since we mount the path below
63+ repo-token : ${{ secrets.GITHUB_TOKEN }}
64+
65+ - name : Build wheels
66+ uses : PyO3/maturin-action@v1
67+ with :
68+ working-directory : libs/gl-client-py
69+ rust-toolchain : stable
70+ target : ${{ matrix.target }}
71+ manylinux : auto
72+ args : --release --out dist
73+ docker-options : -v /opt/hostedtoolcache/protoc/v23.2/x64/bin/protoc:/usr/bin/protoc:ro
74+
75+ - name : Install built wheel (emulated)
76+ 77+ if : matrix.target != 'ppc64' && matrix.target != 'x86_64' && matrix.target != 'i686'
78+ with :
79+ arch : ${{ matrix.target }}
80+ distro : ubuntu22.04
81+ githubToken : ${{ github.token }}
82+ install : |
83+ apt-get update
84+ apt-get install -y --no-install-recommends python3 python3-pip
85+ pip3 install -U pip pytest
86+ run : |
87+ pip install libs/gl-client-py/dist/gl_client*.whl --force-reinstall
88+ python3 -c "import glclient;creds=glclient.Credentials();signer=glclient.Signer(b'\x00'*32,'bitcoin', creds);print(repr(creds));print(signer.version())"
89+
90+ - name : Install built wheel (native)
91+ if : matrix.target == 'x86_64'
8692 run : |
8793 pip install libs/gl-client-py/dist/gl_client*.whl --force-reinstall
8894 python3 -c "import glclient;creds=glclient.Credentials();signer=glclient.Signer(b'\x00'*32,'bitcoin', creds);print(repr(creds));print(signer.version())"
8995
90- - name : Install built wheel (native)
91- if : matrix.target == 'x86_64'
92- run : |
93- pip install libs/gl-client-py/dist/gl_client*.whl --force-reinstall
94- python3 -c "import glclient;creds=glclient.Credentials();signer=glclient.Signer(b'\x00'*32,'bitcoin', creds);print(repr(creds));print(signer.version())"
95-
96- - name : Upload wheels
97- uses : actions/upload-artifact@v3
98- with :
99- name : wheels
100- path : libs/gl-client-py/dist/
96+ - name : Upload wheels
97+ uses : actions/upload-artifact@v4
98+ with :
99+ name : wheels-linux-${{ matrix.target }}
100+ path : libs/gl-client-py/dist/
101101
102102 macos :
103103 runs-on : macos-13
104104 strategy :
105105 fail-fast : false
106106 matrix :
107107 target :
108- - x86_64
109- - aarch64
108+ - x86_64
109+ - aarch64
110110 steps :
111- - uses : actions/checkout@v3
112- - uses : actions/setup-python@v4
113- with :
114- python-version : 3.9
115- architecture : x64
116- - uses : dtolnay/rust-toolchain@nightly
117-
118- - name : Install Protoc
119- uses : arduino/setup-protoc@v2
120- with :
121- version : " 23.2"
122- repo-token : ${{ secrets.GITHUB_TOKEN }}
123-
124- - name : Build wheels - ${{ matrix.target }}
125- uses : PyO3/maturin-action@v1
126- with :
127- target : ${{ matrix.target }}
128- working-directory : libs/gl-client-py
129- args : --release --out dist
130- docker-options : -v /opt/hostedtoolcache/protoc/v23.2/x64/bin/protoc:/usr/bin/protoc:ro
131- env :
132- MACOSX_DEPLOYMENT_TARGET : 10.9
133-
134- - name : Install built wheel
135- if : matrix.target == 'x86_64'
136- run : |
111+ - uses : actions/checkout@v3
112+ - uses : actions/setup-python@v4
113+ with :
114+ python-version : 3.9
115+ architecture : x64
116+ - uses : dtolnay/rust-toolchain@nightly
117+
118+ - name : Install Protoc
119+ uses : arduino/setup-protoc@v2
120+ with :
121+ version : " 23.2"
122+ repo-token : ${{ secrets.GITHUB_TOKEN }}
123+
124+ - name : Build wheels - ${{ matrix.target }}
125+ uses : PyO3/maturin-action@v1
126+ with :
127+ target : ${{ matrix.target }}
128+ working-directory : libs/gl-client-py
129+ args : --release --out dist
130+ docker-options : -v /opt/hostedtoolcache/protoc/v23.2/x64/bin/protoc:/usr/bin/protoc:ro
131+ env :
132+ MACOSX_DEPLOYMENT_TARGET : 10.9
133+
134+ - name : Install built wheel
135+ if : matrix.target == 'x86_64'
136+ run : |
137137 pip install libs/gl-client-py/dist/gl_client*.whl --force-reinstall
138138 python3 -c "import glclient;creds=glclient.Credentials();signer=glclient.Signer(b'\x00'*32,'bitcoin', creds);print(repr(creds));print(signer.version())"
139139
140- - name : Upload wheels
141- uses : actions/upload-artifact@v3
142- with :
143- name : wheels
144- path : libs/gl-client-py/dist/
145-
140+ - name : Upload wheels
141+ uses : actions/upload-artifact@v4
142+ with :
143+ name : wheels-macos-${{ matrix.target }}
144+ path : libs/gl-client-py/dist/
146145
147146 windows :
148147 runs-on : windows-2019
@@ -153,36 +152,36 @@ jobs:
153152 - x64
154153 - x86
155154 steps :
156- - uses : actions/checkout@v3
157- - uses : actions/setup-python@v4
158- with :
159- python-version : 3.9
160- architecture : ${{ matrix.target }}
161- - uses : dtolnay/rust-toolchain@nightly
162-
163- - name : Install Protoc
164- uses : arduino/setup-protoc@v2
165- with :
166- repo-token : ${{ secrets.GITHUB_TOKEN }}
167-
168- - name : Build wheels
169- uses : PyO3/maturin-action@v1
170- with :
171- target : ${{ matrix.target }}
172- working-directory : libs\\gl-client-py
173- args : --release --out dist
174-
175- # Wildcard expansion on windows is different...
176- # - name: Install built wheel
177- # run: |
178- # pip install libs\gl-client-py\dist\gl_client*.whl --force-reinstall
179- # python3 -c "import glclient;creds=glclient.Credentials();signer=glclient.Signer(b'\x00'*32,'bitcoin', creds);print(repr(creds));print(signer.version())"
180-
181- - name : Upload wheels
182- uses : actions/upload-artifact@v3
183- with :
184- name : wheels
185- path : libs\gl-client-py\dist
155+ - uses : actions/checkout@v3
156+ - uses : actions/setup-python@v4
157+ with :
158+ python-version : 3.9
159+ architecture : ${{ matrix.target }}
160+ - uses : dtolnay/rust-toolchain@nightly
161+
162+ - name : Install Protoc
163+ uses : arduino/setup-protoc@v2
164+ with :
165+ repo-token : ${{ secrets.GITHUB_TOKEN }}
166+
167+ - name : Build wheels
168+ uses : PyO3/maturin-action@v1
169+ with :
170+ target : ${{ matrix.target }}
171+ working-directory : libs\\gl-client-py
172+ args : --release --out dist
173+
174+ # Wildcard expansion on windows is different...
175+ # - name: Install built wheel
176+ # run: |
177+ # pip install libs\gl-client-py\dist\gl_client*.whl --force-reinstall
178+ # python3 -c "import glclient;creds=glclient.Credentials();signer=glclient.Signer(b'\x00'*32,'bitcoin', creds);print(repr(creds));print(signer.version())"
179+
180+ - name : Upload wheels
181+ uses : actions/upload-artifact@v4
182+ with :
183+ name : wheels-win-${{ matrix.target }}
184+ path : libs\gl-client-py\dist
186185
187186 publish :
188187 runs-on : ubuntu-20.04
@@ -193,32 +192,32 @@ jobs:
193192 - macos
194193 if : github.ref == 'refs/heads/main'
195194 steps :
196-
197- - name : Download wheels
198- uses : actions/download-artifact@v3
199- with :
200- name : wheels
201- path : libs/gl-client-py/dist
202-
203- - name : Install dependencies
204- run : |
205- sudo apt-get update -qq
206- sudo apt-get install python3-pip
207- sudo pip3 install -U \
208- poetry \
209- maturin \
210- twine \
211- keyring
212-
213- - name : Publish wheels to PyPI
214- env :
215- TWINE_USERNAME : __token__
216- run : |
217- cd libs/gl-client-py
218- twine upload \
219- --skip-existing \
220- --non-interactive \
221- --verbose \
222- --username "__token__" \
223- --password "${{ secrets.TWINE_PASSWORD }}" \
224- dist/*.tar.gz dist/*.whl
195+ - name : Download wheels
196+ uses : actions/download-artifact@v4
197+ with :
198+ path : libs/gl-client-py/dist
199+ pattern : libs/gl-client-py/dist-*
200+ merge-multiple : true
201+
202+ - name : Install dependencies
203+ run : |
204+ sudo apt-get update -qq
205+ sudo apt-get install python3-pip
206+ sudo pip3 install -U \
207+ poetry \
208+ maturin \
209+ twine \
210+ keyring
211+
212+ - name : Publish wheels to PyPI
213+ env :
214+ TWINE_USERNAME : __token__
215+ run : |
216+ cd libs/gl-client-py
217+ twine upload \
218+ --skip-existing \
219+ --non-interactive \
220+ --verbose \
221+ --username "__token__" \
222+ --password "${{ secrets.TWINE_PASSWORD }}" \
223+ dist/*.tar.gz dist/*.whl
0 commit comments