Web interface #525

Closed
Sirherobrine23 wants to merge 7 commits from web-interface into main
63 changed files with 2841 additions and 1069 deletions
Showing only changes of commit 60d0a5f2d8 - Show all commits

View File

@ -48,7 +48,7 @@ jobs:
continue-on-error: true continue-on-error: true
timeout-minutes: 40 timeout-minutes: 40
run: | run: |
./compile.sh -t android-aarch64 -x -f -g -j$(nproc) ./compile.sh -t android-aarch64 -x -f -g -j$(nproc) -P 5
# Compress files # Compress files
cd bin/php*/ cd bin/php*/
pwd pwd
@ -71,7 +71,10 @@ jobs:
target: target:
- ubuntu-latest - ubuntu-latest
- arm64 - arm64
name: "Linux - ${{ matrix.target }}" pm-version-major:
- 4
- 5
name: "Linux (PM ${{ matrix.pm-version-major }} - ${{ matrix.target }})"
runs-on: ${{ matrix.target }} runs-on: ${{ matrix.target }}
steps: steps:
- name: Clone Repository - name: Clone Repository
@ -90,7 +93,7 @@ jobs:
timeout-minutes: 40 timeout-minutes: 40
run: | run: |
set -ex set -ex
./compile.sh -j 4 -f -g -s ./compile.sh -j 4 -f -g -s -P ${{ matrix.pm-version-major }}
# Compress files # Compress files
cd bin/php*/ cd bin/php*/
@ -103,15 +106,18 @@ jobs:
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: linux_${{ runner.arch }} name: linux_PM${{ matrix.pm-version-major }}_${{ runner.arch }}
path: | path: |
*.tar.gz *.tar.gz
*.zip *.zip
# MacOS Build # MacOS Build
macos: macos:
runs-on: macos-11 name: MacOS (PM ${{ matrix.pm-version-major }})
name: MacOS runs-on: macos-11.0
strategy:
matrix:
pm-version-major: [ 4, 5 ]
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -129,29 +135,33 @@ jobs:
export PATH="/usr/local/opt/bison/bin:$PATH" export PATH="/usr/local/opt/bison/bin:$PATH"
set -ex set -ex
trap "exit 1" ERR trap "exit 1" ERR
./compile.sh -j4 -f -g || (cat *.log && exit 1) ./compile.sh -t mac-x86-64 -j4 -f -g -P ${{ matrix.pm-version-major }}
- name: Create tarballs - name: Create tarballs
run: | run: |
cd bin/*/ cd bin/
pwd pwd
ARCH="$(node -e 'console.log(process.arch)')"
# ZIP # ZIP
zip -r "${{ github.workspace }}/darwin_${{ runner.arch }}.zip" * zip -r "${{ github.workspace }}/darwin_${ARCH}.zip" *
# tar # tar
tar -czf "${{ github.workspace }}/darwin_${{ runner.arch }}.tar.gz" * tar -czf "${{ github.workspace }}/darwin_${ARCH}.tar.gz" *
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: darwin_${{ runner.arch }} name: darwin_PM${{ matrix.pm-version-major }}_${{ runner.arch }}
path: | path: |
*.tar.gz *.tar.gz
*.zip *.zip
# Windows build # Windows build
win32: win32:
name: Windows (PM ${{ matrix.pm-version-major }})
runs-on: windows-2019 runs-on: windows-2019
name: Windows strategy:
matrix:
pm-version-major: [ 4, 5 ]
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -167,10 +177,7 @@ jobs:
env: env:
VS_EDITION: Enterprise VS_EDITION: Enterprise
SOURCES_PATH: ${{ github.workspace }}\pocketmine-php-sdk SOURCES_PATH: ${{ github.workspace }}\pocketmine-php-sdk
PM_VERSION_MAJOR: ${{ matrix.pm-version-major }}
- name: show log
if: failure()
run: type compile.log
- name: Rename files - name: Rename files
shell: node {0} shell: node {0}
@ -181,13 +188,13 @@ jobs:
for (const zip of files) { for (const zip of files) {
console.log("File:", path.join(process.cwd(), zip)); console.log("File:", path.join(process.cwd(), zip));
if (/debug/i.test(zip)) fs.rmSync(path.join(process.cwd(), zip)); if (/debug/i.test(zip)) fs.rmSync(path.join(process.cwd(), zip));
else fs.renameSync(path.join(process.cwd(), zip), path.join(process.cwd(), "win32_x64.zip")); else fs.renameSync(path.join(process.cwd(), zip), path.join(process.cwd(), `win32_${process.arch}_pm${{ matrix.pm-version-major }}.zip`));
} }
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: Windows name: Windows_PM${{ matrix.pm-version-major }}_${{ runner.arch }}
path: "*.zip" path: "*.zip"
# Upload to bucket # Upload to bucket
@ -222,7 +229,7 @@ jobs:
IFS=$'\n' IFS=$'\n'
for file in $(find . -type f) for file in $(find . -type f)
do do
echo "Working on ${file} ..." echo "${file} => $(basename "$file")"
mv -v "$file" "$(basename "$file")" mv -v "$file" "$(basename "$file")"
done done
IFS="$OIFS" IFS="$OIFS"