From cbb4a9d3e070b207d928cd1e0cf8ea6132e3b561 Mon Sep 17 00:00:00 2001
From: Andy Pack <andy@sarsoo.xyz>
Date: Sat, 15 Feb 2025 20:36:16 +0000
Subject: [PATCH] fixing py build, adding py and js to github

---
 .gitea/workflows/build.yml  |  5 ++++
 .github/workflows/build.yml | 46 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml
index 7a2b6cf..8d81eeb 100644
--- a/.gitea/workflows/build.yml
+++ b/.gitea/workflows/build.yml
@@ -39,6 +39,11 @@ jobs:
         with:
           github-server-url: https://gitea.sheep-ghoul.ts.net
 
+      - name: Install Rust
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+
       - name: Install Python 3
         uses: actions/setup-python@v4
         with:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8f4cea8..488685a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -40,13 +40,57 @@ jobs:
         with:
           command: test
 
+  buildPy:
+    name: Build Python
+    runs-on: ubuntu-latest
+    needs: [ build ] # for ignoring bad builds
+    steps:
+      - uses: actions/checkout@v4 # get source
+
+      - name: Install Rust
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+
+      - name: Install Python 3
+        uses: actions/setup-python@v4
+        with:
+          python-version: ${{ env.python-version }}
+
+      - name: Install Maturin
+        run: sudo apt update && sudo apt install -y python3-maturin
+
+      - name: Build Python
+        working-directory: ./pyfinlib
+        run: maturin develop
+
+  buildWASM:
+    name: Build WASM
+    runs-on: ubuntu-latest
+    needs: [ build ] # for ignoring bad builds
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+
+      - name: Install Rust
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+
+      - name: Install wasm-pack
+        run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
+
+      - name: Build Rust for WASM
+        working-directory: ./finlib-wasm
+        run: wasm-pack build
+
   doc:
     name: Build Documentation
     environment:
       name: github-pages
       url: ${{ steps.deployment.outputs.page_url }}
     runs-on: ubuntu-latest
-    needs: [ build ] # for ignoring bad builds
+    needs: [ build, buildPy, buildWASM ] # for ignoring bad builds
     if: github.event_name == 'push' && github.ref == 'refs/heads/master'
     steps:
       - name: Checkout