-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from devendrn/laz
Migrate to lazurite
- Loading branch information
Showing
142 changed files
with
919 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,97 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- devel | ||
workflow_dispatch: | ||
inputs: | ||
subversion: | ||
description: 'Sub-version (eg: 46)' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
windows: | ||
runs-on: windows-2019 | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v4 | ||
with: | ||
key: env-files-win | ||
key: env-files-win-laz | ||
path: | | ||
${{ github.workspace }}/env | ||
${{ github.workspace }}/data | ||
- run: .\setup.bat | ||
- run: ./pack.sh -w -p Windows | ||
shell: bash | ||
${{ github.workspace }}/tool/data | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
- run: pip install -r requirements.txt | ||
- run: | | ||
.\build.bat setup | ||
.\build.bat pack -p windows -v ${{ inputs.subversion }} --no-zip | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: newb-x-windows | ||
path: ./build/Windows/temp | ||
path: ./build/pack-windows | ||
android: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v4 | ||
with: | ||
key: env-files-linux | ||
key: env-files-linux-laz | ||
path: | | ||
${{ github.workspace }}/env | ||
${{ github.workspace }}/data | ||
- run: ./setup.sh | ||
- run: ./pack.sh | ||
${{ github.workspace }}/tool/data | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
- run: pip install -r requirements.txt | ||
- run: | | ||
./build.sh setup | ||
./build.sh pack -p android -v ${{ inputs.subversion }} --no-zip | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: newb-x-android | ||
path: ./build/Android/temp | ||
path: ./build/pack-android | ||
ios: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v4 | ||
with: | ||
key: env-files-linux | ||
key: env-files-linux-laz | ||
path: | | ||
${{ github.workspace }}/env | ||
${{ github.workspace }}/data | ||
- run: ./setup.sh | ||
- run: ./build.sh -p iOS | ||
${{ github.workspace }}/tool/data | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
- run: pip install -r requirements.txt | ||
- run: | | ||
./build.sh setup | ||
./build.sh pack -p ios -v ${{ inputs.subversion }} --no-zip | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: newb-x-ios | ||
path: ./build/pack-ios | ||
merged: | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
key: env-files-win-laz | ||
path: | | ||
${{ github.workspace }}/tool/data | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
- run: pip install -r requirements.txt | ||
- run: | | ||
.\build.bat setup | ||
.\build.bat pack -p merged -v ${{ inputs.subversion }} --no-zip | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: newb-x-ios-materials | ||
path: ./build/iOS | ||
name: newb-x-merged | ||
path: ./build/pack-merged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
# ingnore dirs | ||
build/ | ||
data/ | ||
env/ | ||
.bak/ | ||
tool/data/ | ||
tool/lib/ | ||
tool/__pycache__/ | ||
.venv | ||
venv | ||
|
||
# ignore files | ||
copy.sh | ||
*.bin | ||
*.py[cod] | ||
|
||
# eol | ||
* text=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,3 @@ | ||
@echo off | ||
|
||
set MBT=env\bin\MaterialBinTool-0.8.2-native-image.exe | ||
set SHADERC=env\bin\shaderc.exe | ||
|
||
set MBT_ARGS=--compile --shaderc %SHADERC% --include include/ | ||
|
||
set DATA_VER=1.20.0 | ||
set DATA_DIR=data/%DATA_VER% | ||
set BUILD_DIR=build | ||
set MATERIALS_DIR=materials | ||
|
||
set MATERIALS= | ||
set TARGETS= | ||
set ARG_MODE= | ||
:loop_args | ||
if "%1" == "" goto :end_args | ||
if "%1" == "-p" goto :set_arg | ||
if "%1" == "-t" goto :set_arg | ||
if "%1" == "-m" goto :set_arg | ||
|
||
if "%ARG_MODE%" == "" ( | ||
goto :next_arg | ||
) | ||
if "%ARG_MODE%" == "-p" ( | ||
set TARGETS=%TARGETS% %1 | ||
goto :next_arg | ||
) | ||
if "%ARG_MODE%" == "-m" ( | ||
set MATERIALS=%MATERIALS% %MATERIALS_DIR%\%1 | ||
goto :next_arg | ||
) | ||
if "%ARG_MODE%" == "-t" ( | ||
set THREADS=%1 | ||
goto :next_arg | ||
) | ||
:set_arg | ||
set ARG_MODE=%1 | ||
:next_arg | ||
shift | ||
goto :loop_args | ||
:end_args | ||
|
||
if "%TARGETS%" == "" ( | ||
set TARGETS=Windows | ||
) | ||
|
||
if "%MATERIALS%" == "" ( | ||
set MATERIALS=%MATERIALS_DIR%\* | ||
) | ||
|
||
if "%THREADS%" == "" ( | ||
set THREADS=%NUMBER_OF_PROCESSORS% | ||
) | ||
|
||
set MBT_ARGS=%MBT_ARGS% --threads %THREADS% | ||
|
||
for %%f in (%MBT%) do echo %%~nxf | ||
for %%p in (%TARGETS%) do ( | ||
echo --------------------------- | ||
echo ^>^> Building materials - %%p %DATA_VER%: | ||
if exist %DATA_DIR%\%%p ( | ||
for /d %%s in (%MATERIALS%) do ( | ||
echo - %%s | ||
%MBT% %MBT_ARGS% --output %BUILD_DIR%\%%p --data %DATA_DIR%\%%p\%%~nxs %%s | ||
) | ||
) else ( | ||
echo Error: %DATA%\%%p not found | ||
) | ||
) | ||
python tool %* |
Oops, something went wrong.