Skip to content

Commit 0fd9c24

Browse files
committed
Set up Windows env for build
1 parent 5025833 commit 0fd9c24

File tree

2 files changed

+143
-94
lines changed

2 files changed

+143
-94
lines changed

.github/workflows/build.yml

Lines changed: 141 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -6,94 +6,121 @@ on:
66
pull_request: null
77

88
jobs:
9-
linux:
9+
# linux:
10+
# runs-on: ubuntu-latest
11+
# strategy:
12+
# fail-fast: false
13+
# matrix:
14+
# name:
15+
# - debian-stable
16+
# - debian-heimdal
17+
# - centos-8
18+
# - fedora-latest
19+
# include:
20+
# - name: debian-stable
21+
# distro: debian:stable
22+
# - name: debian-heimdal
23+
# distro: debian:stable
24+
# krb5_ver: heimdal
25+
# - name: centos-8
26+
# distro: centos:8
27+
# - name: fedora-latest
28+
# distro: fedora:latest
29+
# flake: 'yes'
30+
31+
# steps:
32+
# - name: Check out code
33+
# uses: actions/checkout@v2
34+
35+
# - name: Build and test gssapi
36+
# run: ./ci/run-on-linux.sh ./ci/build.sh
37+
# env:
38+
# DISTRO: ${{ matrix.distro }}
39+
# KRB5_VER: ${{ matrix.krb5_ver }}
40+
# FLAKE: ${{ matrix.flake }}
41+
42+
# windows:
43+
# runs-on: windows-latest
44+
# strategy:
45+
# fail-fast: false
46+
# matrix:
47+
# name:
48+
# - win-py-3.10
49+
# - win-py-3.9
50+
# - win-py-3.8
51+
# - win-py-3.7
52+
# - win-py-3.6
53+
# arch:
54+
# - x64
55+
# - x86
56+
# include:
57+
# - name: win-py-3.10
58+
# pyenv: '3.10'
59+
# - name: win-py-3.9
60+
# pyenv: '3.9'
61+
# - name: win-py-3.8
62+
# pyenv: '3.8'
63+
# - name: win-py-3.7
64+
# pyenv: '3.7'
65+
# - name: win-py-3.6
66+
# pyenv: '3.6'
67+
68+
# steps:
69+
# - name: Check out code
70+
# uses: actions/checkout@v2
71+
72+
# - name: Install the right python
73+
# uses: actions/setup-python@v2
74+
# with:
75+
# python-version: ${{ matrix.pyenv }}
76+
# architecture: ${{ matrix.arch }}
77+
78+
# - name: Build and test gssapi
79+
# shell: bash
80+
# run: ./ci/build.sh
81+
# env:
82+
# OS_NAME: windows
83+
84+
# macos-heimdal:
85+
# runs-on: macos-latest
86+
# steps:
87+
# - name: Check out code
88+
# uses: actions/checkout@v2
89+
90+
# - name: Build and test gssapi
91+
# run: ./ci/build.sh
92+
# env:
93+
# KRB5_VER: heimdal
94+
95+
# FIXME: Remove once validated that it works
96+
sdist:
1097
runs-on: ubuntu-latest
11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
name:
15-
- debian-stable
16-
- debian-heimdal
17-
- centos-8
18-
- fedora-latest
19-
include:
20-
- name: debian-stable
21-
distro: debian:stable
22-
- name: debian-heimdal
23-
distro: debian:stable
24-
krb5_ver: heimdal
25-
- name: centos-8
26-
distro: centos:8
27-
- name: fedora-latest
28-
distro: fedora:latest
29-
flake: 'yes'
3098

3199
steps:
32100
- name: Check out code
33101
uses: actions/checkout@v2
34102

35-
- name: Build and test gssapi
36-
run: ./ci/run-on-linux.sh ./ci/build.sh
103+
- name: Set things up
104+
run: ./ci/run-on-linux.sh ./ci/before-deploy.sh
37105
env:
38-
DISTRO: ${{ matrix.distro }}
39-
KRB5_VER: ${{ matrix.krb5_ver }}
40-
FLAKE: ${{ matrix.flake }}
41-
42-
windows:
43-
runs-on: windows-latest
44-
strategy:
45-
fail-fast: false
46-
matrix:
47-
name:
48-
- win-py-3.10
49-
- win-py-3.9
50-
- win-py-3.8
51-
- win-py-3.7
52-
- win-py-3.6
53-
arch:
54-
- x64
55-
- x86
56-
include:
57-
- name: win-py-3.10
58-
pyenv: '3.10'
59-
- name: win-py-3.9
60-
pyenv: '3.9'
61-
- name: win-py-3.8
62-
pyenv: '3.8'
63-
- name: win-py-3.7
64-
pyenv: '3.7'
65-
- name: win-py-3.6
66-
pyenv: '3.6'
67-
68-
steps:
69-
- name: Check out code
70-
uses: actions/checkout@v2
106+
DISTRO: fedora:latest
71107

72-
- name: Install the right python
73-
uses: actions/setup-python@v2
108+
- name: Upload sdist
109+
uses: actions/upload-artifact@v2
74110
with:
75-
python-version: ${{ matrix.pyenv }}
76-
architecture: ${{ matrix.arch }}
77-
78-
- name: Build and test gssapi
79-
shell: bash
80-
run: ./ci/build.sh
81-
env:
82-
OS_NAME: windows
83-
84-
macos-heimdal:
85-
runs-on: macos-latest
86-
steps:
87-
- name: Check out code
88-
uses: actions/checkout@v2
111+
path: ./dist/*.whl
112+
name: artifact
89113

90-
- name: Build and test gssapi
91-
run: ./ci/build.sh
92-
env:
93-
KRB5_VER: heimdal
114+
- name: Upload tagged build artifact
115+
uses: actions/upload-artifact@v2
116+
with:
117+
path: ./tag_build/*
118+
name: tag_build
94119

95-
# FIXME: Remove once validated that it works
96120
wheel-windows:
121+
needs:
122+
- sdist
123+
97124
runs-on: windows-latest
98125
strategy:
99126
matrix:
@@ -122,19 +149,29 @@ jobs:
122149
- name: Check out code
123150
uses: actions/checkout@v2
124151

125-
- name: build wheel
152+
- name: Set up environment
153+
shell: bash
154+
run: ./ci/build.sh
155+
env:
156+
OS_NAME: windows
157+
158+
- name: Build wheel
126159
uses: pypa/[email protected]
127160
env:
128161
CIBW_ARCHS: all
129162
CIBW_BUILD: ${{ matrix.pyenv }}-${{ matrix.arch }}
130163
CIBW_BUILD_VERBOSITY: 1
131164

132-
- uses: actions/upload-artifact@v2
165+
- name: Upload wheel
166+
uses: actions/upload-artifact@v2
133167
with:
134168
path: ./wheelhouse/*.whl
135169
name: artifact
136170

137171
wheel-macos:
172+
needs:
173+
- sdist
174+
138175
runs-on: macos-10.15
139176

140177
strategy:
@@ -166,42 +203,53 @@ jobs:
166203
arch: arm64
167204

168205
steps:
169-
- name: Check out code
170-
uses: actions/checkout@v2
206+
- name: Download sdist
207+
uses: actions/download-artifact@v2
208+
with:
209+
name: artifact
210+
path: ./
211+
212+
- name: Extract sdist
213+
run: |
214+
tar xf gssapi-*.tar.gz
215+
mv gssapi-*/* .
216+
rm -r gssapi-*/
217+
rm gssapi-*.tar.gz
171218
172-
- name: build wheel
219+
- name: Build wheel
173220
uses: pypa/[email protected]
174221
env:
175222
CIBW_ARCHS: all
176223
CIBW_TEST_SKIP: '*_arm64'
177224
CIBW_BUILD: ${{ matrix.pyenv }}-macosx_${{ matrix.arch }}
178225
CIBW_BUILD_VERBOSITY: 1
179226

180-
- uses: actions/upload-artifact@v2
227+
- name: Upload wheel
228+
uses: actions/upload-artifact@v2
181229
with:
182230
path: ./wheelhouse/*.whl
183231
name: artifact
184232

185-
release-linux:
233+
release:
186234
needs:
187235
- wheel-windows
188236
- wheel-macos
189237

190238
runs-on: ubuntu-latest
191239

192240
steps:
193-
- name: Check out code
194-
uses: actions/checkout@v2
195-
196-
- name: Set things up
197-
run: ./ci/run-on-linux.sh ./ci/before-deploy.sh
198-
env:
199-
DISTRO: fedora:latest
200-
201-
- name: Download wheels
241+
- name: Download sdist and wheels
202242
uses: actions/download-artifact@v2
203243
with:
204244
name: artifact
205245
path: ./dist
206246

207-
- run: ls -al /dist
247+
- name: Download tagged build artifact
248+
uses: actions/download-artifact@v2
249+
with:
250+
name: tag_build
251+
path: ./tag_build
252+
253+
- run: |
254+
ls -al ./dist
255+
ls -al ./tag_build

ci/before-deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ mkdir ./tag_build
3939

4040
# create and checksum the tarball
4141

42-
tag=$(git describe --tags)
42+
#tag=$(git describe --tags)
43+
tags="v1.2.3"
4344
if [ x"${tag#v[0-9]}" = "x${tag}" ]; then
4445
PYTHON_GSSAPI_VERSION=${tag}
4546
else

0 commit comments

Comments
 (0)