-
Notifications
You must be signed in to change notification settings - Fork 8
cmake: resolve build issues #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "problemMatcher": [ | ||
| { | ||
| "owner": "actionlint", | ||
| "pattern": [ | ||
| { | ||
| "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", | ||
| "file": 1, | ||
| "line": 2, | ||
| "column": 3, | ||
| "message": 4, | ||
| "code": 5 | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,14 +31,12 @@ jobs: | |
| steps: | ||
| - name: Set up base image dependencies | ||
| 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 -y update | ||
| yum install -y ca-certificates cmake gcc gcc-c++ make wget | ||
| 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 | ||
| shell: bash | ||
|
|
||
| - uses: actions/checkout@v3 | ||
|
|
||
|
|
@@ -47,6 +45,24 @@ jobs: | |
| cmake3 -DCFL_DEV=on . | ||
| make | ||
|
|
||
| build-debian: | ||
| name: Debian Buster build to confirm no issues once used downstream | ||
| runs-on: ubuntu-latest | ||
| container: debian:buster | ||
| steps: | ||
| - name: Set up base image dependencies | ||
| run: | | ||
| apt-get update | ||
| apt-get install -y build-essential cmake make | ||
| shell: bash | ||
|
|
||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Run compilation | ||
| run: | | ||
| cmake -DCFL_DEV=on . | ||
| make | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this run in
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah can do, I just left it as it was before in the other builds. |
||
|
|
||
| build-unix-arm64: | ||
| name: Build sources on arm64 for ${{ matrix.os }} - ${{ matrix.compiler }} | ||
| runs-on: ${{ matrix.os }} | ||
|
|
@@ -75,6 +91,7 @@ jobs: | |
| CTEST_OUTPUT_ON_FAILURE=1 make test | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't we use
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be fine, since
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But that doesn't work in windows right?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a Linux build |
||
| env: | ||
| CC: ${{ matrix.compiler }} | ||
|
|
||
| build-unix-amd64: | ||
| name: Build sources on amd64 for ${{ matrix.os }} - ${{ matrix.compiler }} | ||
| runs-on: ${{ matrix.os }} | ||
|
|
@@ -93,3 +110,30 @@ jobs: | |
| CTEST_OUTPUT_ON_FAILURE=1 make test | ||
| env: | ||
| CC: ${{ matrix.compiler }} | ||
|
|
||
| build-analysis-tests: | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Taken from cmetrics/ctraces |
||
| name: Build with various code analysis tools | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| preset: | ||
| - clang-sanitize-address | ||
| - clang-sanitize-memory | ||
| - clang-sanitize-undefined | ||
| - clang-sanitize-dataflow | ||
| - clang-sanitize-safe-stack | ||
| - valgrind | ||
| permissions: | ||
| contents: read | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - uses: docker://lpenz/ghaction-cmake:0.19 | ||
| with: | ||
| preset: ${{ matrix.preset }} | ||
| # dependencies_debian: '' | ||
| cmakeflags: '-DCFL_TESTS=On -DCFL_DEV=on .' | ||
| build_command: make all | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Lint PRs | ||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| shellcheck: | ||
| runs-on: ubuntu-latest | ||
| name: Shellcheck | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: ludeeus/action-shellcheck@master | ||
| with: | ||
| ignore_paths: lib | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The scripts in xxhash have a few "issues" so ignoring any dependencies here. |
||
|
|
||
| actionlint: | ||
| runs-on: ubuntu-latest | ||
| name: Actionlint | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - run: | | ||
| echo "::add-matcher::.github/actionlint-matcher.json" | ||
| bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
| ./actionlint -color -shellcheck= | ||
| shell: bash | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| cmake_minimum_required(VERSION 3.0) | ||
| cmake_minimum_required(VERSION 3.12) | ||
| project(cfl C) | ||
| set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
| set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
|
@@ -123,6 +123,16 @@ if(NOT TARGET xxhash) | |
| add_subdirectory(lib/xxhash/cmake_unofficial EXCLUDE_FROM_ALL) | ||
| endif() | ||
|
|
||
| # Installation Directories | ||
| # ======================== | ||
| if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
| set(CFL_INSTALL_BINDIR "bin") | ||
| set(CFL_INSTALL_LIBDIR "lib") | ||
| else() | ||
| set(CFL_INSTALL_BINDIR ${CMAKE_INSTALL_FULL_BINDIR}) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just followed what Fluent Bit did here but you may want another specific directory. |
||
| set(CFL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") | ||
| endif() | ||
|
|
||
| # CFL sources | ||
| add_subdirectory(src) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplified and reduced dependencies required to speed up builds