-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
260 additions
and
0 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,16 @@ | ||
# .clang-format | ||
BasedOnStyle: Google | ||
IndentWidth: 4 | ||
ColumnLimit: 140 | ||
UseTab: Never | ||
AllowShortIfStatementsOnASingleLine: false | ||
BreakBeforeBraces: Allman | ||
AlignConsecutiveAssignments: true | ||
AlignTrailingComments: true | ||
ReflowComments: true | ||
SortIncludes: true | ||
NamespaceIndentation: All # Options: None, Inner, All | ||
|
||
IndentPPDirectives: AfterHash | ||
AlignConsecutiveDeclarations: true | ||
AlignConsecutiveBitFields: true |
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,81 @@ | ||
--- | ||
# Note: Alas, `Checks` is a string, not an array. | ||
# Comments in the block string are not parsed and are passed in the value. | ||
# They must thus be delimited by ',' from either side - then they are | ||
# harmless. It's terrible, but it works. | ||
Checks: >- | ||
clang-diagnostic-*, | ||
clang-analyzer-*, | ||
-clang-analyzer-optin.core.EnumCastOutOfRange, | ||
bugprone-*, | ||
-bugprone-unchecked-optional-access, | ||
,# This is ridiculous, as it triggers on constants, | ||
-bugprone-implicit-widening-of-multiplication-result, | ||
-bugprone-easily-swappable-parameters, | ||
,# Is not really useful, has false positives, triggers for no-noexcept move constructors ..., | ||
-bugprone-exception-escape, | ||
-bugprone-narrowing-conversions, | ||
-bugprone-chained-comparison,# RIP decomposers, | ||
modernize-*, | ||
-modernize-avoid-c-arrays, | ||
-modernize-use-auto, | ||
-modernize-use-emplace, | ||
-modernize-use-nullptr,# it went crazy with three-way comparison operators, | ||
-modernize-use-trailing-return-type, | ||
-modernize-return-braced-init-list, | ||
-modernize-concat-nested-namespaces, | ||
-modernize-use-nodiscard, | ||
-modernize-use-default-member-init, | ||
-modernize-type-traits,# we need to support C++14, | ||
-modernize-deprecated-headers, | ||
,# There's a lot of these and most of them are probably not useful, | ||
-modernize-pass-by-value, | ||
performance-*, | ||
-performance-enum-size, | ||
portability-*, | ||
readability-*, | ||
-readability-braces-around-statements, | ||
-readability-container-size-empty, | ||
-readability-convert-member-functions-to-static, | ||
-readability-else-after-return, | ||
-readability-function-cognitive-complexity, | ||
-readability-function-size, | ||
-readability-identifier-length, | ||
-readability-implicit-bool-conversion, | ||
-readability-isolate-declaration, | ||
-readability-magic-numbers, | ||
-readability-named-parameter, | ||
-readability-qualified-auto, | ||
-readability-redundant-access-specifiers, | ||
-readability-simplify-boolean-expr, | ||
-readability-static-definition-in-anonymous-namespace, | ||
-readability-uppercase-literal-suffix, | ||
-readability-use-anyofallof, | ||
-readability-avoid-return-with-void-value, | ||
,# time hogs, | ||
-bugprone-throw-keyword-missing, | ||
-modernize-replace-auto-ptr, | ||
-readability-identifier-naming, | ||
,# We cannot use this until clang-tidy supports custom unique_ptr, | ||
-bugprone-use-after-move, | ||
,# Doesn't recognize unevaluated context in CATCH_MOVE and CATCH_FORWARD, | ||
-bugprone-macro-repeated-side-effects, | ||
WarningsAsErrors: >- | ||
clang-analyzer-core.*, | ||
clang-analyzer-cplusplus.*, | ||
clang-analyzer-security.*, | ||
clang-analyzer-unix.*, | ||
performance-move-const-arg, | ||
performance-unnecessary-value-param, | ||
readability-duplicate-include, | ||
HeaderFilterRegex: '.*\.(c|cxx|cpp)$' | ||
FormatStyle: none | ||
CheckOptions: {} | ||
... |
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,50 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wget apt-transport-https gnupg ninja-build g++ python3 libpq-dev | ||
- name: Verify CMake Version | ||
run: cmake --version | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=Release | ||
|
||
- name: Build | ||
run: cmake --build ${{ github.workspace }}/build | ||
|
||
- name: Get Commit Message | ||
id: get_commit_msg | ||
run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" >> $GITHUB_ENV | ||
|
||
- name: Compress release | ||
run: | | ||
tar -czvf ${{ github.workspace }}/server-x86_64.tar.gz -C ${{ github.workspace }}/build/ server | ||
- name: Create and upload Release | ||
id: create_release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref_name }} | ||
name: Release ${{ github.ref_name }} | ||
body: | | ||
- ${{ env.COMMIT_MESSAGE }} | ||
draft: false | ||
prerelease: true | ||
artifacts: ${{ github.workspace }}/server-x86_64.tar.gz |
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,7 @@ | ||
.cache | ||
.cpm_cache | ||
.build | ||
build | ||
.DS_Store | ||
compile_commands.json | ||
|
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 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "(lldb) Launch", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/build/Debug/server", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [ | ||
{ | ||
"name": "WHITELIST", | ||
"value": "127.0.0.5" | ||
} | ||
], | ||
"externalConsole": false, | ||
"MIMode": "lldb" | ||
} | ||
] | ||
} |
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,3 @@ | ||
{ | ||
"C_Cpp.debugShortcut": false, | ||
} |
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,81 @@ | ||
// Static tasks configuration. | ||
// | ||
// Example: | ||
[ | ||
{ | ||
"label": "build", | ||
"command": "cmake --build build/Debug", | ||
//"args": [], | ||
// Env overrides for the command, will be appended to the terminal's environment from the settings. | ||
//"env": { "foo": "bar" }, | ||
// Current working directory to spawn the command into, defaults to current project root. | ||
//"cwd": "/path/to/working/directory", | ||
// Whether to use a new terminal tab or reuse the existing one to spawn the process, defaults to `false`. | ||
"use_new_terminal": true, | ||
// Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish, defaults to `false`. | ||
"allow_concurrent_runs": false, | ||
// What to do with the terminal pane and tab, after the command was started: | ||
// * `always` — always show the terminal pane, add and focus the corresponding task's tab in it (default) | ||
// * `never` — avoid changing current terminal pane focus, but still add/reuse the task's tab there | ||
"reveal": "always", | ||
// What to do with the terminal pane and tab, after the command had finished: | ||
// * `never` — Do nothing when the command finishes (default) | ||
// * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it | ||
// * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always` | ||
"hide": "never", | ||
// Which shell to use when running a task inside the terminal. | ||
// May take 3 values: | ||
// 1. (default) Use the system's default terminal configuration in /etc/passwd | ||
// "shell": "system" | ||
// 2. A program: | ||
// "shell": { | ||
// "program": "sh" | ||
// } | ||
// 3. A program with arguments: | ||
// "shell": { | ||
// "with_arguments": { | ||
// "program": "/bin/bash", | ||
// "arguments": ["--login"] | ||
// } | ||
// } | ||
"shell": "system" | ||
}, | ||
{ | ||
"label": "configure", | ||
"command": "cmake -S. -Bbuild/Debug -GNinja -DCMAKE_BUILD_TYPE=Debug", | ||
//"args": [], | ||
// Env overrides for the command, will be appended to the terminal's environment from the settings. | ||
//"env": { "foo": "bar" }, | ||
// Current working directory to spawn the command into, defaults to current project root. | ||
//"cwd": "/path/to/working/directory", | ||
// Whether to use a new terminal tab or reuse the existing one to spawn the process, defaults to `false`. | ||
"use_new_terminal": true, | ||
// Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish, defaults to `false`. | ||
"allow_concurrent_runs": false, | ||
// What to do with the terminal pane and tab, after the command was started: | ||
// * `always` — always show the terminal pane, add and focus the corresponding task's tab in it (default) | ||
// * `never` — avoid changing current terminal pane focus, but still add/reuse the task's tab there | ||
"reveal": "always", | ||
// What to do with the terminal pane and tab, after the command had finished: | ||
// * `never` — Do nothing when the command finishes (default) | ||
// * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it | ||
// * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always` | ||
"hide": "never", | ||
// Which shell to use when running a task inside the terminal. | ||
// May take 3 values: | ||
// 1. (default) Use the system's default terminal configuration in /etc/passwd | ||
// "shell": "system" | ||
// 2. A program: | ||
// "shell": { | ||
// "program": "sh" | ||
// } | ||
// 3. A program with arguments: | ||
// "shell": { | ||
// "with_arguments": { | ||
// "program": "/bin/bash", | ||
// "arguments": ["--login"] | ||
// } | ||
// } | ||
"shell": "system" | ||
} | ||
] |