Add the mochi shadow of the deploy workflow: install gfortran, drop the cache steps
1 changed file+92−0
.mochi/workflows/deploy.ymladded+92−0View file
@@ -0,0 +1,92 @@
1+name: Deploy to Pages
2+
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, which makes this the vault's slowest build;
12+# - vite.config.ts already uses a relative base, so the site works at the
13+# vault's serving path with no configuration.
14+
15+on:
16+ push:
17+ branches:
18+ - main
19+ workflow_dispatch:
20+
21+permissions:
22+ contents: read
23+ pages: write
24+ id-token: write
25+
26+concurrency:
27+ group: "pages"
28+ cancel-in-progress: false
29+
30+jobs:
31+ build:
32+ runs-on: ubuntu-latest
33+ steps:
34+ - name: Checkout
35+ uses: actions/checkout@v4
36+
37+ - name: Setup Node
38+ uses: actions/setup-node@v4
39+ with:
40+ node-version: '20'
41+
42+ # libflame's configure refuses to run without a Fortran compiler on the
43+ # PATH, even though every object is compiled by emcc.
44+ - name: Install gfortran
45+ run: apt-get update && apt-get install -y --no-install-recommends gfortran
46+
47+ - name: Install dependencies
48+ run: npm ci
49+
50+ - name: Setup emsdk
51+ uses: mymindstorm/setup-emsdk@v14
52+ with:
53+ version: 5.0.4
54+
55+ # libFLAME + BLIS are built from source (WASM) via the sibling
56+ # libflame2wasm repo — nothing prebuilt is committed here.
57+ - name: Clone libflame2wasm (sibling)
58+ run: |
59+ git clone --depth 1 https://github.com/concept-collection/libflame2wasm.git "$GITHUB_WORKSPACE/../libflame2wasm"
60+ LIBFLAME_DIR="$(cd "$GITHUB_WORKSPACE/../libflame2wasm" && pwd)"
61+ echo "LIBFLAME_DIR=$LIBFLAME_DIR" >> "$GITHUB_ENV"
62+
63+ - name: Build libflame2wasm libraries
64+ run: bash "$LIBFLAME_DIR/build-all-wasm.sh"
65+
66+ # Custom C kernels (wasm/dist/matmul.* + public/matmul/matmul_mt.*).
67+ - name: Build custom wasm kernels
68+ run: bash wasm/build-wasm.sh
69+
70+ # libFLAME/BLIS matmul modules (public/matmul/matmul_blis_{st,mt}.*),
71+ # linked against the libraries built above.
72+ - name: Build BLIS wasm modules
73+ run: LIBFLAME="$LIBFLAME_DIR" bash blis/build-blis-wasm.sh
74+
75+ - name: Build
76+ run: npm run build
77+
78+ - name: Upload artifact
79+ uses: actions/upload-pages-artifact@v3
80+ with:
81+ path: ./dist
82+
83+ deploy:
84+ environment:
85+ name: github-pages
86+ url: ${{ steps.deployment.outputs.page_url }}
87+ runs-on: ubuntu-latest
88+ needs: build
89+ steps:
90+ - name: Deploy to Pages
91+ id: deployment
92+ uses: actions/deploy-pages@v4