-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update of termbench with scripts to create plots
- Loading branch information
Showing
14 changed files
with
707 additions
and
358 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,81 @@ | ||
--- | ||
BasedOnStyle: Microsoft | ||
AccessModifierOffset: '-2' | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveMacros: 'true' | ||
AlignConsecutiveDeclarations: 'false' | ||
AlignEscapedNewlines: Left | ||
AlignOperands: 'true' | ||
AlignTrailingComments: 'true' | ||
AllowAllArgumentsOnNextLine: 'true' | ||
AllowAllConstructorInitializersOnNextLine: 'true' | ||
AllowAllParametersOfDeclarationOnNextLine: 'true' | ||
AllowShortBlocksOnASingleLine: 'false' | ||
AllowShortCaseLabelsOnASingleLine: 'true' | ||
AllowShortFunctionsOnASingleLine: InlineOnly | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: Inline | ||
AllowShortLoopsOnASingleLine: 'false' | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: 'false' | ||
AlwaysBreakTemplateDeclarations: 'Yes' | ||
BinPackArguments: 'false' | ||
BinPackParameters: 'false' | ||
BreakBeforeBinaryOperators: NonAssignment | ||
BreakBeforeBraces: Custom | ||
BreakBeforeTernaryOperators: 'true' | ||
BreakConstructorInitializers: AfterColon | ||
BreakInheritanceList: AfterColon | ||
BreakStringLiterals: 'true' | ||
ColumnLimit: '110' | ||
CompactNamespaces: 'false' | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' | ||
ConstructorInitializerIndentWidth: '4' | ||
ContinuationIndentWidth: '4' | ||
Cpp11BracedListStyle: 'false' | ||
DerivePointerAlignment: 'false' | ||
FixNamespaceComments: 'true' | ||
IncludeBlocks: Regroup | ||
IndentCaseLabels: true | ||
IndentPPDirectives: BeforeHash | ||
IndentWidth: '4' | ||
IndentWrappedFunctionNames: 'false' | ||
Language: Cpp | ||
MaxEmptyLinesToKeep: '1' | ||
NamespaceIndentation: Inner | ||
PenaltyBreakAssignment: '0' | ||
PointerAlignment: Left | ||
ReflowComments: 'true' | ||
SortIncludes: 'true' | ||
SortUsingDeclarations: 'true' | ||
SpaceAfterCStyleCast: 'true' | ||
SpaceAfterLogicalNot: 'false' | ||
SpaceAfterTemplateKeyword: 'true' | ||
SpaceBeforeAssignmentOperators: 'true' | ||
SpaceBeforeCpp11BracedList: 'true' | ||
SpaceBeforeCtorInitializerColon: 'false' | ||
SpaceBeforeInheritanceColon: 'false' | ||
SpaceBeforeParens: ControlStatements | ||
SpaceBeforeRangeBasedForLoopColon: 'false' | ||
SpaceInEmptyParentheses: 'false' | ||
SpacesInAngles: 'false' | ||
SpacesInCStyleCastParentheses: 'false' | ||
SpacesInContainerLiterals: 'false' | ||
SpacesInParentheses: 'false' | ||
SpacesInSquareBrackets: 'false' | ||
Standard: Cpp11 | ||
TabWidth: '4' | ||
UseTab: Never | ||
IncludeCategories: | ||
- Regex: '^<(tb)/' | ||
Priority: 0 | ||
- Regex: '^<(libtermbench)/' | ||
Priority: 1 | ||
- Regex: '^<sys/' | ||
Priority: 80 | ||
- Regex: '^<[[:alnum:]_]+>' | ||
Priority: 81 | ||
- Regex: '<[[:alnum:]_]+\.h>' | ||
Priority: 82 | ||
- Regex: '.*' | ||
Priority: 99 |
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,10 @@ | ||
|
||
mock_font_locator: | ||
# Ubuntu 20.04 | ||
- { family: "monospace", slant: normal, weight: normal, path: "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf" } | ||
- { family: "emoji", slant: normal, weight: normal, path: "/usr/share/fonts/truetype/noto/NotoColorEmoji.ttf" } | ||
|
||
# That would be it for macOS | ||
# - { family: "monospace", slant: normal, weight: normal, path: "/Users/trapni/Library/Fonts/JetBrains Mono Regular Nerd Font Complete Mono.ttf" } | ||
# - { family: "emoji", slant: normal, weight: normal, path: "/System/Library/Fonts/Apple Color Emoji.ttc" } | ||
|
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 |
---|---|---|
|
@@ -23,6 +23,26 @@ env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | ||
|
||
jobs: | ||
|
||
|
||
check_clang_format: | ||
name: "Check C++ style" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install clang | ||
run: | | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod +x llvm.sh | ||
sudo ./llvm.sh 17 | ||
sudo apt-get install clang-format-17 | ||
- name: "Clang-format libtermbench" | ||
run: find ./libtermbench -name "*.cpp" -o -name "*.h" | xargs clang-format-17 --Werror --dry-run | ||
- name: "Clang-format tb1" | ||
run: find ./tb -name "*.cpp" -o -name "*.h" | xargs clang-format-17 --Werror --dry-run | ||
- name: "Check includes" | ||
run: ./scripts/check-includes.sh | ||
|
||
ubuntu_linux: | ||
name: "Ubuntu Linux 22.04" | ||
runs-on: ubuntu-22.04 | ||
|
@@ -43,62 +63,56 @@ jobs: | |
set -ex | ||
sudo apt -q update | ||
sudo ./scripts/install-deps.sh | ||
- name: "Install GCC 13" | ||
run: sudo apt install g++-13 | ||
- name: "cmake" | ||
run: cmake -S . -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo" | ||
run: cmake -S . -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo" -D CMAKE_CXX_COMPILER="g++-13" | ||
- name: "build" | ||
run: cmake --build build/ -- -j3 | ||
|
||
osx: | ||
name: "OS/X" | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: "**/cpm_modules" | ||
key: ${{github.workflow}}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||
- name: set variables | ||
id: set_vars | ||
run: ./scripts/ci-set-vars.sh | ||
env: | ||
REPOSITORY: ${{ github.event.repository.name }} | ||
- name: "Install dependencies" | ||
- name: "install dependencies" | ||
run: ./scripts/xvfb-deps.sh | ||
- name: "Install contour" | ||
run: | | ||
wget https://github.com/contour-terminal/contour/releases/download/v0.4.3.6442/contour-0.4.3.6442-ubuntu22.04-amd64.deb | ||
sudo dpkg -i contour-0.4.3.6442-ubuntu22.04-amd64.deb | ||
- name: "create and patch contour.yml config file" | ||
run: | | ||
set -ex | ||
#brew update | ||
./scripts/install-deps.sh | ||
- name: "Create build directory" | ||
run: mkdir build | ||
- name: "Generate build files" | ||
run: cmake -S . -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo" | ||
- name: "Build" | ||
run: cmake --build build/ | ||
|
||
windows: | ||
name: "Windows" | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: setup environment | ||
shell: powershell | ||
id: set_vars | ||
run: .\scripts\ci-set-vars.ps1 | ||
env: | ||
REPOSITORY: ${{ github.event.repository.name }} | ||
- name: "vcpkg: Install dependencies" | ||
uses: lukka/[email protected] | ||
id: runvcpkg | ||
mkdir -p ~/.config/contour/ | ||
contour generate config to ~/.config/contour/contour.yml | ||
sed -i -e 's/locator: native/locator: mock/' ~/.config/contour/contour.yml | ||
sed -i -e 's/strict_spacing: true/strict_spacing: false/' ~/.config/contour/contour.yml | ||
sed -i -e 's/columns: 80/columns: 100/' ~/.config/contour/contour.yml | ||
cat .github/mock-font-locator.yml >> ~/.config/contour/contour.yml | ||
cat ~/.config/contour/contour.yml | ||
- name: "Install alacritty" | ||
run: cargo install alacritty | ||
- name: "Install kitty and xterm" | ||
run: sudo apt install -y kitty xterm xvfb | ||
- name: "run benchmarks" | ||
run: ./scripts/Xvfb-bench-run.sh | ||
- name: "ls" | ||
run: ls -la | ||
- name: "cat contour_results" | ||
run: cat contour_results | ||
- name: "cat kitty_results" | ||
run: cat kitty_results | ||
- name: "cat xterm_results" | ||
run: cat xterm_results | ||
- name: "cat alacritty_results" | ||
run: cat alacritty_results | ||
- name: "Set up Julia" | ||
uses: julia-actions/setup-julia@v1 | ||
- name: "Create Plots" | ||
run: julia ./scripts/plot_results.jl | ||
- name: "Upload results and plot" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/ | ||
vcpkgGitCommitId: 3e93bb69a1cadeb36fe9eca3b6f3912d84f618d5 | ||
- name: "create build directory" | ||
shell: powershell | ||
run: | | ||
If (!(Test-Path build)) | ||
{ | ||
New-Item -ItemType Directory -Force -Path build | ||
} | ||
- name: "Generate build files" | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -B build . | ||
- name: "Build" | ||
run: cmake --build build/ --config Release | ||
name: benchmark_results | ||
path: | | ||
results_full.png | ||
results_ascii.png | ||
contour_results | ||
alacritty_results | ||
xterm_results | ||
kitty_results |
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.