Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed Sep 14, 2020
2 parents 3fa4455 + 48010a0 commit c62ae5c
Show file tree
Hide file tree
Showing 615 changed files with 9,368 additions and 5,533 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/FPDiagnostic.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ assignees: ''
## Версия
<!-- Версия BSLLS либо плагина, который использует BSLLS -->

## Описание ложного НЕ срабатывания диагностики
## Описание ложного срабатывания диагностики
<!-- Описание ситуации, когда диагностика сработала, а не должна была -->

## Пример кода
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import ntpath
import json

pattern = r"bsl.+\.jar"
pattern = r"bsl.+\-exec.jar"
thisPath = os.getcwd()
dirName = thisPath + "/build/libs"

Expand All @@ -29,7 +29,7 @@ def get_bslls_jar(dir):
names = os.listdir(dir)
for name in names:
fullname = os.path.join(dir, name)
if os.path.isfile(fullname) and re.search(pattern, fullname) and fullname.find('sources.jar') == -1 and fullname.find('javadoc.jar') == -1:
if os.path.isfile(fullname) and re.search(pattern, fullname):
return ntpath.basename(fullname)
return None

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
java-version: 11

- name: Build with Gradle
run: ./gradlew jar
run: ./gradlew bootJar

- name: Set up Python
uses: actions/setup-python@v2
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "CodeQL"

on:
push:
branches: [develop, master]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
schedule:
- cron: '0 0 * * 5'

jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
with:
languages: java

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

- run: ./gradlew jar

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
1 change: 1 addition & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
paths:
- 'docs/**'
- 'src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/**'
- 'src/main/java/**'
- 'mkdocs.yml'
- 'mkdocs.en.yml'
- '.github/workflows/gh-pages.yml'
Expand Down
50 changes: 9 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,14 @@ jobs:
- os: windows-latest
displayName: Windows
prefix: win
jpackageDownload: https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_windows-x64_bin.zip
jdk14Path: /jdk-14
app-image: bsl-language-server
- os: ubuntu-latest
displayName: Linux
prefix: nix
jpackageDownload: https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_linux-x64_bin.tar.gz
jdk14Path: /jdk-14
app-image: bsl-language-server
- os: macOS-latest
displayName: MacOS
prefix: mac
jpackageDownload: https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_osx-x64_bin.tar.gz
jdk14Path: /jdk-14.jdk/Contents/Home
app-image: bsl-language-server.app
runs-on: ${{ matrix.os }}
name: (${{ matrix.displayName }}) create image app version
Expand All @@ -38,31 +32,9 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 13
- name: Build with Gradle
run: ./gradlew build
- name: Download jpackage
# We need to download jpackage from https://jdk.java.net/jpackage/
run: |
import tarfile
import zipfile
import sys
if sys.version_info[0] >= 3:
from urllib.request import urlretrieve
else:
from urllib import urlretrieve
url = "${{ matrix.jpackageDownload }}"
tmpfile, headers = urlretrieve(url)
if (url.endswith("tar.gz")):
tar = tarfile.open(tmpfile)
tar.extractall()
tar.close()
elif (url.endswith("zip")):
zip = zipfile.ZipFile(tmpfile)
zip.extractall()
zip.close()
shell: python
java-version: 14
- name: Build bootJar with Gradle
run: ./gradlew check bootJar
- name: Build jpackage app-image
run: |
import os
Expand All @@ -78,18 +50,16 @@ jobs:
isWindows = True
if isWindows:
jpackage = os.getcwd() + "\\" + "${{ matrix.jdk14Path }}" + '\\bin\\jpackage.exe'
dirName = os.getcwd() + "\\build\\libs"
else:
jpackage = os.getcwd() + "${{ matrix.jdk14Path }}" + '/bin/jpackage'
dirName = os.getcwd() + "/build/libs"
dirName = os.getcwd() + "/build/libs"
def start():
fullname = get_bslls_jar(dirName)
if (fullname == None):
exit
cmdArgs = [jpackage]
cmdArgs = ['jpackage']
cmdArgs.append('--name')
cmdArgs.append('bsl-language-server')
cmdArgs.append('--input')
Expand All @@ -112,15 +82,10 @@ jobs:
names = os.listdir(dir)
for name in names:
fullname = os.path.join(dir, name)
if os.path.isfile(fullname) and re.search(pattern, fullname) and fullname.find('sources.jar') == -1 and fullname.find('javadoc.jar') == -1:
if os.path.isfile(fullname) and re.search(pattern, fullname) and fullname.find('exec.jar') != -1:
return ntpath.basename(fullname)
return None
def run_jpackage():
cmd = jpackage + ' @jpackage.cfg'
print(cmd)
os.system(cmd)
start()
shell: python
- name: Upload artifact
Expand All @@ -133,6 +98,9 @@ jobs:
with:
files: './bsl-language-server_${{ matrix.prefix }}.zip'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build with Gradle
if: matrix.prefix == 'nix'
run: ./gradlew build
- name: Upload jar to release
if: matrix.prefix == 'nix'
uses: AButler/[email protected]
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,7 @@ gen/
# mkdocs
temp/
public/

# jpackage
bsl-language-server/
bsl-language-server_*.zip
163 changes: 0 additions & 163 deletions COPYING.LESSER.md

This file was deleted.

Loading

0 comments on commit c62ae5c

Please sign in to comment.