Skip to content

Commit

Permalink
Merge pull request #20 from LiteLDev/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
futrime authored Feb 5, 2024
2 parents 35f3cd0 + 3f5d08a commit 7066d56
Show file tree
Hide file tree
Showing 410 changed files with 59,084 additions and 33,259 deletions.
47 changes: 47 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Left
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: true
PadOperators: true
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllArgumentsOnNextLine: false
AlignOperands: AlignAfterOperator
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AllowShortLambdasOnASingleLine: All
AllowShortBlocksOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakTemplateDeclarations: 'Yes'
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom
BreakBeforeBinaryOperators: NonAssignment
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerIndentWidth: 0
IndentWidth: 4
Language: Cpp
MaxEmptyLinesToKeep: 1
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
TabWidth: 4
UseTab: Never
SortIncludes: CaseSensitive
IncludeBlocks: Regroup
14 changes: 14 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
Checks: '
bugprone-*,
clang-analyzer-*,
concurrency-*,
cppcoreguidelines-*,
llvm-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*
'
...
6 changes: 3 additions & 3 deletions .clangd
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Diagnostics:
Suppress:
Suppress:
- "-Wmicrosoft-enum-forward-reference"
- "-Wc++11-narrowing"
- "-Wc++2b-extensions"
- "-Wmicrosoft-cast"
CompileFlags:
Add:
Add:
- "-ferror-limit=0"
- "-D__FUNCTION__=\"dummy\""
- '-D__FUNCTION__="dummy"'
90 changes: 88 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,90 @@
## C++
## https://github.com/gitattributes/gitattributes/blob/master/Common.gitattributes
# Common settings that generally should always be used with your language specific settings

# Auto detect text files and perform LF normalization
* text=auto

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text eol=crlf
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# Text files where line endings should be preserved
*.patch -text

#
# Exclude files from exporting
#

.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore


## https://github.com/gitattributes/gitattributes/blob/master/C%2B%2B.gitattributes
# Sources
*.c text diff=cpp
*.cc text diff=cpp
Expand Down Expand Up @@ -38,4 +124,4 @@
*.app binary


## Others
## Project specific
35 changes: 20 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ on:

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
backend:
# - libnode
- lua
- nodejs
- python310
# - python310
- quickjs
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: xmake-io/github-action-setup-xmake@v1

- uses: actions/cache@v4
with:
path: |
~/AppData/Local/.xmake
key: xmake-${{ hashFiles('xmake.lua') }}
restore-keys: |
xmake-
- run: |
xmake repo -u
Expand All @@ -27,24 +35,21 @@ jobs:
- run: |
xmake -w -y
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: legacy-script-engine-${{ matrix.backend }}-windows-x64-${{ github.sha }}
path: |
build/windows/x64/release/legacy-script-engine-${{ matrix.backend }}.dll
build/windows/x64/release/legacy-script-engine-${{ matrix.backend }}.pdb
bin/
check-style:
runs-on: ubuntu-latest
clang-format:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18

- run: |
npm install [email protected]
choco install llvm -y --version=17.0.6
- run: |
npx clang-format --dry-run --Werror $(find . -type f -name '*.cpp' -o -name '*.h')
- name: clang-format
run: |
Get-ChildItem src/ -Filter *.cpp -Recurse | ForEach-Object { clang-format -i -Werror $_.FullName }
Get-ChildItem src/ -Filter *.h -Recurse | ForEach-Object { clang-format -i -Werror $_.FullName }
35 changes: 35 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
paths:
- .github/workflows/build_docs.yml
- docs/**
- mkdocs.yml
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: |
pip install -r requirements.txt
- run: |
mkdocs build
- uses: actions/upload-pages-artifact@v3
with:
path: site/

deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs:
- build
permissions:
id-token: write
pages: write
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4

Loading

0 comments on commit 7066d56

Please sign in to comment.