diff --git a/.github/scripts/run-bazel-test b/.github/scripts/run-bazel-test deleted file mode 100755 index 48261b95..00000000 --- a/.github/scripts/run-bazel-test +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -WORKSPACE=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && /bin/pwd -P) - -OS_ARG=${1:?} - -bazel build //... - -bazel test --test_output=all //core/... //pull/... -bazel test --test_output=all //pull/tests/integration:scrape-test - -#if [[ "${OS_ARG}" == "macOS"* ]] -#then -# bazel test --test_output=all //pull/tests/integration:lint-test -#fi - -bazel run -c opt //core/benchmarks diff --git a/.github/scripts/run-bazel-test.cmd b/.github/scripts/run-bazel-test.cmd deleted file mode 100644 index 1055c1c7..00000000 --- a/.github/scripts/run-bazel-test.cmd +++ /dev/null @@ -1,5 +0,0 @@ -bazel build //... || EXIT /B 1 - -bazel test --test_output=all //core/... //pull/... || EXIT /B 1 - -bazel run -c opt //core/benchmarks || EXIT /B 1 diff --git a/.github/scripts/run-prepare b/.github/scripts/run-prepare index 0fbe1045..e80d1276 100755 --- a/.github/scripts/run-prepare +++ b/.github/scripts/run-prepare @@ -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 diff --git a/.github/workflows/bazel-ci.yml b/.github/workflows/bazel-ci.yml new file mode 100644 index 00000000..1d46a2cb --- /dev/null +++ b/.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-11.0, 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 diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 3809bf74..76a4a202 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -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 diff --git a/.gitignore b/.gitignore index 3406309c..5267e3b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -bazel-* +/bazel-* cmake-build-*/ _*/ .idea/