-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-package_macos_py39_x64.yml
More file actions
58 lines (47 loc) · 1.69 KB
/
python-package_macos_py39_x64.yml
File metadata and controls
58 lines (47 loc) · 1.69 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
name: macOS_py39_x64
on:
workflow_call:
workflow_dispatch:
jobs:
macOS_py39_x64:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true # fail-fast: true meant that if one test fail, then all running tests will be canceled
matrix:
config:
- { name: "macOS (py39_x64)", os: macos-latest, python-version: '3.9', architecture: x64, artifact_name: "macos-latest.py39_x64.whl.zip" }
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
architecture: ${{ matrix.config.architecture }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel flake8 pytest twine isort build pybind11==2.11
- name: Build package (setup.py)
run: |
python -m build --wheel
- name: Install package (dist/*.whl)
run: |
python util_funcs.py --func="install_dist" --pat="dist/**/*.whl" --pkg_name="actions_python_cpp_compiler"
- name: Test with builtin test function
run: |
python -c "import actions_python_cpp_compiler; actions_python_cpp_compiler.run_tests()"
- name: Twine check
if: ${{ always() }}
run: |
twine check dist/*
- name: Upload wheel artifact
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.artifact_name }}
path: dist/*.whl