Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into universal
Browse files Browse the repository at this point in the history
  • Loading branch information
qvacua committed Sep 12, 2020
2 parents 635e103 + 1e10342 commit c37bc0c
Show file tree
Hide file tree
Showing 153 changed files with 7,462 additions and 3,877 deletions.
25 changes: 11 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Tools
.ropeproject/
/venv/
compile_commands.json
# Visual Studio

# IDEs
/.vs/
# Jetbrains
.idea/
/.vscode/
/.idea/

# Build/deps dir
/build/
/cmake-build-debug/
/dist/
/.deps/
/tmp/
/.clangd/
Expand All @@ -22,8 +21,6 @@ compile_commands.json
*.o
*.so

tags

/src/nvim/po/vim.pot
/src/nvim/po/*.ck

Expand Down Expand Up @@ -59,18 +56,18 @@ tags
# local make targets
local.mk

# runtime/doc
# Generated from :help docs
tags
/runtime/doc/*.html
/runtime/doc/tags.ref
/runtime/doc/errors.log
# Don't include the mpack files.
/runtime/doc/*.mpack

# CLion
/.idea/

# NvimServer
.swiftpm
/NvimServer/build
/NvimServer/third-party-x86_64
/NvimServer/third-party-arm64

# Generated by gen_vimdoc.py:
/runtime/doc/*.mpack
/tmp-*-doc
21 changes: 16 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: xenial
dist: bionic

language: c

Expand Down Expand Up @@ -99,12 +99,21 @@ jobs:
- stage: baseline
name: clang-asan
os: linux
compiler: clang
compiler: clang-11
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
env:
- CLANG_SANITIZER=ASAN_UBSAN
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
- SYMBOLIZER=asan_symbolize-11
- *common-job-env
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- *common-apt-packages
- clang-11
- name: gcc-coverage (gcc 9)
os: linux
compiler: gcc-9
Expand All @@ -116,15 +125,15 @@ jobs:
- BUSTED_ARGS="--coverage"
- *common-job-env
addons:
snaps:
- name: powershell
confinement: classic
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod xenial main'
key_url: 'https://packages.microsoft.com/keys/microsoft.asc'
packages:
- *common-apt-packages
- gcc-9
- powershell
- if: branch = master AND commit_message !~ /\[skip.lint\]/
name: lint
os: linux
Expand Down Expand Up @@ -193,6 +202,7 @@ jobs:
- LANG: C.UTF-8
- SNAPCRAFT_ENABLE_SILENT_REPORT: y
- SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
- SNAPCRAFT_BUILD_ENVIRONMENT: lxd
addons:
snaps:
- name: snapcraft
Expand Down Expand Up @@ -221,6 +231,7 @@ jobs:
- LANG: C.UTF-8
- SNAPCRAFT_ENABLE_SILENT_REPORT: y
- SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
- SNAPCRAFT_BUILD_ENVIRONMENT: lxd
fast_finish: true

before_install: ci/before_install.sh
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ else()
-Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion
-Wmissing-prototypes)

check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG)
if(HAS_WIMPLICIT_FALLTHROUGH_FLAG)
check_c_compiler_flag(-Wimplicit-fallthrough HAVE_WIMPLICIT_FALLTHROUGH_FLAG)
if(HAVE_WIMPLICIT_FALLTHROUGH_FLAG)
add_compile_options(-Wimplicit-fallthrough)
endif()

Expand Down
2 changes: 1 addition & 1 deletion ci/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [[ "${TRAVIS_OS_NAME}" != osx ]] && command -v pyenv; then
echo 'Setting Python versions via pyenv'

# Prefer Python 2 over 3 (more conservative).
pyenv global 2.7.15:3.7.1
pyenv global 2.7:3.8

echo 'Updated Python info:'
(
Expand Down
2 changes: 1 addition & 1 deletion ci/common/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ valgrind_check() {

check_sanitizer() {
if test -n "${CLANG_SANITIZER}"; then
check_logs "${1}" "*san.*"
check_logs "${1}" "*san.*" | ${SYMBOLIZER:-cat}
fi
}

Expand Down
194 changes: 194 additions & 0 deletions ci/snap/.snapcraft_payload
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
{
"ref": "refs/heads/master",
"before": "66b136c43c12df3dcf8f19ff48f206ad2e4f43fc",
"after": "1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"repository": {
"id": 292861950,
"node_id": "MDEwOlJlcG9zaXRvcnkyOTI4NjE5NTA=",
"name": "neovim-snap",
"full_name": "hurricanehrndz/neovim-snap",
"private": false,
"owner": {
"name": "hurricanehrndz",
"email": "hurricanehrndz@users.noreply.github.com",
"login": "hurricanehrndz",
"id": 5804237,
"node_id": "MDQ6VXNlcjU4MDQyMzc=",
"avatar_url": "https://avatars0.githubusercontent.com/u/5804237?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hurricanehrndz",
"html_url": "https://github.com/hurricanehrndz",
"followers_url": "https://api.github.com/users/hurricanehrndz/followers",
"following_url": "https://api.github.com/users/hurricanehrndz/following{/other_user}",
"gists_url": "https://api.github.com/users/hurricanehrndz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hurricanehrndz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hurricanehrndz/subscriptions",
"organizations_url": "https://api.github.com/users/hurricanehrndz/orgs",
"repos_url": "https://api.github.com/users/hurricanehrndz/repos",
"events_url": "https://api.github.com/users/hurricanehrndz/events{/privacy}",
"received_events_url": "https://api.github.com/users/hurricanehrndz/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/hurricanehrndz/neovim-snap",
"description": "snap build for neovim",
"fork": false,
"url": "https://github.com/hurricanehrndz/neovim-snap",
"forks_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/forks",
"keys_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/teams",
"hooks_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/hooks",
"issue_events_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/issues/events{/number}",
"events_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/events",
"assignees_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/assignees{/user}",
"branches_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/branches{/branch}",
"tags_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/tags",
"blobs_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/statuses/{sha}",
"languages_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/languages",
"stargazers_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/stargazers",
"contributors_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/contributors",
"subscribers_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/subscribers",
"subscription_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/subscription",
"commits_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/contents/{+path}",
"compare_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/merges",
"archive_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/downloads",
"issues_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/issues{/number}",
"pulls_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/pulls{/number}",
"milestones_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/milestones{/number}",
"notifications_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/labels{/name}",
"releases_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/releases{/id}",
"deployments_url": "https://api.github.com/repos/hurricanehrndz/neovim-snap/deployments",
"created_at": 1599227980,
"updated_at": "2020-09-04T14:02:38Z",
"pushed_at": 1599228352,
"git_url": "git://github.com/hurricanehrndz/neovim-snap.git",
"ssh_url": "git@github.com:hurricanehrndz/neovim-snap.git",
"clone_url": "https://github.com/hurricanehrndz/neovim-snap.git",
"svn_url": "https://github.com/hurricanehrndz/neovim-snap",
"homepage": null,
"size": 0,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "master",
"stargazers": 0,
"master_branch": "master"
},
"pusher": {
"name": "hurricanehrndz",
"email": "hurricanehrndz@users.noreply.github.com"
},
"sender": {
"login": "hurricanehrndz",
"id": 5804237,
"node_id": "MDQ6VXNlcjU4MDQyMzc=",
"avatar_url": "https://avatars0.githubusercontent.com/u/5804237?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hurricanehrndz",
"html_url": "https://github.com/hurricanehrndz",
"followers_url": "https://api.github.com/users/hurricanehrndz/followers",
"following_url": "https://api.github.com/users/hurricanehrndz/following{/other_user}",
"gists_url": "https://api.github.com/users/hurricanehrndz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hurricanehrndz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hurricanehrndz/subscriptions",
"organizations_url": "https://api.github.com/users/hurricanehrndz/orgs",
"repos_url": "https://api.github.com/users/hurricanehrndz/repos",
"events_url": "https://api.github.com/users/hurricanehrndz/events{/privacy}",
"received_events_url": "https://api.github.com/users/hurricanehrndz/received_events",
"type": "User",
"site_admin": false
},
"created": false,
"deleted": false,
"forced": false,
"base_ref": null,
"compare": "https://github.com/hurricanehrndz/neovim-snap/compare/66b136c43c12...1bf69c32217c",
"commits": [
{
"id": "1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"tree_id": "62ea83a2349be8c930c45fdc199f71b08bf5927e",
"distinct": true,
"message": "Build of latest tag",
"timestamp": "2020-09-04T14:05:40Z",
"url": "https://github.com/hurricanehrndz/neovim-snap/commit/1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"author": {
"name": "Carlos Hernandez",
"email": "carlos@techbyte.ca",
"username": "hurricanehrndz"
},
"committer": {
"name": "Carlos Hernandez",
"email": "carlos@techbyte.ca",
"username": "hurricanehrndz"
},
"added": [

],
"removed": [

],
"modified": [
"snap/snapcraft.yaml"
]
}
],
"head_commit": {
"id": "1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"tree_id": "62ea83a2349be8c930c45fdc199f71b08bf5927e",
"distinct": true,
"message": "Build of latest tag",
"timestamp": "2020-09-04T14:05:40Z",
"url": "https://github.com/hurricanehrndz/neovim-snap/commit/1bf69c32217cc455603ce8aa2b5415d9717f0fa2",
"author": {
"name": "Carlos Hernandez",
"email": "carlos@techbyte.ca",
"username": "hurricanehrndz"
},
"committer": {
"name": "Carlos Hernandez",
"email": "carlos@techbyte.ca",
"username": "hurricanehrndz"
},
"added": [

],
"removed": [

],
"modified": [
"snap/snapcraft.yaml"
]
}
}
42 changes: 30 additions & 12 deletions ci/snap/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,37 @@
set -e
set -o pipefail

# not a tagged release, abort
# [[ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ]] && exit 0
SNAP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WEBHOOK_PAYLOAD="$(cat "${SNAP_DIR}/.snapcraft_payload")"
PAYLOAD_SIG="${SECRET_SNAP_SIG}"

mkdir -p .snapcraft
# shellcheck disable=SC2154
openssl aes-256-cbc -K "$encrypted_ece1c4844832_key" -iv "$encrypted_ece1c4844832_iv" \
-in ci/snap/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d

SNAP=$(find ./ -name "*.snap")
snap_realease_needed() {
last_committed_tag="$(git tag -l --sort=refname|head -1)"
last_snap_release="$(snap info nvim | awk '$1 == "latest/edge:" { print $2 }' | perl -lpe 's/v\d.\d.\d-//g')"
git fetch -f --tags
git checkout "${last_committed_tag}" 2> /dev/null
last_git_release="$(git describe --first-parent 2> /dev/null | perl -lpe 's/v\d.\d.\d-//g')"

# TODO(justinmk): This always does `edge` until we enable tagged builds.
if [[ "$SNAP" =~ "dirty" || "$SNAP" =~ "nightly" ]]; then
snapcraft push "$SNAP" --release edge
else
snapcraft push "$SNAP" --release candidate
if [[ -z "$(echo $last_snap_release | perl -ne "print if /${last_git_release}.*/")" ]]; then
return 0
fi
return 1
}


trigger_snapcraft_webhook() {
[[ -n "${PAYLOAD_SIG}" ]] || exit
echo "Triggering new snap relase via webhook..."
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Hub-Signature: sha1=${PAYLOAD_SIG}" \
--data "${WEBHOOK_PAYLOAD}" \
https://snapcraft.io/nvim/webhook/notify
}


if $(snap_realease_needed); then
echo "New snap release required"
trigger_snapcraft_webhook
fi
Loading

0 comments on commit c37bc0c

Please sign in to comment.