Add vt insert and movement tests #130
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
name: Build | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/*.yml' | |
- 'LICENSE.txt' | |
- '*.md' | |
- '*.sh' | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
CONTOUR_VERSION: "0.4.3.6442" | |
jobs: | |
check_clang_format: | |
name: "Check C++ style" | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install clang | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 18 | |
sudo apt-get install clang-format-18 | |
- name: "Clang-format libtermbench" | |
run: find ./libtermbench -name "*.cpp" -o -name "*.h" | xargs clang-format-18 --Werror --dry-run | |
- name: "Clang-format tb" | |
run: find ./tb -name "*.cpp" -o -name "*.h" | xargs clang-format-18 --Werror --dry-run | |
- name: "Check includes" | |
run: ./scripts/check-includes.sh | |
ubuntu_linux: | |
name: "Ubuntu Linux 24.04" | |
runs-on: ubuntu-24.04 | |
env: | |
CMAKE_PRESET: "linux-gcc-release" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: "ccache-ubuntu_2404" | |
max-size: 256M | |
- name: set environment variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: "install dependencies" | |
run: | | |
set -ex | |
sudo apt -q update | |
sudo apt install -qy ninja-build | |
sudo ./scripts/install-deps.sh | |
- name: "Install GCC" | |
run: sudo apt install g++ | |
- name: "cmake" | |
run: cmake --preset "$CMAKE_PRESET" -D CMAKE_CXX_COMPILER="g++" | |
- name: "build" | |
run: cmake --build --preset "$CMAKE_PRESET" --preset -- -j3 | |
- name: "install dependencies for running benchmarks" | |
run: ./scripts/xvfb-deps.sh | |
- name: "Install contour" | |
run: | | |
wget https://github.com/contour-terminal/contour/releases/download/v$CONTOUR_VERSION/contour-$CONTOUR_VERSION-ubuntu24.04-amd64.deb | |
sudo dpkg -i contour-$CONTOUR_VERSION-ubuntu24.04-amd64.deb | |
- name: "create and patch contour.yml config file" | |
run: | | |
set -ex | |
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: "Install wezterm" | |
run: | | |
curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg | |
echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list | |
sudo apt update | |
sudo apt install wezterm | |
- name: "Run benchmarks" | |
run: ./scripts/Xvfb-bench-run.sh "./build/$CMAKE_PRESET/tb/tb" | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v1 | |
- name: "Create Plots" | |
run: julia ./scripts/plot_results.jl | |
- name: "Give result files a .txt file extension" | |
run: for file in *_results; do mv -v $file $file.txt; done | |
- name: "Upload results and plot" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: benchmark_results | |
path: | | |
*.png | |
*_results.txt |