Update Effekseer #63
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
name: package | |
on: | |
push: | |
branches: | |
- master | |
- 15x | |
- 16x | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- master | |
- 15x | |
- 16x | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: make | |
shell: bash | |
run: | | |
git submodule update --init --depth 1 | |
sh scripts/clone_dependencies.sh | |
source emsdk/emsdk_env.sh | |
pip install dukpy jsmin | |
mkdir build_wasm | |
cd build_wasm | |
emcmake cmake ../src/ -DAS_WASM=ON | |
make | |
cd .. | |
mkdir build_asmjs | |
cd build_asmjs | |
emcmake cmake ../src/ -DAS_WASM=OFF | |
make | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
architecture: 'x64' | |
- name: pip | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install dukpy | |
python -m pip install jsmin | |
- name: run | |
shell: python | |
run: | | |
import os | |
import dukpy | |
import jsmin | |
import shutil | |
os.chdir("build_wasm") | |
license_js = os.path.join("..", "src", "js", "license.js") | |
effekseer_core_js = os.path.join(".", "effekseer.core.js") | |
effekseer_src_js = os.path.join("..", "src", "js", "effekseer.src.js") | |
effekseer_js = os.path.join("..", "Release", "effekseer.js") | |
effekseer_min_js = os.path.join("..", "Release", "effekseer.min.js") | |
outfile_js = open(effekseer_js, "w") | |
outfile_min_js = open(effekseer_min_js, "w") | |
with open(license_js) as infile: | |
data = infile.read() | |
outfile_js.write(data) | |
outfile_min_js.write(data) | |
with open(effekseer_core_js) as infile: | |
data = infile.read() | |
outfile_js.write(data) | |
outfile_min_js.write(data) | |
with open(effekseer_src_js) as infile: | |
data = infile.read() | |
data_es5 = dukpy.babel_compile(data)["code"] | |
outfile_js.write(data_es5) | |
outfile_min_js.write(jsmin.jsmin(data_es5)) | |
shutil.copy('effekseer.core.wasm', '../Release/effekseer.wasm') | |
- name: run | |
shell: python | |
run: | | |
import os | |
import dukpy | |
import jsmin | |
import shutil | |
os.chdir("build_asmjs") | |
license_js = os.path.join("..", "src", "js", "license.js") | |
effekseer_core_js = os.path.join(".", "effekseer.core.js") | |
effekseer_src_js = os.path.join("..", "src", "js", "effekseer.src.js") | |
effekseer_js = os.path.join("..", "Release", "effekseer_asmjs.js") | |
effekseer_min_js = os.path.join("..", "Release", "effekseer_asmjs.min.js") | |
outfile_js = open(effekseer_js, "w") | |
outfile_min_js = open(effekseer_min_js, "w") | |
with open(license_js) as infile: | |
data = infile.read() | |
outfile_js.write(data) | |
outfile_min_js.write(data) | |
with open(effekseer_core_js) as infile: | |
data = infile.read() | |
outfile_js.write(data) | |
outfile_min_js.write(data) | |
with open(effekseer_src_js) as infile: | |
data = infile.read() | |
data_es5 = dukpy.babel_compile(data)["code"] | |
outfile_js.write(data_es5) | |
outfile_min_js.write(jsmin.jsmin(data_es5)) | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: EffekseerForWebGL170 | |
path: Release | |
- name: pip | |
shell: bash | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install chromedriver-binary==105.0.5195.19.0 | |
pip3 install selenium==4.4.3 | |
pip3 install requests | |
- name: test | |
shell: bash | |
run: | | |
cd tests | |
python3 take_screenshot.py | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: screenshots | |
path: tests/screenshots | |
- name: test | |
shell: bash | |
run: | | |
cd tests | |
python3 test.py |