-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from jgaa/staging
Fixing compiler warnings and static code analyzer warnings, macos and github actions
- Loading branch information
Showing
41 changed files
with
886 additions
and
756 deletions.
There are no files selected for viewing
This file contains 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,107 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 1 * *' # This line schedules the workflow to run at 00:00 on the first day of every month | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
compiler: gcc | ||
- os: ubuntu-latest | ||
compiler: clang | ||
- os: windows-latest | ||
compiler: msvc | ||
- os: macos-latest | ||
compiler: | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/vcpkg | ||
~/vcpkg_installed | ||
${{ env.HOME }}/.cache/vcpkg/archives | ||
${{ env.XDG_CACHE_HOME }}/vcpkg/archives | ||
${{ env.LOCALAPPDATA }}\vcpkg\archives | ||
${{ env.APPDATA }}\vcpkg\archives | ||
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.BUILD_TYPE }}- | ||
- name: Setup Cpp | ||
uses: aminya/setup-cpp@v1 | ||
with: | ||
compiler: ${{ matrix.compiler }} | ||
vcvarsall: ${{ contains(matrix.os, 'windows') }} | ||
cmake: true | ||
ninja: true | ||
vcpkg: true | ||
cppcheck: false | ||
|
||
- name: Install compiler for Macos | ||
if: startsWith(matrix.os, 'macos') | ||
run: | | ||
brew install llvm | ||
- name: Prepare the PATH | ||
run: | | ||
if [[ "${{ runner.os }}" == "Windows" ]]; then | ||
echo "$env:USERPROFILE\vcpkg" >> $GITHUB_PATH | ||
echo "$env:USERPROFILE\ninja" >> $GITHUB_PATH | ||
else | ||
echo "$HOME/vcpkg" >> $GITHUB_PATH | ||
echo "$HOME/ninja" >> $GITHUB_PATH | ||
fi | ||
- name: Install dependencies | ||
run: | | ||
cp -v ci/vcpkg/vcpkg.json . | ||
vcpkg install | ||
- name: Build project | ||
run: | | ||
pushd ~ | ||
if [ -d build ]; then | ||
echo "Build dir exists" | ||
ls -la build | ||
else | ||
mkdir -v build | ||
fi | ||
cd build | ||
pwd | ||
set -x | ||
cmake -DVCPKG_INSTALLED_DIR=~/vcpkg_installed -DVCPKG_VERBOSE=ON -DRESTC_CPP_THREADED_CTX=ON -DCMAKE_BUILD_TYPE=Release -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake ${GITHUB_WORKSPACE} | ||
cmake --build . | ||
popd | ||
continue-on-error: true | ||
|
||
- name: Dump diagnostics | ||
if: failure() | ||
run: | | ||
cd ~/build | ||
echo "---------------------------------" | ||
cat build.ninja | ||
echo "---------------------------------" | ||
- name: Run Unit Tests | ||
run: | | ||
pushd ~/build | ||
ctest -R UNITTESTS . -C Release | ||
popd |
This file contains 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 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 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 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,22 @@ | ||
{ | ||
"name": "restc-cpp", | ||
"license": "MIT", | ||
"dependencies": [ | ||
"boost-scope-exit", | ||
"boost-system", | ||
"boost-context", | ||
"boost-coroutine", | ||
"boost-filesystem", | ||
"boost-asio", | ||
"boost-chrono", | ||
"boost-date-time", | ||
"boost-log", | ||
"boost-uuid", | ||
"boost-program-options", | ||
"boost-functional", | ||
"zlib", | ||
"openssl", | ||
"gtest", | ||
"rapidjson" | ||
] | ||
} |
This file contains 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 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.