-
Notifications
You must be signed in to change notification settings - Fork 2
Merge develop into main for release 1.0.1 #8
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
29db390
Fix compile warnings
dariopellegrino00 7af2c7b
Update README
dariopellegrino00 07a4c3c
Merge pull request #5 from dariopellegrino00/warning-fix
dariopellegrino00 aaa21a4
Add first ci with some static analysis tools
dariopellegrino00 5d3fa25
Fix build and static checks
dariopellegrino00 f489ad6
Update README
dariopellegrino00 614959f
Update README.md
dariopellegrino00 8a1f38d
Update .github/workflows/checks.yml
dariopellegrino00 df6fe91
Add clang-tidy critic warning as errors
dariopellegrino00 8005d73
Update .github/workflows/checks.yml
dariopellegrino00 0a9e493
Update .github/workflows/checks.yml
dariopellegrino00 711146b
Merge pull request #6 from dariopellegrino00/ci-implementation
dariopellegrino00 f89cc23
Fix work not a git safe directory
dariopellegrino00 8b93611
Fix and Refactor CI code and build checks (#7)
dariopellegrino00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,75 @@ | ||
| name: Build & Static Checks | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop ] | ||
| pull_request: | ||
| branches: [ main, develop ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| analyze: | ||
| runs-on: ubuntu-22.04 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: 'recursive' | ||
|
|
||
| - name: Set up Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Build SDK image (cached) | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| file: Dockerfile.ci | ||
| tags: freeswitch-sdk:ci | ||
| load: true | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
|
|
||
| - name: Run analysis inside container | ||
| uses: addnab/docker-run-action@v3 | ||
| with: | ||
| image: freeswitch-sdk:ci | ||
| options: -v ${{ github.workspace }}:/work | ||
| run: | | ||
| set -eux | ||
| cd /work | ||
| git config --global --add safe.directory /work | ||
| cmake -S . -B build \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
| -DCMAKE_C_COMPILER=clang \ | ||
| -DCMAKE_CXX_COMPILER=clang++ \ | ||
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
|
|
||
| scan-build --status-bugs cmake --build build -j"$(nproc)" | ||
|
|
||
| FILES="$(git ls-files '*.c' '*.cc' '*.cpp' '*.cxx' | grep -v '^buffer/' | grep -v '^libs/')" | ||
| if [ -n "$FILES" ]; then | ||
| clang-tidy -p build $FILES \ | ||
| --warnings-as-errors='clang-analyzer-*,bugprone-*,performance-*' | ||
| else | ||
| echo "No source files found for clang-tidy analysis." | ||
| fi | ||
|
|
||
|
|
||
| cppcheck --enable=warning,performance,portability --std=c++17 --force \ | ||
| --project=build/compile_commands.json \ | ||
| --suppress=missingIncludeSystem \ | ||
| -i build -i buffer -i libs 2> cppcheck-warn.log | ||
|
|
||
| cppcheck --enable=style --std=c++17 --force \ | ||
| --project=build/compile_commands.json \ | ||
| --suppress=missingIncludeSystem \ | ||
| -i build -i buffer -i libs 2> cppcheck-style.log || true | ||
|
|
||
| if [ -s cppcheck-style.log ]; then | ||
| echo "Style issues found by cppcheck:" | ||
| cat cppcheck-style.log | ||
| else | ||
| echo "No style issues found by cppcheck." | ||
| fi |
This file contains hidden or 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,81 @@ | ||
| # syntax=docker/dockerfile:1.7 | ||
|
|
||
| ############################ | ||
| # Stage 1: Build dependencies + FreeSWITCH | ||
| ############################ | ||
| FROM debian:12 AS builder | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| ca-certificates git curl wget \ | ||
| build-essential cmake automake autoconf libtool libtool-bin libltdl-dev pkg-config \ | ||
| libssl-dev zlib1g-dev libdb-dev unixodbc-dev libncurses5-dev libexpat1-dev \ | ||
| libgdbm-dev bison erlang-dev libtpl-dev libtiff5-dev uuid-dev \ | ||
| libpcre3-dev libpcre2-dev libedit-dev libsqlite3-dev libcurl4-openssl-dev nasm \ | ||
| libogg-dev libspeex-dev libspeexdsp-dev libldns-dev python3-dev \ | ||
| libavformat-dev libswscale-dev libswresample-dev \ | ||
| liblua5.2-dev libopus-dev libpq-dev \ | ||
| libsndfile1-dev libflac-dev libvorbis-dev \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
|
|
||
| WORKDIR /src | ||
|
|
||
| RUN git clone https://github.com/signalwire/libks && \ | ||
| git clone https://github.com/freeswitch/sofia-sip && \ | ||
| git clone https://github.com/freeswitch/spandsp && \ | ||
| git clone https://github.com/signalwire/signalwire-c && \ | ||
| git clone https://github.com/signalwire/freeswitch | ||
|
|
||
| # libks | ||
| WORKDIR /src/libks | ||
| RUN cmake . -DCMAKE_INSTALL_PREFIX=/usr -DWITH_LIBBACKTRACE=1 && \ | ||
| make -j"$(nproc)" && make install | ||
|
|
||
| # sofia-sip | ||
| WORKDIR /src/sofia-sip | ||
| RUN ./bootstrap.sh && \ | ||
| ./configure --with-pic --with-glib=no --without-doxygen --disable-stun --prefix=/usr && \ | ||
| make -j"$(nproc)" && make install | ||
|
|
||
| # spandsp | ||
| WORKDIR /src/spandsp | ||
| RUN ./bootstrap.sh && \ | ||
| ./configure --with-pic --prefix=/usr && \ | ||
| make -j"$(nproc)" && make install | ||
|
|
||
| # signalwire-c | ||
| WORKDIR /src/signalwire-c | ||
| RUN PKG_CONFIG_PATH=/usr/lib/pkgconfig cmake . -DCMAKE_INSTALL_PREFIX=/usr && \ | ||
| make -j"$(nproc)" && make install | ||
|
|
||
| # FreeSWITCH SDK | ||
| WORKDIR /src/freeswitch | ||
| RUN ./bootstrap.sh -j && \ | ||
| ./configure --prefix=/usr && \ | ||
| make -j"$(nproc)" && make install | ||
|
|
||
| ############################ | ||
| # Stage 2: Slim SDK image (no FreeSWITCH runtime) | ||
| ############################ | ||
| FROM debian:12 | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| clang clang-tidy clang-tools \ | ||
| cppcheck cmake pkg-config ccache \ | ||
| libssl-dev zlib1g-dev \ | ||
| libspeexdsp-dev libspandsp-dev \ | ||
| git curl wget \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Copy only SDK bits | ||
| COPY --from=builder /usr/include/freeswitch/ /usr/include/freeswitch/ | ||
| COPY --from=builder /usr/lib/pkgconfig/freeswitch.pc /usr/lib/pkgconfig/ | ||
| COPY --from=builder /usr/lib/libfreeswitch.so* /usr/lib/ | ||
|
|
||
| WORKDIR /work |
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.