-
Notifications
You must be signed in to change notification settings - Fork 56
132 lines (115 loc) · 3.87 KB
/
release-osx-win.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
name: Release on PyPI [Windows, Mac]
on:
pull_request:
paths-ignore:
- CHANGELOG.md
release:
types:
- published
jobs:
build-wheel:
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.os }} ${{ matrix.python-version }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: [macos-13, macos-14, windows-2019, windows-latest]
include:
- os: windows-2019
toolset: ClangCl
- os: windows-latest
toolset: v143
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set ownership
run: |
# Workaround for https://github.com/actions/runner/issues/2033
# this is to fix GIT not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
git submodule update
- name: Setup conda
if: contains(matrix.os, 'macos-13') || contains(matrix.os, 'windows')
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
channels: conda-forge
python-version: ${{ matrix.python-version }}
activate-environment: proxsuite
- name: Setup conda
if: matrix.os == 'macos-14'
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge
python-version: ${{ matrix.python-version }}
activate-environment: proxsuite
installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-MacOSX-arm64.sh
- name: Install dependencies [Conda]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
conda config --remove channels defaults
mamba install doxygen graphviz eigen simde cmake compilers typing_extensions
- name: Print environment [Conda]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
conda info
mamba list
env
- name: Build wheel
if: contains(matrix.os, 'macos')
shell: bash -l {0}
run: |
pip wheel . -w dist
- name: Build wheel on windows
if: contains(matrix.os, 'windows')
shell: bash -l {0}
env :
CMEEL_CMAKE_ARGS: "-T${{ matrix.toolset }} -DBUILD_PYTHON_INTERFACE=ON -DBUILD_WITH_VECTORIZATION_SUPPORT=ON -DINSTALL_DOCUMENTATION=OFF"
CMEEL_RUN_TESTS: False
CMEEL_JOBS: 1
CMEEL_LOG_LEVEL: Debug
run: |
pip wheel . -w dist
- name: Move proxsuite to specific dist folder
shell: bash -l {0}
run: |
mkdir -p dist_proxsuite
mv dist/proxsuite*.whl dist_proxsuite
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist_proxsuite
release:
needs: "build-wheel"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/download-artifact@v3
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: |
github.repository == 'Simple-Robotics/proxsuite' &&
(github.event_name == 'release' && github.event.action == 'published')
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
check:
if: always()
name: release-osx-win
needs:
- build-wheel
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}