/ proof-of-concept / matmul-bench
Sign in
proof-of-concept / matmul-bench
matmul-bench / .mochi / workflows / deploy.yml
95 lines · 3.0 KBBlameHistoryRaw
1name: Deploy to Pages
3# The mochi version of .github/workflows/deploy.yml, which it shadows.
4# Three differences, all forced by the vault:
5#
6# - the job container carries no Fortran compiler, which libflame's
7# configure insists on finding even though the WASM build compiles
8# everything with emcc, so gfortran is installed first;
9# - there is no cache service, so the libflame/BLIS libraries are rebuilt
10# from source on every run (libflame twice, BLIS twice) rather than
11# restored;
12# - vite.config.ts already uses a relative base, so the site works at the
13# vault's serving path with no configuration.
15# No push trigger, deliberately: without a cache the double libflame build is
16# too heavy for the small Fly runner, so this runs only when dispatched by
17# hand, and shadowing the .github file by name is what keeps the GitHub-shaped
18# workflow from running on the vault either. The GitHub Pages deploy remains
19# the live one.
21on:
22 workflow_dispatch:
24permissions:
25 contents: read
26 pages: write
27 id-token: write
29concurrency:
30 group: "pages"
31 cancel-in-progress: false
33jobs:
34 build:
35 runs-on: ubuntu-latest
36 steps:
37 - name: Checkout
38 uses: actions/checkout@v4
40 - name: Setup Node
41 uses: actions/setup-node@v4
42 with:
43 node-version: '20'
45 # libflame's configure refuses to run without a Fortran compiler on the
46 # PATH, even though every object is compiled by emcc.
47 - name: Install gfortran
48 run: apt-get update && apt-get install -y --no-install-recommends gfortran
50 - name: Install dependencies
51 run: npm ci
53 - name: Setup emsdk
54 uses: mymindstorm/setup-emsdk@v14
55 with:
56 version: 5.0.4
58 # libFLAME + BLIS are built from source (WASM) via the sibling
59 # libflame2wasm repo — nothing prebuilt is committed here.
60 - name: Clone libflame2wasm (sibling)
61 run: |
62 git clone --depth 1 https://github.com/concept-collection/libflame2wasm.git "$GITHUB_WORKSPACE/../libflame2wasm"
63 LIBFLAME_DIR="$(cd "$GITHUB_WORKSPACE/../libflame2wasm" && pwd)"
64 echo "LIBFLAME_DIR=$LIBFLAME_DIR" >> "$GITHUB_ENV"
66 - name: Build libflame2wasm libraries
67 run: bash "$LIBFLAME_DIR/build-all-wasm.sh"
69 # Custom C kernels (wasm/dist/matmul.* + public/matmul/matmul_mt.*).
70 - name: Build custom wasm kernels
71 run: bash wasm/build-wasm.sh
73 # libFLAME/BLIS matmul modules (public/matmul/matmul_blis_{st,mt}.*),
74 # linked against the libraries built above.
75 - name: Build BLIS wasm modules
76 run: LIBFLAME="$LIBFLAME_DIR" bash blis/build-blis-wasm.sh
78 - name: Build
79 run: npm run build
81 - name: Upload artifact
82 uses: actions/upload-pages-artifact@v3
83 with:
84 path: ./dist
86 deploy:
87 environment:
88 name: github-pages
89 url: ${{ steps.deployment.outputs.page_url }}
90 runs-on: ubuntu-latest
91 needs: build
92 steps:
93 - name: Deploy to Pages
94 id: deployment
95 uses: actions/deploy-pages@v4
↑↓ move↵openescclose