forked from python-ldap/python-ldap
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (65 loc) · 2.23 KB
/
ci.yml
File metadata and controls
68 lines (65 loc) · 2.23 KB
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
---
name: CI
on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
jobs:
build:
name: "${{ matrix.os }} with Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["cp310", "cp311", "pp310"]
os: ["ubuntu-latest", "macos-latest"]
steps:
- name: Checkout
uses: "actions/checkout@v3"
- name: Install apt dependencies
run: |
set -ex
sudo apt update
sudo apt install -y ldap-utils slapd enchant-2 libldap2-dev libsasl2-dev apparmor-utils
if: runner.os == 'Linux'
- name: Disable AppArmor
run: sudo aa-disable /usr/sbin/slapd
if: runner.os == 'Linux'
- name: Set up QEMU for multi-arch build
# Check https://github.com/docker/setup-qemu-action for newer versions.
uses: docker/setup-qemu-action@v2
if: runner.os == 'Linux'
with:
# Note: 6.2.0 is buggy: make sure to avoid it.
# See https://github.com/pypa/cibuildwheel/issues/1250
image: tonistiigi/binfmt:qemu-v7.0.0
- name: Build wheels
uses: pypa/cibuildwheel@v2.14.1
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
CIBW_BUILD: ${{matrix.python-version}}-*
CIBW_SKIP: "*musllinux*"
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_BEFORE_ALL_LINUX: >-
yum -y groupinstall "Development tools"
&& yum -y install openldap-devel python-devel
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
# A file, directory or wildcard pattern that describes what to upload
path: wheelhouse/*.whl
release:
name: "Release"
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
# will download and upack all files from the default artifact named 'artifact'
uses: actions/download-artifact@v3
- name: GH Release
uses: softprops/action-gh-release@v0.1.15
with:
tag_name: latest
files: |
artifact/*.whl