forked from neka-nat/cupoch
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 1.88 KB
/
ubuntu.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
name: Ubuntu
on:
push:
branches: [ master, ci ]
tags: ['v*']
pull_request:
branches: [ master, ci ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.8", "3.12"]
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
./scripts/actions/install_deps_ubuntu.sh
python -m pip install -U pip wheel setuptools
- name: Install Conan
shell: bash
run: |
pip install -U conan
echo $'tools.system.package_manager:mode=install\ntools.system.package_manager:sudo=True' > global.conf
conan config install global.conf
- name: Install CUDA
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '12.1.0'
method: 'network'
# 'libraries' is required for 'libcublas-dev'
sub-packages: '["compiler", "libraries"]'
- name: Configure CMake
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cd build
cmake --build . --verbose
- name: Build package
run: |
cd build
cmake --build . --target pip-package --verbose
- name: Rename package
run: |
cd build/lib/python_package/pip_package
rename s/linux/manylinux1/ *.whl
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
env:
PYPI_API_TOKEN: ${{ secrets.pypi_api_token }}
run: |
python -m pip install twine
cd build/lib/python_package
python -m twine upload -u "__token__" -p ${PYPI_API_TOKEN} pip_package/*