-
Notifications
You must be signed in to change notification settings - Fork 129
143 lines (135 loc) · 3.74 KB
/
release_test.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
name: Release Test
on:
# push:
workflow_dispatch:
jobs:
source_build:
name: Try package the source
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-20.04'
python-version:
- '3.8.17'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 20
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up python dependences
run: |
pip install --upgrade pip
pip install --upgrade flake8 setuptools wheel twine
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-build.txt ]; then pip install -r requirements-build.txt; fi
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi
pip install --upgrade build
- name: Build packages
run: |
make zip
ls -al dist
- name: Upload packed files to artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts-source-pack
path: ./dist/*
- name: Upload packed files to artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts-all
path: ./dist/*
wheel_build:
name: Try build the wheels
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-20.04'
- 'macos-12'
python:
- '3.7.17'
- '3.8.17'
- '3.9.17'
- '3.10.17'
# - '3.11'
architecture:
- x86_64
- arm64
- aarch64
- x86
- AMD64
exclude:
- os: ubuntu-20.04
architecture: arm64
- os: ubuntu-20.04
architecture: x86
- os: ubuntu-20.04
architecture: AMD64
- os: macos-12
architecture: aarch64
- os: macos-12
architecture: x86
- os: macos-12
architecture: AMD64
- python: '3.7.17'
architecture: arm64
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 20
- name: Set up QEMU
if: ${{ runner.os == 'Linux' }}
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: "pp* *musllinux*"
CIBW_ARCHS: ${{ matrix.architecture }}
CIBW_PROJECT_REQUIRES_PYTHON: ~=${{ matrix.python }}.0
- name: Show the buildings
shell: bash
run: |
ls -al ./wheelhouse
mv wheelhouse dist
- name: Upload packed files to artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts-${{ runner.os }}-cp${{ matrix.python }}-${{ matrix.architecture }}
path: ./dist/*
- name: Upload packed files to artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts-all
path: ./dist/*
# the publishing can only be processed on linux system
fake_publish:
name: Fake Publish
runs-on: ubuntu-20.04
needs:
- wheel_build
- source_build
strategy:
fail-fast: false
matrix:
python:
- '3.8.17'
steps:
- name: Download packed files to artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts-all
path: ./dist
- name: Show the buildings
shell: bash
run: |
ls -al ./dist