Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpoluektov committed Nov 27, 2023
1 parent 8c10077 commit 839093b
Showing 1 changed file with 33 additions and 34 deletions.
67 changes: 33 additions & 34 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,55 +47,54 @@ pipeline {
stage("Build host wheels") {
parallel {
stage("Build linux runtime") { steps {
withVenv {
withTools(params.TOOLS_VERSION) { createZip("linux") }
extractRuntime()
buildXinterpreter()
}
createZip("linux")
extractRuntime()
buildXinterpreter()
script {
docker.image('tensorflow/build:2.14-python3.9').inside('-e SETUPTOOLS_SCM_PRETEND_VERSION=${env.TAG_VERSION} -v ${env.WORKSPACE}:/ai_tools -w /ai_tools') {
dir("xformer") {
sh "bazel --version"
// sh "wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64"
// sh "chmod +x bazelisk-linux-amd64"
// sh "./bazelisk-linux-amd64 --output_user_root=${env.BAZEL_USER_ROOT} build --remote_cache=${env.BAZEL_CACHE_URL} //:xcore-opt --verbose_failures --//:disable_version_check"
sh 'bazel build //:xcore-opt --verbose_failures --linkopt=-lrt --crosstool_top="@sigbuild-r2.14-clang_config_cuda//crosstool:toolchain" --//:disable_version_check'
sh 'bazel build //:xcore-opt --verbose_failures --linkopt=-lrt --crosstool_top="@sigbuild-r2.14-clang_config_cuda//crosstool:toolchain" --//:disable_version_check --output_user_root=${env.BAZEL_USER_ROOT} build --remote_cache=${env.BAZEL_CACHE_URL}'
}
dir("python") {
sh "pip install auditwheel==5.2.0 --no-cache-dir"
sh "python setup.py bdist_wheel"
sh """
for f in dist/*.whl; do
auditwheel repair --plat manylinux2014_x86_64 $f
done
"""
}
}
}
dir ("python") { withVenv {
// TODO: Make this with manylinux
sh "pip install auditwheel==5.2.0 --no-cache-dir"
sh "python3 setup.py bdist_wheel"
sh "pip install dist/*"
stash name: "linux_wheel", includes: "dist/*"
} }
stash name: "linux_wheel", includes: "dist/*"
} }
stage("Build x86 Mac runtime") {
agent { label "macos_13 && !arm64" }
steps {
// TODO: Fix tensorflow installation
setupRepo()
createZip("mac_x86")
extractRuntime()
buildXinterpreter()
dir("xformer") {
sh "curl -LO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-darwin-amd64"
sh "chmod +x bazelisk-darwin-amd64"
sh "./bazelisk-darwin-amd64 build //:xcore-opt --copt=-fvisibility=hidden --copt=-mavx --copt=-mmacosx-version-min=10.13 --linkopt=-mmacosx-version-min=10.13 --linkopt=-dead_strip --distinct_host_configuration=false --//:disable_version_check"
}
dir("python") {
sh "python3 setup.py bdist_wheel --plat-name macosx_10_14_x86_64"
stash name: "mac_x86_wheel", includes: "dist/*"
}
}
post { cleanup { xcoreCleanSandbox() } }
}
// TODO: crossplatform build on mac
// stage("Build x86 Mac runtime") {
// agent { label "macos_13 && !arm64" }
// steps {
// // TODO: Fix tensorflow installation
// setupRepo()
// createZip("mac_x86")
// extractRuntime()
// buildXinterpreter()
// dir("xformer") {
// sh "curl -LO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-darwin-amd64"
// sh "chmod +x bazelisk-darwin-amd64"
// sh "./bazelisk-darwin-amd64 build //:xcore-opt --copt=-fvisibility=hidden --copt=-mavx --copt=-mmacosx-version-min=10.13 --linkopt=-mmacosx-version-min=10.13 --linkopt=-dead_strip --distinct_host_configuration=false --//:disable_version_check"
// }
// dir("python") {
// sh "python3 setup.py bdist_wheel --plat-name macosx_10_14_x86_64"
// stash name: "mac_x86_wheel", includes: "dist/*"
// }
// }
// post { cleanup { xcoreCleanSandbox() } }
// }
stage("Build Arm Mac runtime") {
agent { label "macos && arm64" }
agent { label "macos && arm64 && xcode" }
steps {
setupRepo()
createZip("mac_arm")
Expand Down

0 comments on commit 839093b

Please sign in to comment.