Skip to content

Commit

Permalink
Set up Windows env for build
Browse files Browse the repository at this point in the history
  • Loading branch information
jborean93 committed Oct 6, 2021
1 parent 5025833 commit 0fd9c24
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 94 deletions.
234 changes: 141 additions & 93 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,94 +6,121 @@ on:
pull_request: null

jobs:
linux:
# linux:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# name:
# - debian-stable
# - debian-heimdal
# - centos-8
# - fedora-latest
# include:
# - name: debian-stable
# distro: debian:stable
# - name: debian-heimdal
# distro: debian:stable
# krb5_ver: heimdal
# - name: centos-8
# distro: centos:8
# - name: fedora-latest
# distro: fedora:latest
# flake: 'yes'

# steps:
# - name: Check out code
# uses: actions/checkout@v2

# - name: Build and test gssapi
# run: ./ci/run-on-linux.sh ./ci/build.sh
# env:
# DISTRO: ${{ matrix.distro }}
# KRB5_VER: ${{ matrix.krb5_ver }}
# FLAKE: ${{ matrix.flake }}

# windows:
# runs-on: windows-latest
# strategy:
# fail-fast: false
# matrix:
# name:
# - win-py-3.10
# - win-py-3.9
# - win-py-3.8
# - win-py-3.7
# - win-py-3.6
# arch:
# - x64
# - x86
# include:
# - name: win-py-3.10
# pyenv: '3.10'
# - name: win-py-3.9
# pyenv: '3.9'
# - name: win-py-3.8
# pyenv: '3.8'
# - name: win-py-3.7
# pyenv: '3.7'
# - name: win-py-3.6
# pyenv: '3.6'

# steps:
# - name: Check out code
# uses: actions/checkout@v2

# - name: Install the right python
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.pyenv }}
# architecture: ${{ matrix.arch }}

# - name: Build and test gssapi
# shell: bash
# run: ./ci/build.sh
# env:
# OS_NAME: windows

# macos-heimdal:
# runs-on: macos-latest
# steps:
# - name: Check out code
# uses: actions/checkout@v2

# - name: Build and test gssapi
# run: ./ci/build.sh
# env:
# KRB5_VER: heimdal

# FIXME: Remove once validated that it works
sdist:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name:
- debian-stable
- debian-heimdal
- centos-8
- fedora-latest
include:
- name: debian-stable
distro: debian:stable
- name: debian-heimdal
distro: debian:stable
krb5_ver: heimdal
- name: centos-8
distro: centos:8
- name: fedora-latest
distro: fedora:latest
flake: 'yes'

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Build and test gssapi
run: ./ci/run-on-linux.sh ./ci/build.sh
- name: Set things up
run: ./ci/run-on-linux.sh ./ci/before-deploy.sh
env:
DISTRO: ${{ matrix.distro }}
KRB5_VER: ${{ matrix.krb5_ver }}
FLAKE: ${{ matrix.flake }}

windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
name:
- win-py-3.10
- win-py-3.9
- win-py-3.8
- win-py-3.7
- win-py-3.6
arch:
- x64
- x86
include:
- name: win-py-3.10
pyenv: '3.10'
- name: win-py-3.9
pyenv: '3.9'
- name: win-py-3.8
pyenv: '3.8'
- name: win-py-3.7
pyenv: '3.7'
- name: win-py-3.6
pyenv: '3.6'

steps:
- name: Check out code
uses: actions/checkout@v2
DISTRO: fedora:latest

- name: Install the right python
uses: actions/setup-python@v2
- name: Upload sdist
uses: actions/upload-artifact@v2
with:
python-version: ${{ matrix.pyenv }}
architecture: ${{ matrix.arch }}

- name: Build and test gssapi
shell: bash
run: ./ci/build.sh
env:
OS_NAME: windows

macos-heimdal:
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v2
path: ./dist/*.whl
name: artifact

- name: Build and test gssapi
run: ./ci/build.sh
env:
KRB5_VER: heimdal
- name: Upload tagged build artifact
uses: actions/upload-artifact@v2
with:
path: ./tag_build/*
name: tag_build

# FIXME: Remove once validated that it works
wheel-windows:
needs:
- sdist

runs-on: windows-latest
strategy:
matrix:
Expand Down Expand Up @@ -122,19 +149,29 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: build wheel
- name: Set up environment
shell: bash
run: ./ci/build.sh
env:
OS_NAME: windows

- name: Build wheel
uses: pypa/cibuildwheel@v2.1.2
env:
CIBW_ARCHS: all
CIBW_BUILD: ${{ matrix.pyenv }}-${{ matrix.arch }}
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v2
- name: Upload wheel
uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
name: artifact

wheel-macos:
needs:
- sdist

runs-on: macos-10.15

strategy:
Expand Down Expand Up @@ -166,42 +203,53 @@ jobs:
arch: arm64

steps:
- name: Check out code
uses: actions/checkout@v2
- name: Download sdist
uses: actions/download-artifact@v2
with:
name: artifact
path: ./

- name: Extract sdist
run: |
tar xf gssapi-*.tar.gz
mv gssapi-*/* .
rm -r gssapi-*/
rm gssapi-*.tar.gz
- name: build wheel
- name: Build wheel
uses: pypa/cibuildwheel@v2.1.2
env:
CIBW_ARCHS: all
CIBW_TEST_SKIP: '*_arm64'
CIBW_BUILD: ${{ matrix.pyenv }}-macosx_${{ matrix.arch }}
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v2
- name: Upload wheel
uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
name: artifact

release-linux:
release:
needs:
- wheel-windows
- wheel-macos

runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set things up
run: ./ci/run-on-linux.sh ./ci/before-deploy.sh
env:
DISTRO: fedora:latest

- name: Download wheels
- name: Download sdist and wheels
uses: actions/download-artifact@v2
with:
name: artifact
path: ./dist

- run: ls -al /dist
- name: Download tagged build artifact
uses: actions/download-artifact@v2
with:
name: tag_build
path: ./tag_build

- run: |
ls -al ./dist
ls -al ./tag_build
3 changes: 2 additions & 1 deletion ci/before-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ mkdir ./tag_build

# create and checksum the tarball

tag=$(git describe --tags)
#tag=$(git describe --tags)
tags="v1.2.3"
if [ x"${tag#v[0-9]}" = "x${tag}" ]; then
PYTHON_GSSAPI_VERSION=${tag}
else
Expand Down

0 comments on commit 0fd9c24

Please sign in to comment.