mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-02 17:52:19 +00:00
Use Node JS for building duktape library (#248)
* Use Node JS for building duktape library * Remove Python 2 dependency * Inherit PATH from environment in Actions Remove build cache of the msys2 installation in Travis CI. * Remove old command
This commit is contained in:
1 parent
629b1bf222
commit
c0b62062d9
3 files changed
+19
-13
No files matched your search
@@ -49,10 +49,15 @@ jobs:
|
|||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2-beta
|
||||||
|
with:
|
||||||
|
node-version: '12'
|
||||||
- uses: msys2/setup-msys2@v2
|
- uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
update: true
|
update: true
|
||||||
install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 python2 python2-pip
|
install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2
|
||||||
|
msystem: MINGW64
|
||||||
|
path-type: inherit
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bash scripts/build.windows.release.sh
|
run: bash scripts/build.windows.release.sh
|
||||||
- name: Upload
|
- name: Upload
|
||||||
@@ -69,11 +74,15 @@ jobs:
|
|||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2-beta
|
||||||
|
with:
|
||||||
|
node-version: '12'
|
||||||
- uses: msys2/setup-msys2@v2
|
- uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
update: true
|
update: true
|
||||||
install: base-devel git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-libevent mingw-w64-i686-pcre2 python2 python2-pip
|
install: base-devel git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-libevent mingw-w64-i686-pcre2
|
||||||
msystem: MINGW32
|
msystem: MINGW32
|
||||||
|
path-type: inherit
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bash scripts/build.windows.release.sh
|
run: bash scripts/build.windows.release.sh
|
||||||
- name: Upload
|
- name: Upload
|
||||||
|
|||||||
+4
-6
@@ -87,13 +87,13 @@ jobs:
|
|||||||
- |-
|
- |-
|
||||||
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
|
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
|
||||||
choco uninstall -y mingw
|
choco uninstall -y mingw
|
||||||
choco upgrade --no-progress -y msys2
|
choco upgrade --no-progress -y msys2 nodejs
|
||||||
export msys2='cmd //C RefreshEnv.cmd '
|
export msys2='cmd //C RefreshEnv.cmd '
|
||||||
export msys2+='& set MSYS=winsymlinks:nativestrict '
|
export msys2+='& set MSYS=winsymlinks:nativestrict '
|
||||||
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
|
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
|
||||||
export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
|
export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
|
||||||
export msys2+=" -msys2 -c "\"\$@"\" --"
|
export msys2+=" -msys2 -c "\"\$@"\" --"
|
||||||
$msys2 pacman --sync --noconfirm --needed base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 python2 python2-pip
|
$msys2 pacman --sync --noconfirm --needed base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2
|
||||||
taskkill //IM gpg-agent.exe //F
|
taskkill //IM gpg-agent.exe //F
|
||||||
export PATH=/C/tools/msys64/mingw64/bin:$PATH
|
export PATH=/C/tools/msys64/mingw64/bin:$PATH
|
||||||
export MAKE=make
|
export MAKE=make
|
||||||
@@ -103,7 +103,6 @@ jobs:
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/AppData/Local/Temp/chocolatey
|
- $HOME/AppData/Local/Temp/chocolatey
|
||||||
- /C/tools/msys64
|
|
||||||
script:
|
script:
|
||||||
- $mingw64 bash scripts/build.windows.release.sh
|
- $mingw64 bash scripts/build.windows.release.sh
|
||||||
before_deploy:
|
before_deploy:
|
||||||
@@ -122,13 +121,13 @@ jobs:
|
|||||||
- |-
|
- |-
|
||||||
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
|
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
|
||||||
choco uninstall -y mingw
|
choco uninstall -y mingw
|
||||||
choco upgrade --no-progress -y msys2
|
choco upgrade --no-progress -y msys2 nodejs
|
||||||
export msys2='cmd //C RefreshEnv.cmd '
|
export msys2='cmd //C RefreshEnv.cmd '
|
||||||
export msys2+='& set MSYS=winsymlinks:nativestrict '
|
export msys2+='& set MSYS=winsymlinks:nativestrict '
|
||||||
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
|
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
|
||||||
export mingw32="$msys2 -mingw32 -full-path -here -c "\"\$@"\" --"
|
export mingw32="$msys2 -mingw32 -full-path -here -c "\"\$@"\" --"
|
||||||
export msys2+=" -msys2 -c "\"\$@"\" --"
|
export msys2+=" -msys2 -c "\"\$@"\" --"
|
||||||
$msys2 pacman --sync --noconfirm --needed base-devel git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-libevent mingw-w64-i686-pcre2 python2 python2-pip
|
$msys2 pacman --sync --noconfirm --needed base-devel git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-libevent mingw-w64-i686-pcre2
|
||||||
taskkill //IM gpg-agent.exe //F
|
taskkill //IM gpg-agent.exe //F
|
||||||
export PATH=/C/tools/msys64/mingw64/bin:$PATH
|
export PATH=/C/tools/msys64/mingw64/bin:$PATH
|
||||||
export MAKE=make
|
export MAKE=make
|
||||||
@@ -138,7 +137,6 @@ jobs:
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/AppData/Local/Temp/chocolatey
|
- $HOME/AppData/Local/Temp/chocolatey
|
||||||
- /C/tools/msys64
|
|
||||||
script:
|
script:
|
||||||
- $mingw32 bash scripts/build.windows.release.sh
|
- $mingw32 bash scripts/build.windows.release.sh
|
||||||
before_deploy:
|
before_deploy:
|
||||||
|
|||||||
@@ -15,10 +15,9 @@ cd ..
|
|||||||
|
|
||||||
git clone https://github.com/svaarala/duktape --depth=1
|
git clone https://github.com/svaarala/duktape --depth=1
|
||||||
cd duktape
|
cd duktape
|
||||||
pip2 install PyYAML
|
make -C src-tools
|
||||||
mkdir dist
|
node src-tools/index.js dist --output-directory dist
|
||||||
python2 util/dist.py
|
cd dist/src
|
||||||
cd dist/source/src
|
|
||||||
gcc -c -O3 -o duktape.o duktape.c
|
gcc -c -O3 -o duktape.o duktape.c
|
||||||
gcc -c -O3 -o duk_module_node.o -I. ../extras/module-node/duk_module_node.c
|
gcc -c -O3 -o duk_module_node.o -I. ../extras/module-node/duk_module_node.c
|
||||||
ar cr libduktape.a duktape.o
|
ar cr libduktape.a duktape.o
|
||||||
@@ -26,7 +25,7 @@ ar cr libduktape_module.a duk_module_node.o
|
|||||||
install -m0644 ./*.a "$MINGW_PREFIX/lib"
|
install -m0644 ./*.a "$MINGW_PREFIX/lib"
|
||||||
install -m0644 ./duk*.h "$MINGW_PREFIX/include"
|
install -m0644 ./duk*.h "$MINGW_PREFIX/include"
|
||||||
install -m0644 ../extras/module-node/duk_module_node.h "$MINGW_PREFIX/include"
|
install -m0644 ../extras/module-node/duk_module_node.h "$MINGW_PREFIX/include"
|
||||||
cd ../../../..
|
cd ../../..
|
||||||
|
|
||||||
git clone https://github.com/Tencent/rapidjson --depth=1
|
git clone https://github.com/Tencent/rapidjson --depth=1
|
||||||
cd rapidjson
|
cd rapidjson
|
||||||
|
|||||||
Reference in new issue
Block a user