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

Testing liveview-native-core against the phoenix-live-view js tests #135

Merged
merged 19 commits into from
Sep 4, 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
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,35 @@ jobs:
- name: Cargo fmt
run: cargo fmt --all -- --check

wasm:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ./tests/support/test_server/

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
targets: wasm32-unknown-unknown

- name: Builb wasm
run: cargo build --target wasm32-unknown-unknown -p liveview_native_core_wasm

- uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen

- name: Builb wasm for nodesjs
working-directory: ./crates/wasm
run: ./build.sh nodejs

- name: Builb wasm for web
working-directory: ./crates/wasm
run: ./build.sh web

clippy:
runs-on: ubuntu-24.04
steps:
Expand Down
55 changes: 53 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,44 @@ env:
CARGO_MAKE_TOOLCHAIN: nightly

jobs:
build-wasm:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
targets:
wasm32-unknown-unknown
- uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen

- name: Builb wasm for nodesjs
working-directory: ./crates/wasm
run: ./build.sh nodejs

- name: Builb wasm for web
working-directory: ./crates/wasm
run: ./build.sh web

- uses: actions/upload-artifact@v4
with:
retention-days: 5
name: liveview-native-core-wasm-web
path: ./crates/wasm/liveview-native-core-wasm-web.tgz

- uses: actions/upload-artifact@v4
with:
retention-days: 5
name: liveview-native-core-wasm-nodejs
path: ./crates/wasm/liveview-native-core-wasm-nodejs.tgz

build-xcframework:
runs-on: macos-14

Expand Down Expand Up @@ -84,6 +122,17 @@ jobs:
name: liveview_native_core.xcframework.zip
path: ./target/uniffi/swift/

- uses: actions/download-artifact@v4
with:
name: liveview-native-core-wasm-web
path: ./crates/wasm/
- uses: actions/download-artifact@v4
with:
name: liveview-native-core-wasm-nodejs
path: ./crates/wasm/

- run: ls ./crates/wasm/ ./crates/wasm/*

- name: Update version and checksum of xcframework in Package.swift
run: |
ls -lah ./target/uniffi/swift/
Expand All @@ -105,12 +154,14 @@ jobs:
git tag -fa ${{ github.event.release.tag_name }} -m "Swift Package Release ${{ github.event.release.tag_name }}"
git push origin ${{ github.event.release.tag_name }} --force


- name: Release
uses: softprops/action-gh-release@v2
if: github.event_name == 'release'
with:
files: ./target/uniffi/swift/liveview_native_core.xcframework.zip
files: |
./target/uniffi/swift/liveview_native_core.xcframework.zip
./crates/wasm/liveview-native-core-wasm-web.tgz
./crates/wasm/liveview-native-core-wasm-nodejs.tgz
draft: true
prerelease: true
tag_name: ${{ github.event.release.tag_name }}
144 changes: 134 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading