-
Notifications
You must be signed in to change notification settings - Fork 178
Fix non-TLS builds and static analysis issues #620
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
Open
embhorn
wants to merge
4
commits into
wolfSSL:master
Choose a base branch
from
embhorn:gh619
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
Some comments aren't visible on the classic Files Changed page.
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,87 @@ | ||
| name: Feature Combination Build Check | ||
|
|
||
| # Compiles the library sources under feature-macro combinations that the | ||
| # autotools jobs never configure, so a header that only builds in the default | ||
| # combination fails here rather than in a user's port. | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ 'master', 'main', 'release/**' ] | ||
| pull_request: | ||
| branches: [ '*' ] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| compile: | ||
| name: ${{ matrix.name }} | ||
| runs-on: ubuntu-22.04 | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: baseline | ||
| defs: "" | ||
| - name: no-stdio | ||
| defs: "-DWOLFMQTT_NO_STDIO" | ||
| - name: no-stdio-v5-sn | ||
| defs: "-DWOLFMQTT_NO_STDIO -DWOLFMQTT_V5 -DWOLFMQTT_SN" | ||
| - name: no-stdio-broker | ||
| defs: "-DWOLFMQTT_NO_STDIO -DWOLFMQTT_BROKER" | ||
| - name: no-stdio-broker-v5-multithread | ||
| defs: "-DWOLFMQTT_NO_STDIO -DWOLFMQTT_BROKER -DWOLFMQTT_V5 -DWOLFMQTT_MULTITHREAD" | ||
| - name: custom-printf-broker | ||
| defs: "-DWOLFMQTT_NO_STDIO -DWOLFMQTT_BROKER -DWOLFMQTT_CUSTOM_PRINTF -DPRINTF(f,...)=user_printf(f,##__VA_ARGS__)" | ||
| - name: broker-no-log | ||
| defs: "-DWOLFMQTT_BROKER -DWOLFMQTT_BROKER_NO_LOG" | ||
| - name: no-error-strings | ||
| defs: "-DWOLFMQTT_NO_ERROR_STRINGS" | ||
| - name: custom-printf | ||
| defs: "-DWOLFMQTT_CUSTOM_PRINTF -DPRINTF(f,...)=user_printf(f,##__VA_ARGS__)" | ||
| - name: custom-malloc | ||
| defs: "-DWOLFMQTT_CUSTOM_MALLOC -DWOLFMQTT_MALLOC(s)=user_malloc(s) -DWOLFMQTT_FREE(p)=user_free(p)" | ||
| - name: session-id-track-forced | ||
| defs: "-DWOLFMQTT_SESSION_ID_TRACK" | ||
| - name: capped-qos-no-replay | ||
| defs: "-DWOLFMQTT_MAX_QOS=1 -DWOLFMQTT_NO_SESSION_REPLAY" | ||
| - name: capped-qos-no-replay-forced-track | ||
| defs: "-DWOLFMQTT_MAX_QOS=1 -DWOLFMQTT_NO_SESSION_REPLAY -DWOLFMQTT_SESSION_ID_TRACK" | ||
| - name: v5-sn-multithread-nonblock | ||
| defs: "-DWOLFMQTT_V5 -DWOLFMQTT_SN -DWOLFMQTT_MULTITHREAD -DWOLFMQTT_NONBLOCK" | ||
| - name: v5-static-memory | ||
| defs: "-DWOLFMQTT_V5 -DWOLFMQTT_STATIC_MEMORY" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| # WOLFMQTT_USER_SETTINGS keeps the generated wolfmqtt/options.h out of | ||
| # the build, so each combination is exactly the macros listed above. | ||
| # The declarations satisfy the custom-printf and custom-malloc ports. | ||
| - name: Write user_settings.h | ||
| run: | | ||
| cat > user_settings.h <<'EOF' | ||
| extern int user_printf(const char* fmt, ...); | ||
| extern void* user_malloc(unsigned long size); | ||
| extern void user_free(void* ptr); | ||
| EOF | ||
|
|
||
| # DEFS goes through the environment rather than being spliced into the | ||
| # command, so the parentheses in the function-like macros reach gcc | ||
| # instead of being parsed by the shell. | ||
| # | ||
| # Every job here is a non-TLS build because ENABLE_MQTT_TLS is simply | ||
| # not defined; there is no opt-out macro to pass. TLS combinations are | ||
| # covered by the autotools workflows. | ||
| - name: Compile sources | ||
| env: | ||
| DEFS: ${{ matrix.defs }} | ||
| run: | | ||
| for src in src/*.c; do | ||
| echo "=== ${{ matrix.name }}: $src" | ||
| gcc -c -Werror -Wall -Wextra -I. \ | ||
| -DWOLFMQTT_USER_SETTINGS $DEFS \ | ||
| "$src" -o /dev/null | ||
| done |
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
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
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
Oops, something went wrong.
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.