Skip to content

Commit eb06094

Browse files
committed
ci: Run bazel from separate workflow
1 parent 12c5783 commit eb06094

File tree

6 files changed

+49
-36
lines changed

6 files changed

+49
-36
lines changed

.github/scripts/run-bazel-test

-19
This file was deleted.

.github/scripts/run-bazel-test.cmd

-5
This file was deleted.

.github/scripts/run-prepare

-10
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,11 @@ case "${OS_ARG}" in
1515
;;
1616
esac
1717

18-
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
19-
source /etc/lsb-release
20-
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
21-
packages+=(telegraf)
22-
2318
sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
2419
sudo apt-get update
2520
sudo apt-get install -y "${packages[@]}"
2621
sudo locale-gen de_DE.UTF-8 # used by SerializerTest
2722
;;
28-
29-
macOS*)
30-
packages=(prometheus telegraf)
31-
brew install "${packages[@]}"
32-
;;
3323
esac
3424

3525
case "${BUILDSYSTEM_ARG}" in

.github/workflows/bazel-ci.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Bazel CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
name: Bazel on ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [macos-latest, ubuntu-20.04, windows-2019]
11+
steps:
12+
- name: Checkout source
13+
uses: actions/checkout@v2
14+
15+
- name: Generate German locale on Ubuntu
16+
if: runner.os == 'Linux'
17+
run: |
18+
sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
19+
sudo apt-get update
20+
sudo apt-get install -y locales
21+
sudo locale-gen de_DE.UTF-8 # used by SerializerTest
22+
23+
- name: Install telegraf on Ubuntu
24+
if: runner.os == 'Linux'
25+
run: |
26+
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
27+
source /etc/lsb-release
28+
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
29+
sudo apt-get update
30+
sudo apt-get install -y telegraf
31+
32+
- name: Install telegraf on macOS
33+
if: runner.os == 'macOS'
34+
run: brew install telegraf
35+
36+
- name: Build
37+
run: bazel build //...
38+
39+
- name: Test
40+
run: bazel test --test_output=all //core/... //pull/...
41+
42+
- name: Scraping Test
43+
if: runner.os != 'Windows'
44+
run: bazel test --test_output=all //pull/tests/integration:scrape-test
45+
46+
- name: Benchmark
47+
run: bazel run -c opt //core/benchmarks

.github/workflows/continuous-integration-workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
buildsystem: [bazel, cmake]
10+
buildsystem: [cmake]
1111
os: [macOS-latest, ubuntu-16.04, windows-2016]
1212
steps:
1313
- uses: actions/checkout@v2

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
bazel-*
1+
/bazel-*
22
cmake-build-*/
33
_*/
44
.idea/

0 commit comments

Comments
 (0)