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

Check matrix-sdk-ui compilation on wasm in CI #4545

Merged
merged 5 commits into from
Jan 17, 2025
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
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,16 @@ jobs:
- name: '[m]-common'
cmd: matrix-sdk-common

- name: '[m], no-default'
cmd: matrix-sdk-no-default

- name: '[m]-ui'
cmd: matrix-sdk-ui
check_only: true

- name: '[m]-indexeddb'
cmd: indexeddb

- name: '[m], no-default, wasm-flags'
cmd: matrix-sdk-no-default

- name: '[m], indexeddb stores'
cmd: matrix-sdk-indexeddb-stores

Expand All @@ -248,6 +252,7 @@ jobs:

- name: Install wasm-pack
uses: qmaru/[email protected]
if: '!matrix.check_only'
with:
version: v0.10.3

Expand Down Expand Up @@ -277,6 +282,7 @@ jobs:
target/debug/xtask ci wasm ${{ matrix.cmd }}

- name: Wasm-Pack test
if: '!matrix.check_only'
run: |
target/debug/xtask ci wasm-pack ${{ matrix.cmd }}

Expand Down
1 change: 1 addition & 0 deletions crates/matrix-sdk-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ default = ["native-tls"]
native-tls = ["matrix-sdk/native-tls"]
rustls-tls = ["matrix-sdk/rustls-tls"]

js = ["matrix-sdk/js"]
uniffi = ["dep:uniffi", "matrix-sdk/uniffi", "matrix-sdk-base/uniffi"]

# Add support for encrypted extensible events.
Expand Down
3 changes: 3 additions & 0 deletions crates/matrix-sdk-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![cfg_attr(target_arch = "wasm32", allow(clippy::arc_with_non_send_sync))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

use ruma::html::HtmlSanitizerMode;

mod events;
Expand Down
3 changes: 3 additions & 0 deletions xtask/src/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ enum WasmFeatureSet {
MatrixSdkCommon,
/// Check `matrix-sdk` crate with no default features
MatrixSdkNoDefault,
/// Check `matrix-sdk-ui` crate
MatrixSdkUi,
/// Check `matrix-sdk` crate with `indexeddb` feature (but not
/// `e2e-encryption`)
MatrixSdkIndexeddbStoresNoCrypto,
Expand Down Expand Up @@ -303,6 +305,7 @@ fn run_wasm_checks(cmd: Option<WasmFeatureSet>) -> Result<()> {
),
(WasmFeatureSet::MatrixSdkBase, "-p matrix-sdk-base --features js,test-send-sync"),
(WasmFeatureSet::MatrixSdkCommon, "-p matrix-sdk-common --features js"),
(WasmFeatureSet::MatrixSdkUi, "-p matrix-sdk-ui --features js"),
(
WasmFeatureSet::MatrixSdkIndexeddbStoresNoCrypto,
"-p matrix-sdk --no-default-features --features js,indexeddb,rustls-tls",
Expand Down
Loading