Skip to content

Commit

Permalink
Merge pull request #432 from ckormanyos/update_docs_and_ci
Browse files Browse the repository at this point in the history
Update docs and ci
  • Loading branch information
ckormanyos authored Aug 4, 2023
2 parents 06906cc + a4d2f03 commit 40bbf88
Show file tree
Hide file tree
Showing 33 changed files with 304 additions and 274 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/real-time-cpp-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ jobs:
fail-fast: false
matrix:
chapter: [ appendix0a, chapter01, chapter03, chapter04, chapter05, chapter07, chapter08, chapter09, chapter12, chapter16, chapter17 ]
compiler: [ g++, clang++ ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: host-snippets-all
run: |
cd ${{ matrix.chapter }}
./${{ matrix.chapter }}.sh g++ c++20
./${{ matrix.chapter }}.sh ${{ matrix.compiler }} c++20
working-directory: ./code_snippets
host-snippets-chapter06:
runs-on: ubuntu-latest
Expand All @@ -40,6 +41,7 @@ jobs:
fail-fast: false
matrix:
chapter: [ chapter06 ]
compiler: [ g++, clang++ ]
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -62,7 +64,7 @@ jobs:
- name: host-snippets-chapter06
run: |
cd ${{ matrix.chapter }}
./${{ matrix.chapter }}.sh g++ c++20
./${{ matrix.chapter }}.sh ${{ matrix.compiler }} c++20
working-directory: ./code_snippets
host-snippets-chapter10:
runs-on: ubuntu-latest
Expand All @@ -73,6 +75,7 @@ jobs:
fail-fast: false
matrix:
chapter: [ chapter10 ]
compiler: [ g++, clang++ ]
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -91,5 +94,5 @@ jobs:
- name: host-snippets-chapter10
run: |
cd ${{ matrix.chapter }}
./${{ matrix.chapter }}.sh g++ c++20
./${{ matrix.chapter }}.sh ${{ matrix.compiler }} c++20
working-directory: ./code_snippets
6 changes: 3 additions & 3 deletions .github/workflows/real-time-cpp-sonar.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ------------------------------------------------------------------------------
# Copyright Christopher Kormanyos 2022.
# Copyright Christopher Kormanyos 2022 - 2023.
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -24,10 +24,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'
- name: Download and set up sonar-scanner
env:
Expand Down
84 changes: 42 additions & 42 deletions code_snippets/appendix0a/appendix0a.sh

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions code_snippets/appendix0a/appendix0a_14-001_regex_basics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#if defined(__GNUC__)
#if (defined(__GNUC__) && !defined(__clang__))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
Expand All @@ -18,7 +18,9 @@
#include <regex>
#include <string>

int main()
auto main() -> int;

auto main() -> int
{
const auto rx =
std::regex
Expand All @@ -43,6 +45,6 @@ int main()
}
}

#if defined(__GNUC__)
#if (defined(__GNUC__) && !defined(__clang__))
#pragma GCC diagnostic pop
#endif
6 changes: 3 additions & 3 deletions code_snippets/chapter01/chapter01.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ rm -f ./bin/*.*

echo build snippets with GCC=$GCC STD=$STD

$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -O3 -march=native -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter01_01-001_led_program.cpp -o ./bin/chapter01_01-001_led_program.exe
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -O3 -march=native -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter01_07-001_namespace.cpp -o ./bin/chapter01_07-001_namespace.exe
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -O3 -march=native -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter01_07-002_namespace.cpp -o ./bin/chapter01_07-002_namespace.exe
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter01_01-001_led_program.cpp -o ./bin/chapter01_01-001_led_program.exe
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter01_07-001_namespace.cpp -o ./bin/chapter01_07-001_namespace.exe
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter01_07-002_namespace.cpp -o ./bin/chapter01_07-002_namespace.exe

ls -la \
./bin/chapter01_01-001_led_program.exe \
Expand Down
Loading

0 comments on commit 40bbf88

Please sign in to comment.