diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 81959bd..d09eb7d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,5 @@ name: main CI workflow for PR -permissions: read-all concurrency: group: ci-${{ github.ref }} @@ -47,6 +46,61 @@ jobs: run: make clippy + build-web: + name: Build web lib + runs-on: ubuntu-latest + + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + + - name: install wasm target + run: rustup target add ${{ env.WASI_TARGET }} + + + - name: Setup Rust Cache + uses: Swatinem/rust-cache@v2 + timeout-minutes: 10 + + - name: Build web + run: make -C crates/fluvio-web build + + + build-widget: + name: Build widget + runs-on: ubuntu-latest + + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + + - name: install wasm target + run: rustup target add ${{ env.WASI_TARGET }} + + + - name: Setup Rust Cache + uses: Swatinem/rust-cache@v2 + timeout-minutes: 10 + + - name: install trunk + run: | + curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash + cargo binstall trunk + + + - name: Build widget + run: make -C widgets/counter build + # To satisfy the merge queue check @@ -54,6 +108,8 @@ jobs: name: Done needs: - check + - build-web + - build-widget runs-on: ubuntu-latest if: always() steps: diff --git a/Makefile b/Makefile index c338f28..b820d46 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ WASM_TARGET = wasm32-unknown-unknown -RELEASE = v0.2.0 +RELEASE = v0.2.1 fmt: cargo fmt -- --check diff --git a/crates/fluvio-web/Makefile b/crates/fluvio-web/Makefile index d7c6e8c..7d9b0be 100644 --- a/crates/fluvio-web/Makefile +++ b/crates/fluvio-web/Makefile @@ -1,14 +1,6 @@ -BASE_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/../../) -include $(BASE_DIR)/common.mk - PROJ_NAME = fluvio-web -build: - cargo build -p $(PROJ_NAME) $(WASM_BUILD_SETTING) +TARGET=--target wasm32-unknown-unknown -# init directory to satify clippy -fake_dist: - mkdir -p release/dist - -clean: - rm -rf release/dist \ No newline at end of file +build: + cargo build -p $(PROJ_NAME) $(WASM_BUILD_SETTING) $(TARGET) diff --git a/crates/fluvio-web/src/fluvio.rs b/crates/fluvio-web/src/fluvio.rs index 5a3a9a9..552a303 100644 --- a/crates/fluvio-web/src/fluvio.rs +++ b/crates/fluvio-web/src/fluvio.rs @@ -46,6 +46,7 @@ impl AppServices { parsed_query.token } else { + #[cfg(feature = "leptos")] leptos::logging::log!("No query in fluvio conn string"); None }; diff --git a/widgets/counter/Makefile b/widgets/counter/Makefile index 2ae9d41..af28f0f 100644 --- a/widgets/counter/Makefile +++ b/widgets/counter/Makefile @@ -1,9 +1,15 @@ build: - trunk build --config release/Trunk.toml + trunk build --config dev/Trunk.toml serve: trunk serve --config dev/Trunk.toml + +dist: + trunk build --config release/Trunk.toml + + + RELEASE_TAG = v0.1.0