Skip to content

Commit 8d22fa1

Browse files
committedJul 17, 2023
linux first step - make tests run
1 parent 6daabe1 commit 8d22fa1

9 files changed

+79
-16
lines changed
 

‎.github/workflows/build.yml

+30-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ env:
44
VERSION: 3.3.1
55
BUILD_TYPE: Release
66
ARCH: x64
7-
VCPKG_DEFAULT_VCPKG_TRIPLET: x64-windows-static
8-
VCPKG_TRIPLET: x64-windows-static
97
VCPKG_CONFIG: Release
108

119
on: [push, workflow_dispatch]
1210

1311
jobs:
14-
build:
12+
build-win:
1513
runs-on: windows-latest
16-
name: 'build'
14+
name: 'Windows Build'
15+
env:
16+
VCPKG_DEFAULT_VCPKG_TRIPLET: x64-windows-static
17+
VCPKG_TRIPLET: x64-windows-static
1718

1819
steps:
1920

@@ -75,5 +76,30 @@ jobs:
7576
name: bin
7677
path: atf/*
7778

79+
build-linux:
80+
runs-on: ubuntu-latest
81+
name: 'Linux Build'
82+
env:
83+
VCPKG_DEFAULT_VCPKG_TRIPLET: x64-linux
84+
VCPKG_TRIPLET: x64-linux
7885

86+
steps:
87+
88+
- uses: actions/checkout@v3
89+
with:
90+
submodules: true
91+
92+
- uses: friendlyanon/setup-vcpkg@v1
93+
# seems like the absense of commit hash expects vcpkg submodule, i don't want that
94+
with:
95+
committish: 5269f4f4f6b3970ad21f6956f6bb2322c024910c
96+
# set to false to clear any cache in case of build errors
97+
cache: false
7998

99+
- name: ⚙️ configure
100+
run: >
101+
cmake -B build -S .
102+
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
103+
-D "CMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake"
104+
-D "VCPKG_TARGET_TRIPLET=${{ env.VCPKG_TRIPLET }}"
105+
working-directory: .

‎CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.20)
1+
cmake_minimum_required (VERSION 3.19)
22
set(CMAKE_CXX_STANDARD 20)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
44

@@ -16,6 +16,8 @@ add_compile_definitions(UNICODE) # required for WIN32 API to use correct version
1616
# see https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
1717
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
1818

19-
add_subdirectory(grey)
20-
add_subdirectory(bt)
19+
if(WIN32)
20+
add_subdirectory(grey)
21+
add_subdirectory(bt)
22+
endif()
2123
add_subdirectory(test)

‎CMakePresets.json

+25
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,31 @@
4141
"cacheVariables": {
4242
"CMAKE_BUILD_TYPE": "Release"
4343
}
44+
},
45+
{
46+
"name": "linux-debug",
47+
"displayName": "Linux Debug",
48+
"generator": "Ninja",
49+
"binaryDir": "${sourceDir}/out/build/${presetName}",
50+
"installDir": "${sourceDir}/out/install/${presetName}",
51+
"cacheVariables": {
52+
"CMAKE_BUILD_TYPE": "Debug",
53+
"CMAKE_TOOLCHAIN_FILE": {
54+
"value": "$env{HOME}/vcpkg/scripts/buildsystems/vcpkg.cmake",
55+
"type": "FILEPATH"
56+
}
57+
58+
},
59+
"condition": {
60+
"type": "equals",
61+
"lhs": "${hostSystemName}",
62+
"rhs": "Linux"
63+
},
64+
"vendor": {
65+
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
66+
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
67+
}
68+
}
4469
}
4570
]
4671
}

‎bt/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.20)
1+
cmake_minimum_required (VERSION 3.19)
22
set(CMAKE_CXX_STANDARD 20)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
44

‎bt/app/match_rule.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ namespace bt {
2626
priority = str::to_int(v);
2727
} else if(k == "mode") {
2828
if(v == "app") app_mode = true;
29-
} else if(k == "firefox_container") {
30-
firefox_container = v;
3129
} else if(k == "type") {
3230
if(v == "regex") is_regex = true;
3331
}
@@ -74,10 +72,6 @@ namespace bt {
7472
parts.push_back("type:regex");
7573
}
7674

77-
if(!firefox_container.empty()) {
78-
parts.push_back(fmt::format("firefox_container:{}", firefox_container));
79-
}
80-
8175
parts.push_back(s);
8276

8377
return str::join(parts.begin(), parts.end(), "|");

‎bt/app/match_rule.h

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ namespace bt {
2020
int priority{0};
2121
bool is_regex{false};
2222
bool app_mode{false};
23-
std::string firefox_container;
2423

2524
bool operator==(const match_rule& other) const;
2625

‎docs/release-notes.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.x
2+
3+
4+
15
## 3.3.1
26

37
- Rule hits can can be optionally recorded to a CSV file (off by default). To enable, check `Settings`->`Log Rule Hits to File`. This creates `hit_log.csv` which you can open from the `File` menu. Feature is useful for recording your activity for further analysis to exporting to some analytical engine.

‎test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.20)
1+
cmake_minimum_required (VERSION 3.19)
22
set(CMAKE_CXX_STANDARD 20)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
44

‎vcpkg.json

+13
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@
1111
],
1212
"platform": "windows"
1313
},
14+
{
15+
"name": "imgui",
16+
"features": [
17+
"opengl3-binding",
18+
"sdl2-binding",
19+
"docking-experimental"
20+
],
21+
"platform": "linux"
22+
},
23+
{
24+
"name": "opengl",
25+
"platform": "linux"
26+
},
1427
"implot",
1528
"fmt",
1629
"nlohmann-json",

0 commit comments

Comments
 (0)
Please sign in to comment.