Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
3a859ee42f
!21 [sync] PR-20: 升级bazel到5.1.1
From: @openeuler-sync-bot 
Reviewed-by: @zhunaipan 
Signed-off-by: @sinever
2022-11-11 20:18:49 +00:00
Jincheng Miao
e7582b9e71 update to 5.1.1 for building TF-2.10.0
Signed-off-by: Jincheng Miao <jincheng.miao@intel.com>
(cherry picked from commit af24ef0ba265374e8060cf88b133c631088e1cab)
2022-11-10 00:12:54 +08:00
openeuler-ci-bot
eb0a0be455
!18 [sync] PR-17: 升级Bazel到5.0.0
From: @openeuler-sync-bot 
Reviewed-by: @sinever 
Signed-off-by: @sinever
2022-10-28 14:10:13 +00:00
Jincheng Miao
10acd879a7 Update version to 5.0.0 for TF-2.9 build
Signed-off-by: Jincheng Miao <jincheng.miao@intel.com>
(cherry picked from commit ff1a97d4c9c44dc7bc40e7818cd3e41d01c2a4c7)
2022-10-28 18:17:34 +08:00
openeuler-ci-bot
51dbb91c6b
!13 [sync] PR-12: update version to 4.2.1 for tensorflow build
From: @openeuler-sync-bot 
Reviewed-by: @zhunaipan 
Signed-off-by: @zhunaipan
2022-07-26 08:12:50 +00:00
张少宁
5aa0955d98 update version to 4.2.1 for tensorflow build
(cherry picked from commit 200133952ddb24d4020f2c75849397b21f77cf05)
2022-07-08 09:52:04 +08:00
openeuler-ci-bot
5e22525d6f !9 解决gcc升级到gcc10后编译失败
From: @zhangtao2020
Reviewed-by: @zhengzhenyu
Signed-off-by: @zhengzhenyu
2021-08-10 11:24:25 +00:00
zhangtao2020
424d8ba738 fix build error with gcc10 2021-08-09 17:40:05 +08:00
openeuler-ci-bot
a583530137 !8 Not strip %{_bindir}/bazel after install
From: @angela7
Reviewed-by: @small_leek,@zhengzhenyu
Signed-off-by: @small_leek,@zhengzhenyu
2021-07-23 06:43:31 +00:00
guoxiaoqi
e3928a30b1 Not strip %{_bindir}/bazel after install 2021-07-13 11:08:14 +08:00
3 changed files with 82 additions and 30 deletions

View File

@ -1,45 +1,101 @@
Name: bazel
Version: 3.5.0
Release: 2
Summary: a fast, scalable, multi-language and extensible build system
License: Apache License 2.0
URL: https://www.bazel.build/
Source0: https://github.com/bazelbuild/bazel/releases/download/%{version}/bazel-%{version}-dist.zip
%define _disable_source_fetch 0
BuildRequires: java-11-openjdk-devel python3 zip unzip python3-unversioned-command gcc-g++
Name: bazel
Version: 5.1.1
Release: 0
Summary: Correct, reproducible, and fast builds for everyone.
License: Apache License 2.0
URL: http://bazel.io/
Source0: https://github.com/bazelbuild/bazel/releases/download/%{version}/bazel-%{version}-dist.zip
Requires: libstdc++ libgcc java-11-openjdk-devel python3 zip unzip python3-unversioned-command
# for folks with 'bazel' v1 package installed
Conflicts: bazel
Conflicts: bazel2
BuildRequires: java-11-openjdk-devel zlib-devel findutils gcc-c++ which unzip zip python3
BuildRequires: pkgconfig(bash-completion)
Requires: java-11-openjdk-devel
%define bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null)
%global debug_package %{nil}
%define __os_install_post %{nil}
%description
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Correct, reproducible, and fast builds for everyone.
%prep
unzip %{SOURCE0}
%setup -q -c -n bazel-%{version}
%build
env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh
chmod a+x output/bazel
find . -type f -regextype posix-extended -iregex '.*(sh|txt|py|_stub|stub_.*|bazel|get_workspace_status|protobuf_support|_so)' -exec %{__sed} -i -e '1s|^#!/usr/bin/env python$|#!/usr/bin/env python3|' "{}" \;
export EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS} --python_path=/usr/bin/python3"
# horrible of horribles, just to have `python` in the PATH
%{__mkdir_p} ./bin-hack
%{__ln_s} /usr/bin/python3 ./bin-hack/python
export PATH=$(pwd)/bin-hack:$PATH
%ifarch aarch64
export EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS} --nokeep_state_after_build --notrack_incremental_state --nokeep_state_after_build"
%else
%endif
%ifarch s390x
# increase heap size to addess s390x build failures
export BAZEL_JAVAC_OPTS="-J-Xmx4g -J-Xms512m"
%else
%endif
# loose epoch from their release date
export SOURCE_DATE_EPOCH="$(date -d $(head -1 CHANGELOG.md | %{__grep} -Eo '\b[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}\b' ) +%s)"
export EMBED_LABEL="%{version}"
# for debugging's sake
which g++
g++ --version
export TMPDIR=%{_tmppath}
export CC=gcc
export CXX=g++
export EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS} --sandbox_debug --tool_java_runtime_version=local_jdk --verbose_failures --subcommands --explain=build.log --show_result=2147483647"
env ./compile.sh
env ./scripts/generate_bash_completion.sh --bazel=output/bazel --output=output/bazel-complete.bash
%install
mkdir -p %{buildroot}%{_bindir}
install -m755 output/bazel %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}/%{_bindir}
%{__mkdir_p} %{buildroot}/%{bashcompdir}
%{__cp} output/bazel %{buildroot}/%{_bindir}/bazel-real
%{__cp} ./scripts/packages/bazel.sh %{buildroot}/%{_bindir}/bazel
%{__cp} output/bazel-complete.bash %{buildroot}/%{bashcompdir}/bazel
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/bazel
%attr(0755,root,root) %{_bindir}/bazel-real
%attr(0755,root,root) %{bashcompdir}/bazel
%changelog
* Tue Nov 8 2022 Jincheng Miao <jincheng.miao@intel.com> - 5.1.1-0
- Update version to 5.1.1 for TF-2.10.0 build
* Sat Oct 22 2022 Jincheng Miao <jincheng.miao@intel.com> - 5.0.0-0
- Update version to 5.0.0 for TF-2.9 build
* Thu Jun 22 2022 zhangshaoning <zhangshaoning@uniontech.com> - 4.2.1-0
- update version to 4.2.1
* Mon Aug 9 2021 zhangtao <zhangtao221@huawei.com> - 3.5.0-4
- fix build error with gcc10
* Tue Jul 13 2021 guoxiaoqi <guoxiaoqi2@huawei.com> - 3.5.0-3
- Not strip %{_bindir}/bazel after install
* Mon May 31 2021 baizhonggui <baizhonggui@huawei.com> - 3.5.0-2
- Add gcc-g++ in BuildRequires
* Sun Sep 28 2020 Zhipeng Xie<xiezhipeng1@huawei.com> - 3.5.0-1
* Mon Sep 28 2020 Zhipeng Xie<xiezhipeng1@huawei.com> - 3.5.0-1
- Package init

View File

@ -1,4 +0,0 @@
version_control: github
src_repo: bazelbuild/bazel
tag_prefix:
seperator: .