name: Deploy to Pages # The mochi version of .github/workflows/deploy.yml, which it shadows. # Three differences, all forced by the vault: # # - the job container carries no Fortran compiler, which libflame's # configure insists on finding even though the WASM build compiles # everything with emcc, so gfortran is installed first; # - there is no cache service, so the libflame/BLIS libraries are rebuilt # from source on every run (libflame twice, BLIS twice) rather than # restored, which makes this the vault's slowest build; # - vite.config.ts already uses a relative base, so the site works at the # vault's serving path with no configuration. on: push: branches: - main workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: "pages" cancel-in-progress: false jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: '20' # libflame's configure refuses to run without a Fortran compiler on the # PATH, even though every object is compiled by emcc. - name: Install gfortran run: apt-get update && apt-get install -y --no-install-recommends gfortran - name: Install dependencies run: npm ci - name: Setup emsdk uses: mymindstorm/setup-emsdk@v14 with: version: 5.0.4 # libFLAME + BLIS are built from source (WASM) via the sibling # libflame2wasm repo — nothing prebuilt is committed here. - name: Clone libflame2wasm (sibling) run: | git clone --depth 1 https://github.com/concept-collection/libflame2wasm.git "$GITHUB_WORKSPACE/../libflame2wasm" LIBFLAME_DIR="$(cd "$GITHUB_WORKSPACE/../libflame2wasm" && pwd)" echo "LIBFLAME_DIR=$LIBFLAME_DIR" >> "$GITHUB_ENV" - name: Build libflame2wasm libraries run: bash "$LIBFLAME_DIR/build-all-wasm.sh" # Custom C kernels (wasm/dist/matmul.* + public/matmul/matmul_mt.*). - name: Build custom wasm kernels run: bash wasm/build-wasm.sh # libFLAME/BLIS matmul modules (public/matmul/matmul_blis_{st,mt}.*), # linked against the libraries built above. - name: Build BLIS wasm modules run: LIBFLAME="$LIBFLAME_DIR" bash blis/build-blis-wasm.sh - name: Build run: npm run build - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: ./dist deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to Pages id: deployment uses: actions/deploy-pages@v4