Skip to content

Commit

Permalink
Bazel version update to 6.2 (#2371)
Browse files Browse the repository at this point in the history
* New bazel version works

* Presumably working CI

* Another try

* GTest removal & minor fixes

* Fixed files

* Minor

* Fixing wrong check in test

* Fixed test name

* Minor

* Update cpp/oneapi/dal/table/test/common.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/common.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/common.cpp

Co-authored-by: Alexandra <[email protected]>

* Update .ci/pipeline/ci.yml

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Update cpp/oneapi/dal/table/test/column_accessor.cpp

Co-authored-by: Alexandra <[email protected]>

* Minor

---------

Co-authored-by: Alexandra <[email protected]>
  • Loading branch information
KulikovNikita and aepanchi authored Jun 7, 2023
1 parent 2b2c1af commit 23786e6
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 420 deletions.
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.2.0
22 changes: 8 additions & 14 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,24 +159,18 @@ jobs:
vmImage: 'ubuntu-22.04'
variables:
platform.type : 'lnx32e'
BAZEL_VERSION: bazel-4.0.0
BAZEL_CACHE_DIR: $(Pipeline.Workspace)/.bazel-cache
BAZEL_VERSION: $(Pipeline.Workspace)/bazelisk-linux-amd64
BAZEL_CACHE_MAX_SIZE_KB: 4194304 # Size in kilobytes ~ 4Gb
steps:
- script: |
# Add bazel repository
sudo apt install -y curl gnupg
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | \
sudo tee /etc/apt/sources.list.d/bazel.list
sudo apt-get update
sudo apt-get install gcc-multilib \
g++-multilib \
binutils \
openjdk-11-jdk \
$(BAZEL_VERSION)
# Download Bazelisk
export SHA256="168851e70cf5f95c0e215e7f3aaca5132ffc3c8dd8f585a4157b0be2b53cfe32 bazelisk-linux-amd64"
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64
echo ${SHA256} | sha256sum --check
# "Install" bazelisk
chmod +x bazelisk-linux-amd64
mv bazelisk-linux-amd64 ${BAZEL_VERSION}
displayName: 'install-deps'
- script: |
Expand Down
7 changes: 0 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,6 @@ onedal_repo(
root_env_var = "DAALROOT",
)

http_archive(
name = "gtest",
url = "https://github.com/google/googletest/archive/release-1.10.0.tar.gz",
sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb",
strip_prefix = "googletest-release-1.10.0",
)

http_archive(
name = "catch2",
url = "https://github.com/catchorg/Catch2/archive/v2.13.10.tar.gz",
Expand Down
11 changes: 7 additions & 4 deletions cpp/oneapi/dal/algo/louvain/test/louvain_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,12 @@ struct GraphTypeInfo<std::int32_t> {

class louvain_test {
public:
static bool is_nan(double x) {
return x != x;
}

template <typename EdgeValueType>
const auto create_graph(const graph_base_data& graph_data,
std::vector<EdgeValueType>& weights) {
auto create_graph(const graph_base_data& graph_data, std::vector<EdgeValueType>& weights) {
using graph_type = typename GraphTypeInfo<EdgeValueType>::graph_type;

graph_type graph;
Expand Down Expand Up @@ -279,7 +282,7 @@ class louvain_test {
std::vector<std::int32_t>& expected_labels,
std::int64_t expected_community_count) {
UNSCOPED_INFO("Modularity is NaN");
REQUIRE(!std::isnan(result.get_modularity()));
REQUIRE(!is_nan(result.get_modularity()));
UNSCOPED_INFO("Modularity value is not in [-1/2; 1]");
REQUIRE(Approx(result.get_modularity()) <= 1.0);
UNSCOPED_INFO("Modularity value is not in [-1/2; 1]");
Expand Down Expand Up @@ -340,7 +343,7 @@ class louvain_test {
const auto result = dal::preview::vertex_partitioning(louvain_desc, graph);
if (is_modularity_valid) {
UNSCOPED_INFO("Modularity is NaN");
REQUIRE(!std::isnan(result.get_modularity()));
REQUIRE(!is_nan(result.get_modularity()));
UNSCOPED_INFO("Modularity value is not in [-1/2; 1]");
REQUIRE(Approx(result.get_modularity()) <= 1.0);
UNSCOPED_INFO("Modularity value is not in [-1/2; 1]");
Expand Down
10 changes: 1 addition & 9 deletions cpp/oneapi/dal/table/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,17 @@ dal_test_suite(
"test/homogen_serialization.cpp",
"detail/test/csr_accessor.cpp",
"test/csr.cpp",
],
dal_deps = [":table"],
framework = "catch2",
)

dal_test_suite(
name = "gtest_tests",
srcs = [
"test/column_accessor.cpp",
"test/common.cpp",
],
dal_deps = [":table"],
framework = "catch2",
)

dal_test_suite(
name = "tests",
tests = [
":private_tests",
":gtest_tests",
":catch2_tests",
],
)
Loading

0 comments on commit 23786e6

Please sign in to comment.