-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: Add PR check for CentOS 7 compilation (#4381)
* workflows provide in-repo centos 7 compile checks for PR Signed-off-by: Patrick Stephens <[email protected]>
- Loading branch information
1 parent
8c49120
commit 9ccc6f8
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'Pull requests compile checks' | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# Sanity check for compilation using older compiler on CentOS 7 | ||
pr-compile-centos-7: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout Fluent Bit code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Attempt to build current source for CentOS 7 | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./dockerfiles/Dockerfile.centos7 | ||
# No need to use after this so discard completely | ||
push: false | ||
load: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This container image is primarily used to test compilation works for CentOS 7, it is | ||
# not intended for production usage. | ||
# Based on https://github.com/fluent/fluent-bit-packaging/tree/master/distros/centos/7 | ||
FROM centos:7 | ||
|
||
RUN yum -y update && \ | ||
yum install -y rpm-build curl ca-certificates gcc gcc-c++ cmake make bash \ | ||
wget unzip systemd-devel wget flex bison \ | ||
cyrus-sasl-lib cyrus-sasl-devel openssl openss-libs openssl-devel \ | ||
postgresql-libs postgresql-devel postgresql-server postgresql && \ | ||
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \ | ||
rpm -ivh epel-release-latest-7.noarch.rpm && \ | ||
yum install -y cmake3 | ||
|
||
COPY . /src/ | ||
WORKDIR /src/build | ||
|
||
RUN cmake3 -DCMAKE_INSTALL_PREFIX=/opt/td-agent-bit/ -DCMAKE_INSTALL_SYSCONFDIR=/etc/ \ | ||
-DFLB_RELEASE=On -DFLB_TRACE=On -DFLB_TD=On \ | ||
-DFLB_SQLDB=On -DFLB_HTTP_SERVER=On \ | ||
-DFLB_OUT_KAFKA=On \ | ||
-DFLB_OUT_PGSQL=On ../ | ||
|
||
RUN make -j $(getconf _NPROCESSORS_ONLN) |