Skip to content

Commit

Permalink
chore(ci): various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EmixamPP committed Aug 4, 2024
1 parent 44d4edd commit 6cabed1
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 22 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
inputs:
buildtype:
type: string
default: minsize
default: release
workflow_call:
inputs:
buildtype:
type: string
default: minsize
default: release

jobs:
build:
Expand All @@ -30,7 +30,7 @@ jobs:
uses: actions/cache@v4
with:
path: .github/workflows/deps/install_dir
key: ${{ hashFiles('.github/deps/CMakeLists.txt') }}
key: ${{ hashFiles('.github/workflows/deps/CMakeLists.txt') }}

- name: Build lib dependencis
if: ${{ steps.deps-cache.outputs.cache-hit != 'true' }}
Expand All @@ -43,10 +43,8 @@ jobs:
run: |
meson setup build --libdir=lib --prefer-static --pkg-config-path=$(find .github -name "pkgconfig")
case "${{ inputs.buildtype }}" in
"minsize")
meson configure build --optimization=s
"release")
meson configure build --strip
meson configure build --optimization=s --strip
;;
"debug")
meson configure build --buildtype=debug
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
uses: actions/cache@v4
with:
path: .github/workflows/deps/install_dir
key: ${{ hashFiles('.github/deps/CMakeLists.txt') }}
fail-on-cache-miss: true
key: ${{ hashFiles('.github/workflows/deps/CMakeLists.txt') }}

- name: Setup
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
uses: actions/cache@v4
with:
path: .github/workflows/deps/install_dir
key: ${{ hashFiles('.github/deps/CMakeLists.txt') }}
fail-on-cache-miss: true
key: ${{ hashFiles('.github/workflows/deps/CMakeLists.txt') }}

- name: Setup
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/depend-argparse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Modify file if new version
run: |
sed -i 's/\(option(ARGPARSE_GIT_TAG "[^\"]*" "\)[^"]*"/\1'"${VERSION}"'"/' .github/workflows/deps/CMakeLists.txt
sed -i 's/\(set(ARGPARSE_GIT_TAG "\)[^"]*\(".*\)/\1${{ env.VERSION }}\2/' .github/workflows/deps/CMakeLists.txt
- name: Create PR if new version
uses: peter-evans/create-pull-request@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/depend-opencv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Modify file if new version
run: |
sed -i 's/\(option(OPENCV_GIT_TAG "[^\"]*" "\)[^"]*"/\1'"${VERSION}"'"/' .github/workflows/deps/CMakeLists.txt
sed -i 's/\(set(OPENCV_GIT_TAG "\)[^"]*\(".*\)/\1${{ env.VERSION }}\2/' .github/workflows/deps/CMakeLists.txt
- name: Create PR if new version
uses: peter-evans/create-pull-request@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/depend-spdlog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Modify file if new version
run: |
sed -i 's/\(option(SPDLOG_GIT_TAG "[^\"]*" "\)[^"]*"/\1'"${VERSION}"'"/' .github/workflows/deps/CMakeLists.txt
sed -i 's/\(set(SPDLOG_GIT_TAG "\)[^"]*\(".*\)/\1${{ env.VERSION }}\2/' .github/workflows/deps/CMakeLists.txt
- name: Create PR if new version
uses: peter-evans/create-pull-request@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/depend-yaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Modify file if new version
run: |
sed -i 's/\(option(YAML_GIT_TAG "[^\"]*" "\)[^"]*"/\1'"${VERSION}"'"/' .github/workflows/deps/CMakeLists.txt
sed -i 's/\(set(YAML_GIT_TAG "\)[^"]*\(".*\)/\1${{ env.VERSION }}\2/' .github/workflows/deps/CMakeLists.txt
- name: Create PR if new version
uses: peter-evans/create-pull-request@v6
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install_dir" CACHE PATH "Default install prefix" FORCE)
endif()

option(OPENCV_GIT_TAG "Tag or branch used to checkout when cloning opencv" "4.9.0")
option(YAML_GIT_TAG "Tag or branch used to checkout when cloning yaml-cpp" "0.8.0")
option(ARGPARSE_GIT_TAG "Tag or branch used to checkout when cloning argparse" "v3.0")
option(SPDLOG_GIT_TAG "Tag or branch used to checkout when cloning argparse" "v1.14.1")
set(OPENCV_GIT_TAG "4.9.0" CACHE STRING "Tag or branch used to checkout when cloning opencv")
set(YAML_GIT_TAG "0.8.0" CACHE STRING "Tag or branch used to checkout when cloning yaml-cpp")
set(ARGPARSE_GIT_TAG "v3.1" CACHE STRING "Tag or branch used to checkout when cloning argparse")
set(SPDLOG_GIT_TAG "v1.14.1" CACHE STRING "Tag or branch used to checkout when cloning argparse")

include(ExternalProject)

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
## :clipboard: [Logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
## :hammer_and_wrench: Building result: ${{ needs.build.result == 'success' && ':white_check_mark:' || ':x:' }}
## :mag: clang-tidy results: ${{ (needs.clang-tidy.result == 'success' && ':white_check_mark:') || (needs.clang-tidy.result == 'skipped' && ':no_entry_sign:') || ':x:' }}
## :writing_hand: clang-format results: ${{ (needs.clang-format.result == 'success' && ':white_check_mark:') || (needs.clang-format.result == 'skipped' && ':no_entry_sign:') || ':x:' }}
## :hammer_and_wrench: Building result: ${{ needs.build.result == 'success' && ':white_check_mark:' || ':x:' }}
## :package: Artifacts:
If the building step was successfull:
1. Download the tarball in the artifacts section [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ project(
license: 'MIT',
default_options: [
'cpp_std=c++17',
'buildtype=release',
'warning_level=everything',
'werror=true',
],
Expand Down
4 changes: 2 additions & 2 deletions src/linux-enable-ir-emitter.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static void check_root() noexcept
*/
static void setup_logger(bool verbose_console, bool enable_file)
{
auto console_sink = make_shared<spdlog::sinks::stdout_color_sink_mt>();
auto console_sink = make_shared<spdlog::sinks::stdout_color_sink_st>();
console_sink->set_level(verbose_console ? spdlog::level::debug : spdlog::level::info);
console_sink->set_pattern("%v");

Expand All @@ -46,7 +46,7 @@ static void setup_logger(bool verbose_console, bool enable_file)
{
try
{
auto file_sink = make_shared<spdlog::sinks::daily_file_format_sink_mt>(LOG_FILE, 0, 0);
auto file_sink = make_shared<spdlog::sinks::daily_file_format_sink_st>(LOG_FILE, 0, 0);
file_sink->set_level(spdlog::level::debug);
file_sink->set_pattern("[%H:%M:%S] [%l] %v");

Expand Down

0 comments on commit 6cabed1

Please sign in to comment.