Skip to content

Commit

Permalink
Remove jsstreams (#540)
Browse files Browse the repository at this point in the history
* remove jsstreams patch

Signed-off-by: sagudev <[email protected]>

* remove streams from mozjs-sys

Signed-off-by: sagudev <[email protected]>

* remove streams from mozjs

Signed-off-by: sagudev <[email protected]>

* remove streams from CI

Signed-off-by: sagudev <[email protected]>

---------

Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev authored Dec 21, 2024
1 parent bb560b6 commit 29d28f6
Show file tree
Hide file tree
Showing 58 changed files with 18 additions and 18,067 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
features: ["debugmozjs", "streams"]
features: ["debugmozjs", '""']
platform:
- { target: aarch64-apple-darwin, os: macos-14 }
- { target: x86_64-apple-darwin, os: macos-13 }
Expand All @@ -45,12 +45,12 @@ jobs:
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
if: ${{ inputs.release && contains(matrix.features, 'streams') }}
if: ${{ inputs.release && matrix.features != 'debugmozjs' }}
with:
subject-path: ./target/libmozjs-${{ matrix.platform.target }}.tar.gz

- name: Upload artifact
if: ${{ contains(matrix.features, 'streams') }}
if: ${{ matrix.features != 'debugmozjs' }}
uses: actions/upload-artifact@v4
with:
path: ./target/libmozjs-${{ matrix.platform.target }}.tar.gz
Expand All @@ -65,7 +65,7 @@ jobs:
strategy:
fail-fast: false
matrix:
features: ["debugmozjs", "streams"]
features: ["debugmozjs", '""']
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -80,19 +80,19 @@ jobs:
cargo test --tests --examples --verbose --features ${{ matrix.features }}
- name: Check wrappers integrity
# we generate wrappers only without debugmozjs
if: ${{ matrix.features == 'streams' }}
if: ${{ matrix.features != 'debugmozjs' }}
run: |
bash ./mozjs/src/generate_wrappers.sh
git diff --quiet --exit-code
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
if: ${{ inputs.release && contains(matrix.features, 'streams') }}
if: ${{ inputs.release && matrix.features != 'debugmozjs' }}
with:
subject-path: ./target/libmozjs-x86_64-unknown-linux-gnu.tar.gz

- name: Upload artifact
if: ${{ contains(matrix.features, 'streams') }}
if: ${{ matrix.features != 'debugmozjs' }}
uses: actions/upload-artifact@v4
with:
path: ./target/libmozjs-x86_64-unknown-linux-gnu.tar.gz
Expand All @@ -103,7 +103,7 @@ jobs:
strategy:
fail-fast: false
matrix:
features: ["debugmozjs", "streams"]
features: ["debugmozjs", '""']
target: ["x86_64-pc-windows-msvc", "aarch64-pc-windows-msvc"]
env:
LINKER: "lld-link.exe"
Expand Down Expand Up @@ -135,12 +135,12 @@ jobs:
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
if: ${{ inputs.release && !contains(matrix.target, 'aarch64') && contains(matrix.features, 'streams') }}
if: ${{ inputs.release && !contains(matrix.target, 'aarch64') && matrix.features != 'debugmozjs' }}
with:
subject-path: ./target/${{ matrix.target }}/libmozjs-x86_64-pc-windows-msvc.tar.gz

- name: Upload artifact
if: ${{ !contains(matrix.target, 'aarch64') && contains(matrix.features, 'streams') }}
if: ${{ !contains(matrix.target, 'aarch64') && matrix.features != 'debugmozjs' }}
uses: actions/upload-artifact@v4
with:
path: ./target/${{ matrix.target }}/libmozjs-x86_64-pc-windows-msvc.tar.gz
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
env:
OHOS_SDK_NATIVE: ${{ steps.setup_sdk.outputs.ohos_sdk_native }}
run: |
./ohos-build cargo build --target="${{ matrix.target }}" --features "streams"
./ohos-build cargo build --target="${{ matrix.target }}"
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
if: ${{ inputs.release }}
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Version Release Check

on:
Expand Down Expand Up @@ -40,15 +39,15 @@ jobs:
env:
MOZJS_ARCHIVE: libmozjs-${{ matrix.platform.target }}.tar.gz
run: |
cargo build --verbose --features streams
cargo test --tests --examples --verbose --features streams
cargo build --verbose
cargo test --tests --examples --verbose
- name: Build from auto-download
if: ${{ env.RELEASE_TAG != '' }}
env:
MOZJS_ATTESTATION: strict
run: |
cargo build --verbose --features streams
cargo test --tests --examples --verbose --features streams
cargo build --verbose
cargo test --tests --examples --verbose
verify-archive-ohos:
name: "Verify archive OpenHarmony"
Expand Down Expand Up @@ -80,11 +79,11 @@ jobs:
OHOS_SDK_NATIVE: ${{ steps.setup_sdk.outputs.ohos_sdk_native }}
MOZJS_ARCHIVE: libmozjs-${{ matrix.target }}.tar.gz
run: |
./ohos-build cargo build --target="${{ matrix.target }}" --verbose --features streams
./ohos-build cargo build --target="${{ matrix.target }}" --verbose
- name: Build from auto-download (arch ${{ matrix.target }})
if: ${{ env.RELEASE_TAG != '' }}
env:
OHOS_SDK_NATIVE: ${{ steps.setup_sdk.outputs.ohos_sdk_native }}
MOZJS_ATTESTATION: strict
run: |
./ohos-build cargo build --target="${{ matrix.target }}" --verbose --features "streams"
./ohos-build cargo build --target="${{ matrix.target }}" --verbose
3 changes: 1 addition & 2 deletions mozjs-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "mozjs_sys"
description = "System crate for the Mozilla SpiderMonkey JavaScript engine."
repository.workspace = true
version = "0.128.3-8"
version = "0.128.3-9"
authors = ["Mozilla"]
links = "mozjs"
build = "build.rs"
Expand All @@ -26,7 +26,6 @@ doctest = false
debugmozjs = []
profilemozjs = []
jitspew = []
streams = []

[dependencies]
libc.workspace = true
Expand Down
3 changes: 0 additions & 3 deletions mozjs-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ fn should_build_from_source() -> bool {
} else if env::var_os("CARGO_FEATURE_DEBUGMOZJS").is_some() {
println!("debug-mozjs feature is enabled. Building from source directly.");
true
} else if !env::var_os("CARGO_FEATURE_STREAMS").is_some() {
println!("streams feature isn't enabled. Building from source directly.");
true
} else {
false
}
Expand Down
Loading

0 comments on commit 29d28f6

Please sign in to comment.