Skip to content

Commit 9741c3b

Browse files
Merge pull request #1 from suikan4github/develop
Merge Develop as v0.9.0
2 parents 2cbf344 + 7fd4fab commit 9741c3b

63 files changed

Lines changed: 11039 additions & 9723 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ctest.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CTest_on_push_and_pull_request
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
workflow_call:
9+
push:
10+
branches: [ develop ]
11+
pull_request:
12+
branches: [ develop ]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
18+
jobs:
19+
# This workflow contains build matrix
20+
CTest:
21+
strategy:
22+
matrix:
23+
os: [ubuntu-latest, windows-latest]
24+
build: [Release, Debug]
25+
compiler: [gcc, clang, msvc]
26+
exclude:
27+
- {os: ubuntu-latest, compiler: msvc}
28+
- {os: windows-latest, compiler: gcc}
29+
- {os: windows-latest, compiler: clang}
30+
31+
# Test on specified OS
32+
runs-on: ${{ matrix.os }}
33+
34+
# Configure - Build - Test
35+
steps:
36+
# Checks-out repository under $GITHUB_WORKSPACE, so your job can access it
37+
- uses: actions/checkout@v4.1.7
38+
with:
39+
submodules: true
40+
41+
# Configuration for GCC
42+
- name: Configuration for gcc
43+
if: matrix.compiler == 'gcc'
44+
run: |
45+
echo Runs-on ${{matrix.os}}, Build with ${{matrix.compiler}}
46+
mkdir build
47+
cd build
48+
cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
49+
50+
# Configuration for Clang
51+
- name: Configuration for clang
52+
if: matrix.compiler == 'clang'
53+
run: |
54+
echo Runs-on ${{matrix.os}}, Build with ${{matrix.compiler}}
55+
mkdir build
56+
cd build
57+
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
58+
59+
# Configuration for MSVC
60+
- name: Configuration for msvc
61+
if: matrix.compiler == 'msvc'
62+
run: |
63+
echo "Runs-on ${{matrix.os}}, Build with ${{matrix.compiler}}"
64+
mkdir build
65+
cd build
66+
cmake .. -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl
67+
68+
# Build for Linux
69+
- name: Build for Linux
70+
if: matrix.os == 'ubuntu-latest'
71+
run: |
72+
echo Runs-on ${{matrix.os}}, ${{matrix.build}} build
73+
cd build
74+
cmake --build . --target all --config ${{ matrix.build }} --clean-first -j4
75+
76+
# Build for Windows
77+
- name: Build for Windows
78+
if: matrix.os == 'windows-latest'
79+
run: |
80+
echo "Runs-on ${{matrix.os}}, ${{matrix.build}} build"
81+
cd build
82+
cmake --build . --target all_build --config ${{ matrix.build }} --clean-first -j4
83+
84+
- name: Test
85+
run: |
86+
cd build
87+
ctest --rerun-failed --output-on-failure -j 4
88+
89+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Generate doxygen file into docs/html directory.
2+
# Then, push it to the gh-pages contents.
3+
# The project needs to configure to upload the gh-pages branch.
4+
# Refer https://github.com/DenverCoder1/doxygen-github-pages-action
5+
6+
# PAT is allowed only to the "Contents"
7+
name: Doxygen GitHub Pages Deploy Action
8+
9+
on:
10+
push:
11+
branches: [main]
12+
pull_request:
13+
branches: [main]
14+
workflow_dispatch:
15+
16+
jobs:
17+
CTest:
18+
uses: ./.github/workflows/ctest.yaml
19+
Deploy-Pages:
20+
needs: CTest
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: DenverCoder1/doxygen-github-pages-action@v2.0.0
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
branch: gh-pages
29+
folder: docs/html
30+
config_file: Doxyfile

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@
3131
*.out
3232
*.app
3333

34-
build/
34+
# Local files
35+
build/
36+
.vscode/
37+
html/
38+
*.bak

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "test/fff"]
2+
path = test/fff
3+
url = https://github.com/meekrosoft/fff.git

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Change log
2+
History of the project development
3+
4+
## [Unreleased] yyyy-mm-zz
5+
### Added
6+
### Changed
7+
### Deprecated
8+
### Removed
9+
### Fixed
10+
### Security
11+
### Known Issue
12+
13+
## [v1.0.0] 2024-09-28
14+
First release.
15+
16+
[Unreleased]: https://github.com/suikan4github/rpp_driver/compare/v1.0.0...develop
17+
[v1.0.0]: https://github.com/suikan4github/rpp_driver/compare/v0.0.0...v1.0.0

CMakeLists.txt

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
# To use FetchContent, we need CMake 3.14 or newer.
22
cmake_minimum_required(VERSION 3.14)
33

4-
# Redefine project for testing.
5-
project(test_i2s)
4+
# GoogleTest requires at least C++14
5+
# To use std::size() and __has_include, we need c++17
6+
set(CMAKE_CXX_STANDARD 17)
7+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
8+
set(CMAKE_CXX_EXTENSIONS OFF)
69

7-
# Enable test to let the VS code find the test.
8-
include(CTest)
9-
enable_testing()
1010

11+
# If the configuratopm target is Windows or Unix, this project
12+
# will be build as a test program of the rpp_driver.
1113

12-
# GoogleTest requires at least C++14
13-
# To use std::size(), we need c++17
14-
set(CMAKE_CXX_STANDARD 17)
15-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
14+
# If the configuration target is not above, this porject
15+
# will be build as a rpp_driver library.
1616

17-
include(FetchContent)
18-
FetchContent_Declare(
19-
googletest
20-
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip)
21-
# For Windows: Prevent overriding the parent project's compiler/linker settings
22-
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
23-
FetchContent_MakeAvailable(googletest)
17+
if((${WIN32}) OR (${UNIX})) # Is Target Windows or Unix?
2418

25-
add_subdirectory(test)
19+
# Redefine project for testing.
20+
project(test_rpp_driver)
2621

22+
# Enable test to let the VS code find the test.
23+
include(CTest)
24+
enable_testing()
25+
26+
include(FetchContent)
27+
FetchContent_Declare(
28+
googletest
29+
GIT_REPOSITORY "https://github.com/google/googletest.git"
30+
GIT_TAG "v1.15.2"
31+
)
32+
# For Windows: Prevent overriding the parent project's compiler/linker settings
33+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
34+
FetchContent_MakeAvailable(googletest)
35+
36+
add_subdirectory(src)
37+
add_subdirectory(test)
38+
39+
else() # Is target RasPi Pico?
40+
add_subdirectory(src)
41+
42+
endif()

0 commit comments

Comments
 (0)