Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Use Ubuntu 16.04 in GitHub actions via docker #890

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def build_extension(self, ext: setuptools.extension.Extension):
build_cmd = f'''
cmake {cmake_args} -B {self.build_temp} -S {k2_dir}
cmake --build {self.build_temp} --target _k2 --config Release -- -m
cmake --build {self.build_temp} --target k2_torch_api --config Release -- -m
cmake --build {self.build_temp} --target install --config Release -- -m
'''
print(f'build command is:\n{build_cmd}')
Expand All @@ -150,10 +151,13 @@ def build_extension(self, ext: setuptools.extension.Extension):
if ret != 0:
raise Exception('Failed to build k2')

ret = os.system(f'cmake --build {self.build_temp} --target k2_torch_api --config Release -- -m')
if ret != 0:
raise Exception('Failed to build k2_torch_api')

ret = os.system(f'cmake --build {self.build_temp} --target install --config Release -- -m')
if ret != 0:
raise Exception('Failed to build k2')

else:
build_cmd = f'''
cd {self.build_temp}
Expand All @@ -162,7 +166,7 @@ def build_extension(self, ext: setuptools.extension.Extension):

cat k2/csrc/version.h

make {make_args} _k2 install
make {make_args} _k2 k2_torch_api install
'''
print(f'build command is:\n{build_cmd}')

Expand Down