Skip to content

Commit

Permalink
Merge pull request #5 from rwols/dev
Browse files Browse the repository at this point in the history
Prepare for version 2.0-alpha
  • Loading branch information
rwols authored Aug 26, 2017
2 parents c44ae9d + 996f7f2 commit 78fbd5c
Show file tree
Hide file tree
Showing 65 changed files with 2,505 additions and 341 deletions.
23 changes: 23 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
environment:
# The package name
PACKAGE: CMakeBuilder
SUBLIME_TEXT_VERSION : "3"

install:
- ps: appveyor DownloadFile "https://raw.githubusercontent.com/randy3k/UnitTesting/master/sbin/appveyor.ps1"
- ps: .\appveyor.ps1 "bootstrap" -verbose
# install Package Control
- ps: .\appveyor.ps1 "install_package_control" -verbose

build: off

test_script:

# run tests with test coverage report
- ps: .\appveyor.ps1 "run_tests" -coverage -verbose

after_test:
- "SET PYTHON=C:\Python33"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- pip install codecov
- codecov
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = /*/tests/*
21 changes: 21 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Stuff not being exported to ZIP and therefore
# prevented from being packed into LSP.sublime-package

## git
.github/ export-ignore
gh-pages/ export-ignore
*.git export-ignore
*.gitignore export-ignore
*.gitattributes export-ignore

## unit testing
tests/ export-ignore
unittesting.json export-ignore

## other configs
stubs/ export-ignore
.travis.yml export-ignore
.appveyor.yml export-ignore
.coveragerc export-ignore
*.ini export-ignore
*.cfg export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.coverage
.vagrant
*.pyc
tests/*build*
55 changes: 55 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
env:
global:
- PACKAGE=CMakeBuilder # Package name
- SUBLIME_TEXT_VERSION="3"
# use UNITTESTING_TAG to specific tag of UnitTesting
# - UNITTESTING_TAG="master"

# mutliple os matrix
# https://docs.travis-ci.com/user/multi-os/#Python-example-(unsupported-languages)
matrix:
include:
- os: linux
language: python
python: 3.3
- os: osx
language: generic


before_install:
- curl -OL https://raw.githubusercontent.com/randy3k/UnitTesting/master/sbin/travis.sh
# enable gui, see https://docs.travis-ci.com/user/gui-and-headless-browsers
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
fi

install:
# bootstrap the testing environment
- sh travis.sh bootstrap
# install Package Control and package denepdencies
- sh travis.sh install_package_control

script:
# run tests with test coverage report
- sh travis.sh run_tests --coverage
# testing syntax_test files
# - sh travis.sh run_syntax_tests

after_success:
# remove the following if `coveralls` is not needed
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update;
brew install python3;
pip3 install python-coveralls;
pip3 install codecov;
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
pip install python-coveralls;
pip install codecov;
fi
- coveralls
- codecov

notifications:
email: false
10 changes: 10 additions & 0 deletions CMakeBuilder.sublime-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"target": "cmake_build",
"selector": "source.cmake | source.c | source.c++",
"variants":
{
"name": "Select & Build Target",
"selector": "source.cmake | source.c | source.c++",
"select_target": true
}
}
36 changes: 34 additions & 2 deletions CMakeBuilder.sublime-commands
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[
{
"command": "cmake_open_build_folder",
"command": "cmake_open_build_folder",
"caption": "CMakeBuilder: Browse Build Folder…"
},
{
"command": "cmake_configure",
"caption": "CMakeBuilder: Configure"
},
{
"command": "cmake_write_build_targets",
"command": "cmake_write_build_targets",
"caption": "CMakeBuilder: Write Build Targets to Sublime Project File"
},
{
Expand All @@ -30,5 +30,37 @@
{
"command": "cmake_diagnose",
"caption": "CMakeBuilder: Diagnose (What Should I Do?)"
},
{
"command": "cmake_set_target",
"caption": "CMakeBuilder: Set Target"
},
{
"command": "cmake_reveal_include_directories",
"caption": "CMakeBuilder: Reveal Include Directories"
},
{
"command": "cmake_dump_file_system_watchers",
"caption": "CMakeBuilder: Dump File System Watchers"
},
{
"command": "cmake_dump_inputs",
"caption": "CMakeBuilder: Dump CMake Inputs"
},
{
"command": "cmake_set_global_setting",
"caption": "CMakeBuilder: Set Global Setting"
},
{
"command": "cmake_show_configure_output",
"caption": "CMakeBuilder: Show Configure Output"
},
{
"command": "cmake_switch_scheme",
"caption": "CMakeBuilder: Switch Scheme"
},
{
"command": "cmake_restart_server",
"caption": "CMakeBuilder: Restart Server For This Project"
}
]
37 changes: 29 additions & 8 deletions CMakeBuilder.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
{
// These are the default settings. They are located in
//
// These are the default settings. They are located in
//
// (Installed) Packages/CMakeBuilder/CMakeBuilder.sublime-settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//
// You should not edit this file, as it gets overwritten after every update.
// Instead, if you want to override the default settings, create a new file
// in Packages/User/CMakeBuilder.sublime-settings, and copy and paste over
// from this file. Then change what you want.
//
//
// If you came here from
//
//
// Preferences -> Package Settings -> CMakeBuilder -> Settings,
//
// then Sublime Text has already opened a "user" file for you to the right
// of this view in which you may override settings.

//==========================================================================


// If there's a compile_commands.json file generated with
// CMAKE_EXPORT_COMPILE_COMMANDS, do we want to copy it over to the source
// directory? This is useful for, for instance, clangd.
// See: https://clang.llvm.org/extra/clangd.html
// See: https://clang.llvm.org/docs/JSONCompilationDatabase.html
// See: https://cmake.org/cmake/help/v3.5/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html
"copy_compile_commands_to_project_path": false,

// Wether to auto-update "ecc_flags_sources" upon a succesful configure
// to point to the compilation database.
"auto_update_EasyClangComplete_compile_commands_location": false,

// Wether to auto-update the "compile_commands" key upon a succesful
// configure to point to the compilation database.
"auto_update_compile_commands_project_setting": false,

// Set this to true to always open an output panel when the server starts
// to configure the project. If false, the output panel will only display
// when an error occurs.
"server_configure_verbose": false,

// If the command "CMakeBuilder: Configure" exited with status 0, should we
// write/update build targets in the sublime project file immediately?
"write_build_targets_after_successful_configure": true,
Expand All @@ -35,7 +56,7 @@
// the "Configure" command will run.
"configure_on_save": true,

// The command line arguments that are passed to CTest when you run the
// The command line arguments that are passed to CTest when you run the
// command "CMakeBuilder: Run CTest".
"ctest_command_line_args": "--output-on-failure",

Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Thank you for showing interest in contributing to CMakeBuilder.

# Style Guide
The style is loosely based on [PEP8][1].
Use the LSP plugin (search for it on Package Control) together with the
python-language-server when you make changes to this plugin. You can install
python-language-server with pip3. When you're done with the changes, format
the document. Please trim whitespace and make sure views end with an empty line.

# Things That Need Attention
More platform-specific generators are very welcome. See the folder "Generators".

[1]: https://www.python.org/dev/peps/pep-0008/
40 changes: 33 additions & 7 deletions Main.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "tools",
"children":
[
{
{
"caption": "CMakeBuilder",
"id": "build",
"mnemonic": "C",
Expand All @@ -18,8 +18,8 @@
"mnemonic": "D"
},
{
"command": "cmake_configure",
"mnemonic": "C"
"command": "cmake_configure",
"mnemonic": "C"
},
{
"command": "cmake_write_build_targets",
Expand All @@ -33,7 +33,7 @@
"command": "cmake_edit_cache"
},
{
"command": "cmake_clear_cache"
"command": "cmake_clear_cache"
},
{
"command": "cmake_run_ctest",
Expand All @@ -42,6 +42,32 @@
{
"command": "cmake_new_project",
"mnemonic": "N"
},
{
"command": "cmake_set_target",
"mnemonic": "T"
},
{
"command": "cmake_reveal_include_directories",
"mnemonic": "I"
},
{
"command": "cmake_dump_file_system_watchers",
},
{
"command": "cmake_dump_inputs"
},
{
"command": "cmake_set_global_setting"
},
{
"command": "cmake_show_configure_output"
},
{
"command": "cmake_switch_scheme"
},
{
"command": "cmake_restart_server"
}
]
}
Expand All @@ -50,17 +76,17 @@
{
"caption": "Preferences",
"id": "preferences",
"children":
"children":
[
{
"caption": "Package Settings",
"id": "package-settings",
"children":
"children":
[
{
"caption": "CMakeBuilder",
"id": "cmakebuilder",
"children":
"children":
[
{
"command": "open_url",
Expand Down
Loading

0 comments on commit 78fbd5c

Please sign in to comment.