Skip to content

Commit

Permalink
ci: workflows , added unit testing workflow. Remove travis (fluent#3199)
Browse files Browse the repository at this point in the history
* Added a new unit-tests.yaml workflow
    * Updated workflow documentation
    * Removed travis-ci from the repository
    * Removed the ci/* directory and moved into fluent-bit-ci

Signed-off-by: Jorge Niedbalski <j@calyptia.com>
  • Loading branch information
niedbalski committed Mar 10, 2021
1 parent f5166af commit 86f215a
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 430 deletions.
1 change: 1 addition & 0 deletions .github/workflows/README.workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
| [integration-build-pr](./integration-build-pr.yaml) | Builds a docker image to be used in integration testing (pr branch) | on new commit/push on PR(s) |
| [integration-run-master](./integration-run-master.yaml) | Runs the integration testing suite on master | on new image built|
| [integration-run-pr](./integration-run-pr.yaml) | Runs the integration testing suite on a PR branch | pr opened / label created 'ok-to-test' |
| [unit-tests](./unit-tests.yaml) | Runs the unit tests suite on master push or new PR | PR opened, merge in master branch |

2 changes: 1 addition & 1 deletion .github/workflows/pr-closed-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: addnab/docker-run-action@v2
with:
image: lumir/remove-dockerhub-tag
run: python3 remove-dockerhub-tag.py --user ${{ env.dockerhub_username }} --password ${{ env.dockerhub_password }} ${{ env.dockerhub_organization }}/fluent-bit:${{ env.arch }}-master-pr-${{ env.pr }}
run: python3 remove-dockerhub-tag.py --user ${{ env.dockerhub_username }} --password ${{ env.dockerhub_password }} ${{ env.dockerhub_organization }}/fluent-bit:${{ env.arch }}-master-pr-${{ env.pr }} || exit 0
env:
pr: ${{ github.event.number }}
arch: x86_64
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Run unit tests
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, edited, synchronize]
jobs:
run-unit-tests-amd64:
name: Run unit tests on amd64 for ${{ matrix.os }} - ${{ matrix.compiler }} - ${{ matrix.flb_option }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 48
fail-fast: false
matrix:
flb_option: [ "-DFLB_JEMALLOC=On", "-DFLB_JEMALLOC=Off", "-DFLB_SMALL=On", "-DSANITIZE_ADDRESS=On", "-DSANITIZE_UNDEFINED=On", "-DFLB_COVERAGE=On"]
os: [ubuntu-18.04, macos-latest]
compiler: [ gcc, clang ]
exclude:
- os: macos-latest
flb_option: "-DFLB_JEMALLOC=On"
- os: macos-latest
flb_option: "-DFLB_SMALL=On"
- os: macos-latest
flb_option: "-DSANITIZE_ADDRESS=On"
- os: macos-latest
flb_option: "-DSANITIZE_UNDEFINED=On"
- os: macos-latest
flb_option: "-DFLB_COVERAGE=On"
- os: macos-latest
flb_option: "-DFLB_JEMALLOC=Off"
compiler: clang
- os: ubuntu-18.04
flb_option: "-DFLB_COVERAGE=On"
compiler: clang
steps:
- name: Setup environment ubuntu-18.04
if: matrix.os == 'ubuntu-18.04'
run: |
sudo apt install -yyq gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr
sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: calyptia/fluent-bit-ci
path: ci

- name: Run ci/s/run-unit-tests.sh on ${{ matrix.os }} with ${{ matrix.compiler }} - ${{ matrix.flb_option }}
if: matrix.os == 'ubuntu-18.04'
run: |
echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 90
sudo usermod -a -G systemd-journal $(id -un)
sudo -E su -p $(id -un) -c "PATH=$PATH ci/scripts/run-unit-tests.sh"
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler }}
FLB_OPT: ${{ matrix.flb_option }}

- name: Run ci/s/run-unit-tests.sh on ${{ matrix.os }} with ${{ matrix.compiler }} - ${{ matrix.flb_option }}
if: matrix.os == 'macos-latest'
run: |
echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
brew update
brew install bison flex || true
ci/scripts/run-unit-tests.sh || true
env:
CC: gcc
CXX: g++
FLB_OPT: ${{ matrix.flb_option }}
92 changes: 0 additions & 92 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ install:
- ps: Copy-Item -Path /WinFlexBison/win_flex.exe /WinFlexBison/flex.exe

before_build:
- git clone --depth=1 https://github.com/calyptia/fluent-bit-ci.git ci
- ps: Copy-Item -Path .\ci\scripts\run-unit-tests.ps1 .\ci\do-ut.ps1
- if %PLATFORM%==Win32 call "%vspath%\VC\Auxiliary\Build\vcvars32.bat"
- if %PLATFORM%==x64 call "%vspatH%\VC\Auxiliary\Build\vcvars64.bat"

Expand Down
92 changes: 0 additions & 92 deletions ci/appveyor-download

This file was deleted.

Loading

0 comments on commit 86f215a

Please sign in to comment.