blob: 4175b4e20e5a35434a9fdc16754683c1fa2e56f3 [file] [log] [blame]
name: "MiNiFi-CPP CI"
on: [push, pull_request, workflow_dispatch]
jobs:
macos_xcode_11_2_1:
name: "macos-xcode11.2.1"
runs-on: macos-10.15
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: install_dependencies
run: brew install ossp-uuid boost flex openssl python lua libpcap xz libssh2
- id: setup_env
run: |
echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
sudo xcode-select -switch /Applications/Xcode_11.2.1.app
- id: build
run: ./bootstrap.sh -e -t && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_LUA_SCRIPTING=1 -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_RULE_MESSAGES=OFF -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . --parallel 4 && make test ARGS="--timeout 300 -j4 --output-on-failure" && make linter
macos_xcode_12_0:
name: "macos-xcode12.0"
runs-on: macos-10.15
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: install_dependencies
run: brew install ossp-uuid boost flex openssl python lua libpcap xz libssh2
- id: setup_env
run: |
echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
sudo xcode-select -switch /Applications/Xcode_12.app
- id: build
run: ./bootstrap.sh -e -t && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_LUA_SCRIPTING=1 -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_RULE_MESSAGES=OFF -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . --parallel 4 && make test ARGS="--timeout 300 -j4 --output-on-failure" && make linter
windows:
name: "windows"
runs-on: windows-2016
timeout-minutes: 90
steps:
- id: checkout
uses: actions/checkout@v2
- id: build
run: |
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\;%path%
PATH=C:\Windows\Microsoft.NET\Framework\v4.0.30319;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin;%path%
PATH=C:\Program Files (x86)\Windows Kits\10\bin\x86;%path%
PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86;%path%
PATH=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCPackages;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86;%path%
PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;%path%
PATH=C:\Windows\System32\;%path%
win_build_vs.bat build /CI
shell: cmd
ubuntu_16_04:
name: "ubuntu-16.04"
runs-on: ubuntu-16.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ubuntu-16.04-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
ubuntu-16.04-ccache-${{github.ref}}-
ubuntu-16.04-ccache-refs/heads/main-
- id: install_deps
run: |
sudo apt install -y ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- id: build
run: ./bootstrap.sh -e -t && cd build && cmake -DUSE_SHARED_LIBS= -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_RULE_MESSAGES=OFF -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . --parallel 4 && make test ARGS="--timeout 300 -j2 --output-on-failure"
ubuntu_16_04_gcc_4_8:
name: "ubuntu-16.04-gcc-4.8"
runs-on: ubuntu-16.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ubuntu-16.04-gcc-4.8-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
ubuntu-16.04-gcc-4.8-ccache-${{github.ref}}-
ubuntu-16.04-gcc-4.8-ccache-refs/heads/main-
- id: install_deps
run: |
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt update
sudo apt install -y gcc-4.8 g++-4.8 bison flex libboost-all-dev uuid-dev openssl libcurl4-openssl-dev ccache libpython3-dev liblua5.1-0-dev libpcap-dev libssh2-1-dev
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
sudo unlink /usr/bin/g++ && sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++
- id: build
run: ./bootstrap.sh -e -t && cd build && cmake -DUSE_SHARED_LIBS= -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_RULE_MESSAGES=OFF -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . --parallel 4 && make test ARGS="--timeout 300 -j2 --output-on-failure"
ubuntu_20_04:
name: "ubuntu-20.04"
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ubuntu-20.04-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
ubuntu-20.04-ccache-${{github.ref}}-
ubuntu-20.04-ccache-refs/heads/main-
- id: install_deps
run: |
sudo apt install -y ccache libfl-dev
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- id: build
run: ./bootstrap.sh -e -t && cd build && cmake -DUSE_SHARED_LIBS= -DSTRICT_GSL_CHECKS=AUDIT .. && make -j4 VERBOSE=1 && make test ARGS="--timeout 300 -j2 --output-on-failure"
ubuntu_16_04_all:
name: "ubuntu-16.04-all"
runs-on: ubuntu-16.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ubuntu-16.04-all-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
ubuntu-16.04-all-ccache-${{github.ref}}-
ubuntu-16.04-all-ccache-refs/heads/main-
- id: install_deps
run: |
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt update
sudo apt install -y ccache openjdk-8-jdk maven
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- id: build
run: sudo mount tmpfs -t tmpfs /tmp && ./bootstrap.sh -e -t && cd build && cmake -DUSE_SHARED_LIBS= -DENABLE_LIBRDKAFKA=ON -DENABLE_OPC=ON -DENABLE_SFTP=ON -DENABLE_MQTT=ON -DENABLE_COAP=ON -DENABLE_PYTHON=ON -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . --parallel 4 && make test ARGS="--timeout 300 -j8 --output-on-failure"
debian:
name: "debian"
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: debian-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
debian-ccache-${{github.ref}}-
debian-ccache-refs/heads/main-
- id: install_deps
run: |
sudo apt install -y ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- id: build
run: mkdir -p build && cd build && cmake -DSTRICT_GSL_CHECKS=AUDIT .. && make debian
centos:
name: "centos"
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: centos-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
centos-ccache-${{github.ref}}-
centos-ccache-refs/heads/main-
- id: install_deps
run: |
sudo apt install -y ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- id: build
run: mkdir -p build && cd build && cmake -DSTRICT_GSL_CHECKS=AUDIT .. && make centos
fedora:
name: "fedora"
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: fedora-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
fedora-ccache-${{github.ref}}-
fedora-ccache-refs/heads/main-
- id: install_deps
run: |
sudo apt install -y ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- id: build
run: mkdir -p build && cd build && cmake -DSTRICT_GSL_CHECKS=AUDIT .. && make fedora
ubuntu_18_04:
name: "ubuntu-18.04"
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ubuntu-18.04-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
ubuntu-18.04-ccache-${{github.ref}}-
ubuntu-18.04-ccache-refs/heads/main
- id: install_deps
run: |
sudo apt install -y ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- id: build
run: mkdir -p build && cd build && cmake -DSTRICT_GSL_CHECKS=AUDIT .. && make u18
ubuntu_16_04_shared:
name: "ubuntu-16.04-shared"
runs-on: ubuntu-16.04
timeout-minutes: 60
steps:
- id: checkout
uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ubuntu-16.04-shared-ccache-${{github.ref}}-${{github.sha}}
restore-keys: |
ubuntu-16.04-shared-ccache-${{github.ref}}-
ubuntu-16.04-shared-ccache-refs/heads/main-
- id: install_deps
run: |
sudo apt install -y ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- id: build
run: ./bootstrap.sh -e -t && cd build && cmake -DUSE_SHARED_LIBS=ON -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . --parallel 4 && make test ARGS="--timeout 300 -j4 --output-on-failure"
docker_integration_tests:
name: "Docker integration tests"
runs-on: ubuntu-20.04
timeout-minutes: 90
steps:
- id: checkout
uses: actions/checkout@v2
- id: build
run: ./bootstrap.sh -e -t && cd build && cmake -DUSE_SHARED_LIBS= -DSTRICT_GSL_CHECKS=AUDIT .. && make docker-minimal
- id: install_deps
run: sudo apt install -y python3-virtualenv
- id: test
run: cd build && make docker-verify