Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zijian Zhang committed Jan 21, 2024
2 parents 60874d3 + 6254d46 commit 35f3cd0
Show file tree
Hide file tree
Showing 157 changed files with 35,314 additions and 232 deletions.
10 changes: 10 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Diagnostics:
Suppress:
- "-Wmicrosoft-enum-forward-reference"
- "-Wc++11-narrowing"
- "-Wc++2b-extensions"
- "-Wmicrosoft-cast"
CompileFlags:
Add:
- "-ferror-limit=0"
- "-D__FUNCTION__=\"dummy\""
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Bug Report
description: Create a report to help us improve
title: "[Bug]: "
labels: ["bug"]
body:
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior.
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.

- type: input
attributes:
label: Platform
description: The platform you are using. (e.g. Windows 10)

- type: input
attributes:
label: BDS Version
description: The version of BDS you are using. (e.g. 1.20.32.1)

- type: input
attributes:
label: LeviLamina Version
description: The version of LeviLamina you are using. (e.g. 1.0.0)

- type: input
attributes:
label: LegacyScriptEngine Version
description: The version of LegacyScriptEngine you are using. (e.g. 1.0.0)

- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here.
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true

- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.

- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Thank you for your contribution to the repository.
Before submitting this PR, please make sure:

- [ ] Your code builds clean without any errors or warnings
- [ ] Your code follows the code style of this repository (see the wiki)
- [ ] Your code follows [LeviLamina C++ Style Guide](https://github.com/LiteLDev/LeviLamina/wiki/CPP-Style-Guide)
- [ ] You have tested all functions
- [ ] You have not used code without license
- [ ] You have added statement for third-party code
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
pull_request:
push:
workflow_dispatch:

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

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

- run: |
xmake repo -u
- run: |
xmake f -a x64 -m release -p windows -v -y --backend=${{ matrix.backend }}
- run: |
xmake -w -y
- uses: actions/upload-artifact@v3
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
check-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- run: |
npm install [email protected]
- run: |
npx clang-format --dry-run --Werror $(find . -type f -name '*.cpp' -o -name '*.h')
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
on:
release:
types:
- published

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

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

- run: |
xmake repo -u
- run: |
xmake f -a x64 -m release -p windows -v -y --backend=${{ matrix.backend }}
- run: |
xmake -w -y
- uses: actions/upload-artifact@v3
with:
name: legacy-script-engine-${{ matrix.backend }}-windows-x64-${{ github.sha }}
path: |
build/windows/x64/release/legacy-script-engine-${{ matrix.backend }}.dll
upload-to-release:
needs:
- build
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
backend:
- lua
- nodejs
- python310
- quickjs
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
with:
name: legacy-script-engine-${{ matrix.backend }}-windows-x64-${{ github.sha }}
path: release/legacy-script-engine-${{ matrix.backend }}/

- run: |
cp -r assets/${{ matrix.backend }}/* release/legacy-script-engine-${{ matrix.backend }}/
- run: |
cp LICENSE README.md release/
- name: Archive release
run: |
cd release
zip -r ../legacy-script-engine-${{ matrix.backend }}-windows-x64.zip *
cd ..
- uses: softprops/action-gh-release@v1
with:
append_body: true
files: |
legacy-script-engine-${{ matrix.backend }}-windows-x64.zip
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ _deps
## Others
.idea
.vscode

build
docs
lib

# Xmake cache
.xmake/
build/
.cache/

# MacOS Cache
.DS_Store
Loading

0 comments on commit 35f3cd0

Please sign in to comment.