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

cargo(build): expose tls for next-binding #3040

Merged
merged 1 commit into from
Dec 17, 2022
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
19 changes: 15 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ jobs:
# next-swc/core
cargo check -p next-binding --features __swc_core_next_core,__swc_core_binding_napi_plugin,__swc_core_testing_transform,__swc_testing,__swc_transform_styled_components,__swc_transform_styled_jsx,__swc_transform_emotion,__swc_transform_modularize_imports
# next-swc/napi
cargo check -p next-binding --features __swc_core_binding_napi,__swc_core_binding_napi_plugin,__turbo_next_dev_server,__turbo_node_file_trace,__feature_mdx_rs
cargo check -p next-binding --features __swc_core_binding_napi,__swc_core_binding_napi_plugin,__turbo_next_dev_server,__turbo_node_file_trace,__feature_mdx_rs,__turbo_native_tls
cargo check -p next-binding --features __swc_core_binding_napi,__swc_core_binding_napi_plugin,__turbo_next_dev_server,__turbo_node_file_trace,__feature_mdx_rs,__turbo_rustls_tls
# next-swc/wasm
cargo check -p next-binding --features __swc_core_binding_wasm,__swc_core_binding_wasm_plugin,__feature_mdx_rs --target wasm32-unknown-unknown

Expand Down Expand Up @@ -637,12 +638,19 @@ jobs:
args: build --release -p node-file-trace -p next-dev --target ${{ matrix.os.target }}
if: matrix.os.target == 'x86_64-pc-windows-msvc'

- name: Build next-dev
- name: Build next-dev (native-tls)
uses: actions-rs/cargo@v1
with:
command: build
args: --release -p next-dev --target ${{ matrix.os.target }}
if: matrix.os.target != 'x86_64-pc-windows-msvc'
if: matrix.os.target != 'x86_64-pc-windows-msvc' && matrix.os.target != 'x86_64-unknown-linux-musl'

- name: Build next-dev (rustls-tls)
uses: actions-rs/cargo@v1
with:
command: build
args: --release -p next-dev --target ${{ matrix.os.target }} --no-default-features --features cli,custom_allocator,rustls-tls
if: matrix.os.target == 'x86_64-unknown-linux-musl'

- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -883,7 +891,10 @@ jobs:
pnpm install
pnpm run build

- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
- run: |
pnpm i -g playwright-chromium@1.29.0
pnpx playwright install --with-deps
pnpx playwright install-deps
timeout-minutes: 15

- run: npx @replayio/playwright install chromium
Expand Down
9 changes: 8 additions & 1 deletion crates/next-binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ __turbo = []
__turbo_next_dev_server = ["__turbo", "next-dev/serializable"]
__turbo_node_file_trace = ["__turbo", "node-file-trace/node-api"]

# set tls for downstream dependenices of turbo
__turbo_native_tls = ["next-dev/native-tls"]
__turbo_rustls_tls = ["next-dev/rustls-tls"]

__features = []
__feature_mdx_rs = ["__features", "mdxjs/serializable"]

Expand All @@ -98,7 +102,10 @@ __swc_testing = ["__swc", "testing"]
[dependencies]
mdxjs = { optional = true, workspace = true }
modularize_imports = { optional = true, workspace = true }
next-dev = { optional = true, workspace = true }
# TODO: Not sure what's going on, but using `workspace = true` noops `default-features = false`?
next-dev = { optional = true, path = "../next-dev", version = "0.1.0", default-features = false, features = [
"custom_allocator",
] }
node-file-trace = { optional = true, workspace = true }
styled_components = { optional = true, workspace = true }
styled_jsx = { optional = true, workspace = true }
Expand Down