Skip to content

Commit 49679ea

Browse files
authored
ci: Add bazel jobs (#232)
1 parent e4e535d commit 49679ea

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: amd64 Bazel Linux
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
# min hours day(month) month day(week)
8+
- cron: '0 0 7,22 * *'
9+
10+
jobs:
11+
# Building using the github runner environement directly.
12+
bazel:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out repository code
16+
uses: actions/checkout@v2
17+
- name: Install Bazel
18+
run: |
19+
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
20+
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
21+
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
22+
sudo apt-get update
23+
sudo apt-get install bazel
24+
bazel --version
25+
- name: Test
26+
run: bazel test -s --verbose_failures //...

WORKSPACE

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
workspace(name = "com_google_cpufeatures")
22

3-
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
44

5-
http_archive(
5+
git_repository(
66
name = "com_google_googletest",
7-
sha256 = "1cff5915c9dfbf8241d811e95230833c4f34a6d56b7b8c960f4c828f60429a38",
8-
strip_prefix = "googletest-c9461a9b55ba954df0489bab6420eb297bed846b",
9-
urls = ["https://github.com/google/googletest/archive/c9461a9b55ba954df0489bab6420eb297bed846b.zip"],
7+
tag = "release-1.11.0",
8+
remote = "https://github.com/google/googletest.git",
109
)
1110

12-
http_archive(
11+
git_repository(
1312
name = "bazel_skylib",
14-
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
15-
urls = [
16-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
17-
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
18-
],
13+
tag = "1.2.0",
14+
remote = "https://github.com/bazelbuild/bazel-skylib.git",
1915
)
2016

2117
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

0 commit comments

Comments
 (0)