|
1 | | -# Taken from osqp-python |
2 | | - |
3 | | -name: Build Wheels |
| 1 | +name: Build CUDA Linux |
4 | 2 |
|
5 | 3 | on: |
6 | | - workflow_dispatch: |
7 | | - inputs: |
8 | | - branch: |
9 | | - description: "Branch to run on" |
10 | | - required: true |
11 | | - default: "main" |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + tags: |
| 8 | + - '*' |
| 9 | + pull_request: |
| 10 | + branches: |
| 11 | + - master |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - build_sdist: |
15 | | - name: Build source |
16 | | - runs-on: ubuntu-latest |
17 | | - strategy: |
18 | | - fail-fast: false |
19 | | - steps: |
20 | | - - uses: actions/checkout@v4 |
21 | | - with: |
22 | | - ref: ${{ github.event.inputs.branch }} |
23 | | - submodules: "recursive" |
24 | | - |
25 | | - - name: Build source and wheel |
26 | | - run: | |
27 | | - python -m pip install build |
28 | | - python -m build --sdist -o wheelhouse |
29 | | -
|
30 | | - - name: Upload sdist to github |
31 | | - uses: actions/upload-artifact@v4 |
32 | | - with: |
33 | | - name: wheelhouse-sdist |
34 | | - path: wheelhouse/* |
35 | | - if-no-files-found: error |
36 | | - |
37 | 14 | build_wheels: |
38 | | - name: Building wheels on ${{ matrix.os }} |
| 15 | + name: Build wheel on ${{ matrix.os }} |
39 | 16 | runs-on: ${{ matrix.os }} |
40 | 17 | strategy: |
41 | 18 | fail-fast: false |
42 | 19 | matrix: |
43 | | - os: [ubuntu-latest, macos-13, macos-latest, windows-latest] |
| 20 | + os: [ubuntu-latest] |
44 | 21 |
|
45 | 22 | steps: |
46 | | - - uses: actions/checkout@v4 |
47 | | - with: |
48 | | - fetch-depth: 0 |
49 | | - submodules: true |
50 | | - - uses: actions/setup-python@v6 |
51 | | - with: |
52 | | - python-version: ${{ matrix.python-version }} |
53 | | - |
54 | | - - uses: pypa/cibuildwheel@v2.21 |
55 | | - env: |
56 | | - CIBW_SKIP: "pp38-*" |
| 23 | + - uses: actions/checkout@master |
57 | 24 |
|
58 | | - - name: Upload wheels |
59 | | - uses: actions/upload-artifact@v4 |
60 | | - with: |
61 | | - name: wheelhouse-${{ matrix.os }} |
62 | | - path: wheelhouse/*.whl |
63 | | - |
64 | | - # publish-qoco-to-pypi: |
65 | | - # name: >- |
66 | | - # Publish QOCO Wheels to PyPI |
67 | | - # if: startsWith(github.ref, 'refs/tags/') |
68 | | - # needs: |
69 | | - # - build_sdist |
70 | | - # - build_wheels |
71 | | - # runs-on: ubuntu-latest |
72 | | - # environment: |
73 | | - # name: pypi |
74 | | - # url: https://pypi.org/p/qoco |
75 | | - # permissions: |
76 | | - # id-token: write |
77 | | - # steps: |
78 | | - # - name: Download all wheels |
79 | | - # uses: actions/download-artifact@v6 |
80 | | - # with: |
81 | | - # pattern: wheelhouse-* |
82 | | - # merge-multiple: true |
83 | | - # path: wheelhouse |
84 | | - # - name: Move wheels into dist directory |
85 | | - # run: | |
86 | | - # mkdir -p dist |
87 | | - # cp wheelhouse/* dist/ |
88 | | - # - name: Publish distribution to PyPI |
89 | | - # uses: pypa/gh-action-pypi-publish@release/v1 |
90 | | - |
91 | | - publish-qoco-to-testpypi: |
92 | | - name: Publish QOCO Wheels to TestPyPI |
93 | | - needs: |
94 | | - - build_wheels |
95 | | - - build_sdist |
96 | | - runs-on: ubuntu-latest |
97 | | - |
98 | | - environment: |
99 | | - name: testpypi |
100 | | - url: https://test.pypi.org/p/qoco |
101 | | - |
102 | | - permissions: |
103 | | - id-token: write |
104 | | - |
105 | | - steps: |
106 | | - - name: Download all wheels |
107 | | - uses: actions/download-artifact@v6 |
| 25 | + - name: Build wheels |
| 26 | + uses: pypa/cibuildwheel@v2.23 |
108 | 27 | with: |
109 | | - pattern: wheelhouse-* |
110 | | - merge-multiple: true |
111 | | - path: wheelhouse |
112 | | - - name: Publish distribution to TestPyPI |
113 | | - uses: pypa/gh-action-pypi-publish@release/v1 |
| 28 | + package-dir: backend/cuda |
| 29 | + config-file: backend/cuda/cibuildwheel.toml |
| 30 | + output-dir: wheelhouse |
| 31 | + |
| 32 | + - name: Upload artifacts to github |
| 33 | + uses: actions/upload-artifact@v4 |
114 | 34 | with: |
115 | | - repository-url: https://test.pypi.org/legacy/ |
116 | | - packages-dir: wheelhouse |
| 35 | + name: wheels-cuda-${{ matrix.os }} |
| 36 | + path: ./wheelhouse |
0 commit comments