Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 172 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
cmake_test:
name: CMake test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
- name: run tests
run: ./ci/do_ci.sh cmake.test

plugin_test:
name: Plugin -> CMake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
- name: run tests
run: ./ci/do_ci.sh cmake.test_example_plugin

gcc_48_test:
name: Legacy Bazel
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
sudo ./ci/install_bazelisk.sh
sudo ./ci/install_gcc48.sh
- name: run tests
run: ./ci/do_ci.sh bazel.legacy.test

bazel_test:
name: Bazel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
sudo ./ci/install_bazelisk.sh
- name: run tests
run: ./ci/do_ci.sh bazel.test

bazel_noexcept:
name: Bazel noexcept
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
sudo ./ci/install_bazelisk.sh
- name: run tests
run: ./ci/do_ci.sh bazel.noexcept

bazel_asan:
name: Bazel asan config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
sudo ./ci/install_bazelisk.sh
- name: run tests
run: ./ci/do_ci.sh bazel.asan

bazel_tsan:
name: Bazel tsan config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
sudo ./ci/install_bazelisk.sh
- name: run tests
run: ./ci/do_ci.sh bazel.tsan

benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
sudo ./ci/install_bazelisk.sh
- name: run tests
run: |
env BENCHMARK_DIR=/benchmark
./ci/do_ci.sh benchmark
- name: Upload benchmark results
uses: actions/upload-artifact@v2
with:
name: benchmark_reports
path: /home/runner/benchmark

format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup
run: sudo ./ci/install_format_tools.sh
- name: run tests
run: ./ci/do_ci.sh format

osx_test:
name: Bazel on MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: run tests
run: ./ci/do_ci.sh bazel.test

windows:
name: CMake -> exporter proto
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: setup
run: |
./ci/setup_windows_cmake.ps1
./ci/setup_windows_ci_environment.ps1
./ci/install_windows_protobuf.ps1
- name: run cmake test
run: ./ci/do_ci.ps1 cmake.test
- name: run otprotocol test
run: ./ci/do_ci.ps1 cmake.exporter.otprotocol.test

windows_bazel:
name: Bazel Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: setup
run: ./ci/install_windows_bazelisk.ps1
- name: run tests
run: ./ci/do_ci.ps1 bazel.build

windows_plugin_test:
name: Plugin -> CMake Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: setup
run: |
./ci/setup_windows_cmake.ps1
./ci/setup_windows_ci_environment.ps1
- name: run tests
run: ./ci/do_ci.ps1 cmake.test_example_plugin
2 changes: 1 addition & 1 deletion ci/do_ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $VCPKG_DIR="$SRC_DIR\vcpkg"

switch ($action) {
"bazel.build" {
bazel build $BAZEL_OPTIONS -- //... -//api/test/... -//sdk/test/...
bazel build $BAZEL_OPTIONS -- //... //api/test/... //sdk/test/...
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand Down
2 changes: 2 additions & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ elif [[ "$1" == "benchmark" ]]; then
exit 0
elif [[ "$1" == "format" ]]; then
tools/format.sh
# normalize file endings according to .gitattributes
git add --renormalize .
CHANGED="$(git ls-files --modified)"
if [[ ! -z "$CHANGED" ]]; then
echo "The following files have changes:"
Expand Down
3 changes: 2 additions & 1 deletion ci/setup_windows_ci_environment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ $ErrorActionPreference = "Stop"
trap { $host.SetShouldExit(1) }

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
Push-Location -Path vcpkg
$VCPKG_DIR=(Get-Item -Path ".\").FullName
./bootstrap-vcpkg.bat
./vcpkg integrate install
./vcpkg install benchmark:x64-windows
./vcpkg install gtest:x64-windows
Pop-Location