working on web demo #16
This file contains hidden or 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
| on: push | |
| jobs: | |
| c: | |
| name: Build & Publish C Carts | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| cart: | |
| - colorbars | |
| - example | |
| - gradient | |
| - input | |
| - sfx | |
| - speak | |
| - wasi_demo | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build C ${{ matrix.cart }} cart | |
| run: docker run -v ./carts/c/${{ matrix.cart }}:/src -v .:/out konsumer/null0-cart-c ${{ matrix.cart }}_c | |
| - name: Upload C ${{ matrix.cart }} cart artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.cart }}_c | |
| path: ${{ matrix.cart }}_c.null0 | |
| js: | |
| name: Build & Publish JS Carts | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| cart: | |
| - demo | |
| - input | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build JS ${{ matrix.cart }} cart | |
| run: docker run -v ./carts/js/${{ matrix.cart }}:/src -v .:/out konsumer/null0-cart-quickjs ${{ matrix.cart }}_js | |
| - name: Upload JS ${{ matrix.cart }} cart artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.cart }}_js | |
| path: ${{ matrix.cart }}_js.null0 | |
| as: | |
| name: Build & Publish Assemblyscript Carts | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| cart: | |
| - simple | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build Assemblyscript ${{ matrix.cart }} cart | |
| run: docker run -v ./carts/as/${{ matrix.cart }}:/src -v .:/out konsumer/null0-cart-assemblyscript ${{ matrix.cart }}_as | |
| - name: Upload Assemblyscript ${{ matrix.cart }} cart artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.cart }}_as | |
| path: ${{ matrix.cart }}_as.null0 | |
| nelua: | |
| name: Build & Publish Nelua Carts | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| cart: | |
| - basic | |
| - colorbars | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build Nelua ${{ matrix.cart }} cart | |
| run: docker run -v ./carts/nelua/${{ matrix.cart }}:/src -v .:/out konsumer/null0-cart-nelua ${{ matrix.cart }}_nelua | |
| - name: Upload Nelua ${{ matrix.cart }} cart artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.cart }}_nelua | |
| path: ${{ matrix.cart }}_nelua.null0 | |
| # nim: | |
| # name: Build & Publish Nim Carts | |
| # runs-on: ubuntu-latest | |
| # strategy: | |
| # matrix: | |
| # cart: | |
| # - simple | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Build Nim ${{ matrix.cart }} cart | |
| # run: docker run -v ./carts/nim/${{ matrix.cart }}:/src -v .:/out konsumer/null0-cart-nim ${{ matrix.cart }}_nim | |
| # - name: Upload Nim ${{ matrix.cart }} cart artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ${{ matrix.cart }}_nim | |
| # path: ${{ matrix.cart }}_nim.null0 | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| if: github.ref_type == 'tag' | |
| needs: [c, js, as, nelua] | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Release and Upload Assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/**/*.null0 | |
| deploy-pages: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: [c, js, as, nelua] | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare Pages content | |
| run: | | |
| mkdir -p _site/carts/ | |
| cp -r demo/* _site/ | |
| cp -r artifacts/**/*.null0 _site/carts/ | |
| cd _site/carts/ && ls *.null0 > carts.txt | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |