Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
50ebeb4
Added a sample model addiotion group
Feb 18, 2026
9988862
Replace text area with table view in SampleModel
AndrewSazonov Feb 18, 2026
6353202
Added a sample model name field in popup
Feb 19, 2026
29774b5
Merge branch '9_sample_model_mock_gui' of github.com:easyscience/shap…
Feb 19, 2026
2a5c8cd
Redefined a samplemodel creation popup
Feb 20, 2026
7d85dd3
added a new button for saving samples
Mar 25, 2026
d4ef5a6
updates to mock group components
Apr 22, 2026
1561733
code cleanup
Apr 22, 2026
86b9018
Implemented save button for components groupbox
Apr 22, 2026
8d1ccf3
Fixes to the load components popup
Apr 22, 2026
87a2651
Basic components and samplemodel code cleanup
Apr 27, 2026
f0dcdd8
Made Layers component group
Apr 29, 2026
e0f0388
Added a label to the fractions listview and made it toggleable based …
Apr 29, 2026
df34aa3
Extracted fractions into a reusable component
Apr 29, 2026
966c021
Added lamellae group
Apr 30, 2026
970e9d5
convert to new EasyApp(lication)
May 1, 2026
d2f8c81
separate columns for fractions groups in lamella
May 1, 2026
23c4765
Transfering the sample model's model to mock qml backend
May 4, 2026
2e0b32e
Added structure definition groups
May 6, 2026
a000a7b
fix button widths in lattice structure definition
May 6, 2026
7613f43
solution mock
May 8, 2026
4727be3
adjusted solvent ions columns
May 20, 2026
20c7ba6
adjusted solvent ions columns further
May 20, 2026
4fffb3d
added advanced controls to sample model and basic analysis tab
May 22, 2026
675cb8b
gui makeover following the feedback from chalmers
Jun 25, 2026
db1cab0
primitive preview for mainarea
Jun 29, 2026
99f7c3f
mainarea views drafts
Jun 30, 2026
95d6dec
refactor(sidebar): derive row widths from element count
Jul 27, 2026
fedc38f
added directory dialog for export buttons
Jul 27, 2026
4529152
small fixes to analysis page. Table for mdp bigger
Jul 29, 2026
d6aa35a
add WebAssembly build target: qmake project, C++ entry point, generat…
Jul 29, 2026
ef99cd5
fixes for CI qt installation
Jul 29, 2026
118ddff
fix artifact name: branch slashes are not allowed
Jul 29, 2026
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
164 changes: 164 additions & 0 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# This workflow builds the WebAssembly prototype of the application.
#
# Overview:
# - Checks out shapes-app and EasyApp side by side, the layout the qrc
# and the .pro file expect.
# - Installs the Emscripten SDK and Qt for WebAssembly, both pinned.
# - Regenerates the Qt resource file, so a stale committed qrc cannot
# silently drop QML files from the build.
# - Builds with qmake and uploads the result as an artifact.
#
# The artifact holds a complete static site. Download it, unzip it, serve
# the folder over HTTP and open the .html file. Opening it directly from
# the file system does not work, since browsers refuse to load wasm over
# file:// URLs.
#
# Deployment to GitHub Pages is deliberately not part of this workflow
# yet - see the notes in docs before adding it, since the gh-pages branch
# is owned by the documentation workflow.

name: WebAssembly prototype build

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow only one concurrent build, cancelling anything queued behind it.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Qt for WebAssembly requires an exact Emscripten version. A mismatch
# produces undefined symbols at link time.
# Emsdk 3.1.50 is needed for Qt 6.7
# Emsdk 3.1.56 is needed for Qt 6.8
# Emsdk 3.1.70 is needed for Qt 6.9
# Emsdk 4.0.7 is needed for Qt 6.10 and 6.11
env:
QT_VER: '6.9.0'
QT_VER_NO_DOTS: '690'
EMSDK_VER: '3.1.70'
# Branch of the EasyApp repository holding the EasyApplication QML modules
EASYAPP_REF: selectable_table_view

jobs:
build-wasm:
# macOS, matching the runner the EasyApp wasm workflow uses. The
# Windows host is not a supported build platform for this: the
# wasm-emscripten mkspec emits Unix commands such as cp and sed.
runs-on: macos-14

timeout-minutes: 45

steps:
# The qrc and the .pro reach the framework through a relative path,
# '../../EasyApp/src', so the two repositories must sit next to each
# other exactly as they do in a local workspace.
- name: Checkout shapes-app
uses: actions/checkout@v5
with:
path: shapes-app

- name: Checkout EasyApp
uses: actions/checkout@v5
with:
repository: easyscience/EasyApp
ref: ${{ env.EASYAPP_REF }}
path: EasyApp

- name: Cache emsdk
id: cache-emsdk
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/emsdk
key: ${{ runner.os }}-emsdk-${{ env.EMSDK_VER }}

- name: Install emsdk
if: steps.cache-emsdk.outputs.cache-hit != 'true'
run: |
set -euo pipefail
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${{ env.EMSDK_VER }}
./emsdk activate ${{ env.EMSDK_VER }}

- name: Cache Qt
id: cache-qt
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-qt-${{ env.QT_VER }}-wasm

# Qt Quick 3D backs the 3D structure viewer, Qt Graphs backs the
# charts. Neither is part of the base WebAssembly package.
- name: Install Qt for WebAssembly
if: steps.cache-qt.outputs.cache-hit != 'true'
run: |
set -euo pipefail
curl -fL -O https://download.qt.io/official_releases/online_installers/qt-online-installer-macOS-universal.dmg
hdiutil attach -nobrowse qt-online-installer-macOS-universal.dmg
# The volume and the executable inside carry the installer version
# in their names, so discover them rather than hard-coding one.
VOLUME=$(ls -d /Volumes/qt-online-installer* | head -1)
INSTALLER=$(find "${VOLUME}" -type f -path '*/Contents/MacOS/*' | head -1)
echo "using ${INSTALLER}"
"${INSTALLER}" \
--email ${{ secrets.QT_ACCOUNT_EMAIL }} \
--pw ${{ secrets.QT_ACCOUNT_PASSWORD }} \
--root ${{ github.workspace }}/Qt \
--accept-licenses \
--accept-obligations \
--default-answer \
--confirm-command \
install \
qt.qt6.${{ env.QT_VER_NO_DOTS }}.wasm_singlethread \
qt.qt6.${{ env.QT_VER_NO_DOTS }}.addons.qtquick3d \
qt.qt6.${{ env.QT_VER_NO_DOTS }}.addons.qtgraphs
hdiutil detach "${VOLUME}"

- name: Print toolchain versions
run: |
set -euo pipefail
source ${{ github.workspace }}/emsdk/emsdk_env.sh
em++ --version
export PATH=$PATH:${{ github.workspace }}/Qt/${{ env.QT_VER }}/wasm_singlethread/bin
qmake -v

# The committed qrc is generated. Regenerating here means a QML file
# added without re-running the script locally still reaches the build.
- name: Regenerate the Qt resource file
working-directory: shapes-app
run: |
set -euo pipefail
python3 scripts/gen_qrc.py
git --no-pager diff --stat -- src/easyshapes_app.qrc

- name: Build
working-directory: shapes-app/src
run: |
set -euo pipefail
source ${{ github.workspace }}/emsdk/emsdk_env.sh
export PATH=$PATH:${{ github.workspace }}/Qt/${{ env.QT_VER }}/wasm_singlethread/bin
qmake easyshapes_app.pro -spec wasm-emscripten
make -j$(sysctl -n hw.ncpu)

# qtloader.js and qtlogo.svg are copied next to the binary by the
# build itself. A favicon keeps the dev server from logging a 404.
- name: Collect the built site
run: |
set -euo pipefail
mkdir -p site
cd shapes-app/src
cp easyshapes_app.html easyshapes_app.js easyshapes_app.wasm ../../site/
cp qtloader.js qtlogo.svg ../../site/ 2>/dev/null || true
cd ../../site
cp easyshapes_app.html index.html
ls -lh
# Artifact names cannot contain a forward slash, branches can
echo "REF_SLUG=${GITHUB_REF_NAME//\//-}" >> "${GITHUB_ENV}"

- name: Upload the built site as artifact
uses: ./shapes-app/.github/actions/upload-artifact
with:
name: wasm-prototype_easyshapes-app_${{ env.REF_SLUG }}
path: site/
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ node_modules/

# QtCreator
*.autosave
.qtcreator/

# QtCreator qmake
*.pro.user
*.pro.user.*

# QtCreator Qml
*.qmlproject.user
Expand Down
Loading
Loading