-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(couchjs): add support for SpiderMonkey 91esr #3842
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Ubuntu build CI | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: update | ||
run: sudo apt-get update | ||
- name: install | ||
run: sudo apt-get --no-install-recommends -y install autoconf2.13 build-essential pkg-config libcurl4-openssl-dev erlang-dev rebar elixir | ||
|
||
- name: couch checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: couch | ||
|
||
- name: ICU checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: unicode-org/icu | ||
path: icubuild | ||
|
||
- name: ICU4C with gcc | ||
env: | ||
PREFIX: /usr/local | ||
run: | | ||
cd icubuild | ||
mkdir build; | ||
cd build; | ||
../icu4c/source/runConfigureICU --enable-debug --disable-release Linux/gcc --prefix=$PREFIX --enable-tracing; | ||
make -j2; | ||
make -j2 check; | ||
( cd ../icu4c/source/test/depstest && ./depstest.py ../../../../build/ ); | ||
sudo make install; | ||
|
||
- name: Cache packages | ||
uses: actions/cache@v2 | ||
id: wgetcache | ||
with: | ||
key: wgetcache | ||
path: | | ||
firefox-91.3.0esr.source.tar.xz | ||
foundationdb-clients_6.3.22-1_amd64.deb | ||
foundationdb-server_6.3.22-1_amd64.deb | ||
|
||
- name: wget moz | ||
if: steps.wgetcache.outputs.cache-hit != 'true' | ||
run: wget -q https://www.foundationdb.org/downloads/6.3.22/ubuntu/installers/foundationdb-server_6.3.22-1_amd64.deb https://www.foundationdb.org/downloads/6.3.22/ubuntu/installers/foundationdb-clients_6.3.22-1_amd64.deb https://download.cdn.mozilla.net/pub/firefox/releases/91.3.0esr/source/firefox-91.3.0esr.source.tar.xz | ||
|
||
- name: build spidermonkeycheckout | ||
run: | | ||
tar xf firefox-91.3.0esr.source.tar.xz | ||
export PKG_CONFIG_PATH=${{github.workspace}}/icu/lib/pkgconfig:$PKG_CONFIG_PATH | ||
export AC_MACRODIR=${{github.workspace}}/firefox-91.3.0/build/autoconf/ | ||
cd firefox-91.3.0 | ||
export PYTHON=python3 | ||
export M4=m4 | ||
export AWK=awk | ||
export CFLAGS="-I/usr/local/include" | ||
export LDFLAGS="-L/usr/local/lib" | ||
cd js/src | ||
sh ../../build/autoconf/autoconf.sh --localdir=$PWD configure.in > configure | ||
chmod +x configure | ||
mkdir ${{github.workspace}}/build_OPT.OBJ | ||
cd ${{github.workspace}}/build_OPT.OBJ | ||
${{github.workspace}}/firefox-91.3.0/js/src/configure --prefix=/usr/local --disable-ctypes --disable-jit --disable-jemalloc --enable-optimize --enable-hardening --with-intl-api --build-backends=RecursiveMake --with-system-icu --disable-debug --enable-gczeal | ||
make | ||
sudo make install | ||
|
||
- name: install | ||
run: sudo apt-get --no-install-recommends -y install ./foundationdb-clients_6.3.22-1_amd64.deb ./foundationdb-server_6.3.22-1_amd64.deb | ||
|
||
- name: configure | ||
run: | | ||
cd couch | ||
sed -i -e "s@DRV_CFLAGS -DPIC@DRV_CFLAGS -I/usr/local/include -DPIC@" src/couch/rebar.config.script | ||
sed -i -e "s@DRV_LDFLAGS -lm@DRV_LDFLAGS -L/usr/local/lib -lm@" src/couch/rebar.config.script | ||
sh ./configure --spidermonkey-version=91 --disable-docs | ||
- name: Compile | ||
run: | | ||
cd couch | ||
make release | ||
- name: Run tests | ||
run: | | ||
cd couch | ||
make check |
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change something that ought to be backported to our wrappers for older versions of SpiderMonkey, or is it motivated by something specific in ESR91?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a little of both something that changed and a bug that existed.. Technically it was never correct to do a proper exit() without cleaning up the js context which we can't do in the middle of being called from the js context (and having a shortage of memory its risky to assume we can get a chance to exit later), but it was only in recent versions that mozilla added destructors that notice they are being called with a still active context.
Since it was a bug I saw no problem with keeping it combined and fixing 86 and 78 in the process, but none of the earlier versions should ever get patches again so it probably doesn't need to be backported to the earlier wrappers.