Skip to content

Commit

Permalink
build: add ScriptX prebuilt package
Browse files Browse the repository at this point in the history
  • Loading branch information
Zijian Zhang committed Jan 21, 2024
1 parent 6615a6f commit 9305239
Show file tree
Hide file tree
Showing 529 changed files with 818 additions and 108,758 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ body:

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

- type: textarea
attributes:
Expand Down
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

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 [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html)
- [ ] 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
40 changes: 27 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,46 @@ on:

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

- uses: actions/cache@v3
with:
path: |
~/AppData/Local/.xmake
.xmake
key: xmake-legacyscriptengine-windows-x64-${{ github.sha }}
restore-keys: |
xmake-legacyscriptengine-windows-x64-
- uses: xmake-io/github-action-setup-xmake@v1

- run: |
xmake repo -u
- run: |
xmake f -a x64 -m release -p windows -v -y
xmake f -a x64 -m release -p windows -v -y --backend=${{ matrix.backend }}
- run: |
xmake -w -y
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
name: legacy-script-engine-${{ matrix.backend }}-windows-x64-${{ github.sha }}
path: |
bin/
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')
42 changes: 25 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,69 @@ on:

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
xmake f -a x64 -m release -p windows -v -y --backend=${{ matrix.backend }}
- run: |
xmake -w -y
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
name: legacy-script-engine-${{ matrix.backend }}-windows-x64-${{ github.sha }}
path: |
bin/
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: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
path: release/
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 ../${{ github.event.repository.name }}-windows-x64.zip *
zip -r ../legacy-script-engine-${{ matrix.backend }}-windows-x64.zip *
cd ..
- name: Calculate SHA256
id: calculate-sha256
run: |
echo release=$(sha256sum ${{ github.event.repository.name }}-windows-x64.zip | awk '{print $1}') >> $GITHUB_OUTPUT
- uses: softprops/action-gh-release@v1
with:
append_body: true
body: |
| File | SHA256 |
| ---- | ------ |
| ${{ github.event.repository.name }}-windows-x64.zip | ${{ steps.calculate-sha256.outputs.release }} |
files: |
${{ github.event.repository.name }}-windows-x64.zip
legacy-script-engine-${{ matrix.backend }}-windows-x64.zip
Loading

0 comments on commit 9305239

Please sign in to comment.