Skip to content

Commit

Permalink
Build and deploy tune-cli web version
Browse files Browse the repository at this point in the history
  • Loading branch information
Woyten committed May 16, 2024
1 parent 8c58d06 commit 155989c
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 71 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/build-microwave-web.yml

This file was deleted.

105 changes: 105 additions & 0 deletions .github/workflows/deploy-web-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Deploy web artifacts

on:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"

jobs:
create-tune-cli-web-version:
name: Create tune-cli web version

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Install trunk
run: cargo install trunk
- name: Build tune-cli
run: |
cd tune-web
trunk build --release
cd ..
mkdir -p artifact
mv tune-web/dist/* artifact
- name: Upload tune-cli
uses: actions/upload-artifact@v4
with:
name: tune-cli-wasm
path: artifact
if-no-files-found: error

create-microwave-web-version:
name: Create microwave web version

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Install trunk
run: cargo install trunk
- name: Build microwave
run: |
cd microwave
trunk build --release
cd ..
mkdir -p artifact
mv microwave/dist/* artifact
- name: Upload microwave
uses: actions/upload-artifact@v4
with:
name: microwave-wasm
path: artifact
if-no-files-found: error
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: artifact

deploy-github-pages:
name: Deploy microwave web version to GitHub pages

needs:
- create-tune-cli-web-version
- create-microwave-web-version

runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Download tune-cli artifact
uses: actions/download-artifact@v4
with:
name: tune-cli-wasm
path: artifact/tune-cli
- name: Download microwave artifact
uses: actions/download-artifact@v4
with:
name: microwave-wasm
path: artifact/microwave
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: artifact
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

2 changes: 0 additions & 2 deletions .github/workflows/run-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ jobs:
target: wasm32-unknown-unknown
- name: Ensure all lints pass
run: cargo clippy --workspace --target wasm32-unknown-unknown
- name: Build
run: cargo build --workspace --target wasm32-unknown-unknown
10 changes: 5 additions & 5 deletions microwave/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The built-in modular synthesis engine does not use any fixed architecture and ca
## Resources

- [Download / Changelog](https://github.com/Woyten/tune/releases)
- [Browser Application](https://woyten.github.io/microwave/launcher.html)
- [Browser Application](https://woyten.github.io/tune/microwave/launcher.html)
- Demo: [Xênerie (15-EDO)](https://youtu.be/0PczKDrOdUA)
- Demo: [Don't Take Five (16-EDO)](https://youtu.be/LLgClI8pyNw)
- Demo: [The Bedoginning (17-EDO)](https://youtu.be/gaYvK9OBHK0)
Expand Down Expand Up @@ -93,7 +93,7 @@ Irregular custom layout:

Option A: Run `microwave` in a web browser without installing any additional software.

- [microwave (Browser)](https://woyten.github.io/microwave/launcher.html)
- [microwave (Browser)](https://woyten.github.io/tune/microwave/launcher.html)

Option B: Download a precompiled version of `microwave` for the supported target architectures:

Expand All @@ -115,7 +115,7 @@ sudo apt install pkg-config
cargo install -f microwave
```

`microwave` should run out-of-the box on a recent (Ubuntu) Linux, Windows or macOS installation. If it doesn't, the problem is probably caused by the Bevy framework. In that case, try following these [instructions](https://bevyengine.org/learn/book/getting-started/setup/).
`microwave` should run out-of-the box on a recent (Ubuntu) Linux, Windows or macOS installation. If it doesn't, the problem is probably caused by the Bevy framework. In that case, try following these [instructions](https://bevyengine.org/learn/quick-start/getting-started/setup/).

# Usage

Expand Down Expand Up @@ -539,13 +539,13 @@ microwave ref-note 62 --root 57 --luma-offs 31 --lo-key 0 --up-key 155 --midi-in

# Browser Application

The browser application allows you to utilize `microwave` and all of its features without the need to install any additional software. Simply open the [Web Launcher](https://woyten.github.io/microwave/launcher.html) in your web browser.
The browser application allows you to utilize `microwave` and all of its features without the need to install any additional software. Simply open the [Web Launcher](https://woyten.github.io/tune/microwave/launcher.html) in your web browser.

The Web Launcher functions as a command-line terminal, allowing you to launch `microwave` with the command-line arguments shown in the previous sections.

![](https://github.com/Woyten/tune/raw/main/microwave/microwave-web-launcher.png)

To interact with files read from and written to by the browser application, open the [File Manager](https://woyten.github.io/microwave/filemanager.html), which facilitates file exchange between your file system and the application.
To interact with files read from and written to by the browser application, open the [File Manager](https://woyten.github.io/tune/microwave/filemanager.html), which facilitates file exchange between your file system and the application.

![](https://github.com/Woyten/tune/raw/main/microwave/microwave-file-manager.png)

Expand Down
4 changes: 2 additions & 2 deletions tune-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Explore musical tunings and create synthesizer tuning files for microtonal scale
## Resources

- [Download / Changelog](https://github.com/Woyten/tune/releases)
- [Browser Application](https://woyten.github.io/tune-cli/)
- [Browser Application](https://woyten.github.io/tune/tune-cli/)
- Demo: [I'm a Lumatic (17-EDO)](https://youtu.be/zKnJJEaidWI)
- Demo: [Stay Strong (17-EDO)](https://youtu.be/JutcUVrA8Tg)
- Demo: [Xênerie (15-EDO)](https://youtu.be/0PczKDrOdUA)
Expand All @@ -18,7 +18,7 @@ Explore musical tunings and create synthesizer tuning files for microtonal scale

Option A: Try out the browser app to get a very first impression:

- [tune-cli (Browser)](https://woyten.github.io/tune-cli)
- [tune-cli (Browser)](https://woyten.github.io/tune/tune-cli)

Option B: Download a precompiled version of `tune-cli` for the supported target architectures:

Expand Down
2 changes: 1 addition & 1 deletion tune-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ A browser-based playground for [`tune-cli`](https://github.com/Woyten/tune/tree/
# Resources

- [Changelog](https://github.com/Woyten/tune/releases)
- [Browser Application](https://woyten.github.io/tune-cli/)
- [Browser Application](https://woyten.github.io/tune/tune-cli/)

# Installation

Expand Down

0 comments on commit 155989c

Please sign in to comment.