diff --git a/Jenkinsfile b/Jenkinsfile index 77d6ae50e..505533b99 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,11 +47,9 @@ 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") { @@ -59,43 +57,44 @@ pipeline { // 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")