diff --git a/.bazelrc b/.bazelrc index b40a354..b24765d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -21,7 +21,8 @@ test --test_strategy=standalone # By default build in C++17 mode using the Homegrown scheduler for parallelism. # build --repo_env=CC=g++ build --cxxopt=-std=c++17 -build --cxxopt=-mcx16 # 16 byte CAS +# Apply -mcx16 only for x86_64 +build:x86_64 --cxxopt=-mcx16 # use 16 byte CAS build --cxxopt=-DHOMEGROWN # use the homegrown scheduler build --cxxopt=-DLONG # use 8 byte vertex identifiers build --cxxopt=-DAMORTIZEDPD # use amortized_bytepd encoding scheme for compressed graphs @@ -75,4 +76,4 @@ build:sage --define use_numa=true # Disable Bzlmod for every Bazel command # Turn it on after we migrate to use bzlmod -common --enable_bzlmod=False \ No newline at end of file +common --enable_bzlmod=False diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 0000000..6abaeb2 --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +6.2.0 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..26fb017 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,43 @@ +name: Bazel Build and Test + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build-and-test: + runs-on: ${{ matrix.runner }} + strategy: + matrix: + runner: + - ubuntu-24.04 # amd64 + - ubuntu-24.04-arm # arm64 + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Bazelisk + run: | + ARCH=$([[ "${{ matrix.runner }}" == "ubuntu-24.04" ]] && echo "amd64" || echo "arm64") + curl -LO "https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH}" + chmod +x bazelisk-linux-* + sudo mv bazelisk-linux-* /usr/local/bin/bazel + + - name: Cache Bazel + uses: actions/cache@v4 + with: + path: | + ~/.cache/bazel + ~/.cache/bazelisk + key: bazel-${{ matrix.runner }}-${{ hashFiles('WORKSPACE', '**/BUILD', '**/*.bzl') }} + restore-keys: | + bazel-${{ matrix.runner }}- + + - name: Run Bazel Build + run: | + ARCH=$([[ "${{ matrix.runner }}" == "ubuntu-24.04" ]] && echo "amd64" || echo "arm64") + bazel build //clusterers:cluster-in-memory_main diff --git a/WORKSPACE b/WORKSPACE index 9606350..f583bab 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,7 +5,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") git_repository( name = "parcluster", - remote = "git@github.com:ParAlg/InMemoryClusteringAPI.git", + remote = "https://github.com/ParAlg/InMemoryClusteringAPI.git", commit = "ccf763ad6dcf0e36c3b0b212d429ef19c2cbf837", strip_prefix = "include/", )