Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add code styling mandatory #136

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: cpp
dist: bionic
before_install:
- sudo apt-get install -y cmake g++ make libqt5webkit5-dev libqt5svg5-dev qtbase5-dev qttools5-dev qttools5-dev-tools libasound2-dev
- sudo apt-get install -y cmake g++ make libqt5webkit5-dev libqt5svg5-dev qtbase5-dev qttools5-dev qttools5-dev-tools libasound2-dev clang-format
script:
- pwd && source ./travis-build.sh

24 changes: 20 additions & 4 deletions travis-build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
#!/bin/sh
cd ..
mkdir -p build
cd build
#!/bin/bash
# This script is run from the CI service and does:
# 1) checks, if code is correctly formatted.
# 2) compiles canorus
# 3) installs canorus locally

set -euxo pipefail

mkdir -p ../build
cd ../build
cmake -D CMAKE_INSTALL_PREFIX=~/.local ../canorus

echo "Check, if code is formatted with \"make fmt\"..."
make fmt
cd ../canorus
# Output diff, if any.
git diff
# Abort, if there are any differences.
git diff --quiet
cd ../build

make -j4
make tr
make install
Expand Down