Skip to content
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

Remove jsstreams #540

Merged
merged 4 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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' }}
sagudev marked this conversation as resolved.
Show resolved Hide resolved
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
Loading