From 54f22afdf8f38688dcad11a4271d8c1fd0b4150b Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Sun, 28 May 2023 21:34:57 +0000 Subject: [PATCH 1/4] chore: revert https://github.com/Distributive-Network/PythonMonkey/pull/22 --- setup.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.sh b/setup.sh index 9433376b..b1f75598 100755 --- a/setup.sh +++ b/setup.sh @@ -19,10 +19,6 @@ tar xf firefox-102.2.0esr.source.tar.xz echo "Done downloading spidermonkey source code" echo "Building spidermonkey" -cd firefox-102.2.0/python/mozbuild/mozbuild -# the build system breaks on Python 3.11 (`io.open()` no longer accepts 'U' in the file mode) -sed -i 's/"rU"/"r"/g' util.py preprocessor.py action/process_define_files.py backend/base.py -cd - cd firefox-102.2.0/js sed -i 's/bool Unbox/JS_PUBLIC_API bool Unbox/g' ./public/Class.h # need to manually add JS_PUBLIC_API to js::Unbox until it gets fixed in Spidermonkey sed -i 's/bool js::Unbox/JS_PUBLIC_API bool js::Unbox/g' ./src/vm/JSObject.cpp # same here From 42aab017c67608874d272e7f36e0ed58fb3bba4f Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Sun, 28 May 2023 22:07:52 +0000 Subject: [PATCH 2/4] chore: extract firefox source code to an unversioned path --- .github/workflows/tests.yaml | 2 +- .gitignore | 4 +--- setup.sh | 5 +++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 722d9f83..7c8c9c28 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -30,7 +30,7 @@ jobs: with: path: | ./build/* - ./firefox-102.2.0/* + ./firefox-source/* ./_spidermonkey_install/* key: ${{ runner.os }}-spidermonkey - name: Build-Library diff --git a/.gitignore b/.gitignore index a66f88ed..7c017144 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,7 @@ bin/ lib/* .pytest_cache .DS_Store -firefox-102.2.0* -firefox-102.2.0/* -firefox-*/* +firefox-*.tar.xz firefox-*/ tests/__pycache__/* tests/python/__pycache__/* diff --git a/setup.sh b/setup.sh index b1f75598..f14f0472 100755 --- a/setup.sh +++ b/setup.sh @@ -15,11 +15,12 @@ echo "Done installing dependencies" echo "Downloading spidermonkey source code" wget -c -q https://ftp.mozilla.org/pub/firefox/releases/102.2.0esr/source/firefox-102.2.0esr.source.tar.xz -tar xf firefox-102.2.0esr.source.tar.xz +mkdir -p firefox-source +tar xf firefox-102.2.0esr.source.tar.xz -C firefox-source --strip-components=1 # strip the root folder echo "Done downloading spidermonkey source code" echo "Building spidermonkey" -cd firefox-102.2.0/js +cd firefox-source/js sed -i 's/bool Unbox/JS_PUBLIC_API bool Unbox/g' ./public/Class.h # need to manually add JS_PUBLIC_API to js::Unbox until it gets fixed in Spidermonkey sed -i 's/bool js::Unbox/JS_PUBLIC_API bool js::Unbox/g' ./src/vm/JSObject.cpp # same here cd src From c1e423e1b418cc47bf87023894fb56803cf24bd1 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Sun, 28 May 2023 22:08:54 +0000 Subject: [PATCH 3/4] chore: upgrade spidermonkey to 102.11.0esr --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index f14f0472..fef0c48b 100755 --- a/setup.sh +++ b/setup.sh @@ -14,9 +14,9 @@ sudo curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y #in echo "Done installing dependencies" echo "Downloading spidermonkey source code" -wget -c -q https://ftp.mozilla.org/pub/firefox/releases/102.2.0esr/source/firefox-102.2.0esr.source.tar.xz +wget -c -q https://ftp.mozilla.org/pub/firefox/releases/102.11.0esr/source/firefox-102.11.0esr.source.tar.xz mkdir -p firefox-source -tar xf firefox-102.2.0esr.source.tar.xz -C firefox-source --strip-components=1 # strip the root folder +tar xf firefox-102.11.0esr.source.tar.xz -C firefox-source --strip-components=1 # strip the root folder echo "Done downloading spidermonkey source code" echo "Building spidermonkey" From 71a3c4e4748d510f8c28f510a810ed94521438f6 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Mon, 29 May 2023 23:24:17 +0000 Subject: [PATCH 4/4] ci: do not cache the `./build` dir --- .github/workflows/test-and-publish.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test-and-publish.yaml b/.github/workflows/test-and-publish.yaml index 1f724908..042d9386 100644 --- a/.github/workflows/test-and-publish.yaml +++ b/.github/workflows/test-and-publish.yaml @@ -38,7 +38,6 @@ jobs: uses: actions/cache@v3 with: path: | - ./build/* ./firefox-source/* ./_spidermonkey_install/* key: ${{ runner.os }}-spidermonkey