docs: update README with platform compatibility and build status #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: WebAssembly | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: [main, develop] | |
workflow_dispatch: | |
jobs: | |
web-assembly: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Setup emsdk | |
uses: mymindstorm/setup-emsdk@v14 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build FFTW3 for WebAssembly | |
run: | | |
emsdk install latest | |
emsdk activate latest | |
wget http://www.fftw.org/fftw-3.3.10.tar.gz | |
tar -xvf fftw-3.3.10.tar.gz | |
cd fftw-3.3.10 | |
emconfigure ./configure \ | |
--disable-fortran \ | |
--prefix=/usr/local \ | |
--disable-dependency-tracking | |
emmake make -j9 | |
sudo make install | |
- name: Configure CMake | |
run: > | |
emcmake cmake -B ${{ github.workspace }}/build \ | |
-DFFTW3_PATH=/usr/local \ | |
-DLIBRARY_ONLY=ON \ | |
-DCMAKE_INSTALL_PREFIX=/usr/local | |
- name: Build libvibra as WebAssembly Library | |
run: | | |
cd ${{ github.workspace }}/build | |
make | |
sudo make install | |
- name: Build vibra WebAssembly Module | |
run: | | |
cd ${{ github.workspace }}/bindings/wasm | |
mkdir build | |
emmake make -j8 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vibra-web-assembly | |
path: | | |
bindings/wasm/build/vibra.wasm | |
bindings/wasm/build/vibra.js | |