Skip to content

Commit

Permalink
Merge pull request #433 from jupp0r/separate-bazel-ci
Browse files Browse the repository at this point in the history
ci: Run bazel from separate workflow
  • Loading branch information
gjasny committed Dec 23, 2020
2 parents 12c5783 + eb06094 commit 75bfdb1
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 36 deletions.
19 changes: 0 additions & 19 deletions .github/scripts/run-bazel-test

This file was deleted.

5 changes: 0 additions & 5 deletions .github/scripts/run-bazel-test.cmd

This file was deleted.

10 changes: 0 additions & 10 deletions .github/scripts/run-prepare
Expand Up @@ -15,21 +15,11 @@ case "${OS_ARG}" in
;;
esac

curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
packages+=(telegraf)

sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
sudo apt-get update
sudo apt-get install -y "${packages[@]}"
sudo locale-gen de_DE.UTF-8 # used by SerializerTest
;;

macOS*)
packages=(prometheus telegraf)
brew install "${packages[@]}"
;;
esac

case "${BUILDSYSTEM_ARG}" in
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/bazel-ci.yml
@@ -0,0 +1,47 @@
name: Bazel CI
on: [push, pull_request]

jobs:
build:
name: Bazel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-20.04, windows-2019]
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Generate German locale on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get remove -y --purge man-db # avoid time-consuming trigger
sudo apt-get update
sudo apt-get install -y locales
sudo locale-gen de_DE.UTF-8 # used by SerializerTest
- name: Install telegraf on Ubuntu
if: runner.os == 'Linux'
run: |
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update
sudo apt-get install -y telegraf
- name: Install telegraf on macOS
if: runner.os == 'macOS'
run: brew install telegraf

- name: Build
run: bazel build //...

- name: Test
run: bazel test --test_output=all //core/... //pull/...

- name: Scraping Test
if: runner.os != 'Windows'
run: bazel test --test_output=all //pull/tests/integration:scrape-test

- name: Benchmark
run: bazel run -c opt //core/benchmarks
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration-workflow.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
buildsystem: [bazel, cmake]
buildsystem: [cmake]
os: [macOS-latest, ubuntu-16.04, windows-2016]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,4 +1,4 @@
bazel-*
/bazel-*
cmake-build-*/
_*/
.idea/
Expand Down

0 comments on commit 75bfdb1

Please sign in to comment.