docs(changelog): cut 0.0.9 #499
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
| name: examples | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| # Cancel superseded runs on rapid pushes — 12-leg matrix is expensive. | |
| concurrency: | |
| group: examples-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # Fail fast if the matrix list has drifted from examples/. Cheaper than | |
| # waiting for 17 legs to finish and finding out a new example was added | |
| # but never wired into CI. | |
| validate-matrix: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Diff examples/ against matrix slugs | |
| run: | | |
| on_disk="$(ls examples | grep -v '^README\.md$' | sort)" | |
| in_matrix="$(awk '/^ example:$/{flag=1;next}/^ steps:$/{flag=0}flag' .github/workflows/examples.yml \ | |
| | sed -n 's/^\s*- //p' | sort)" | |
| if [ "$on_disk" != "$in_matrix" ]; then | |
| echo "matrix list out of sync with examples/ directory" >&2 | |
| diff <(printf '%s\n' "$on_disk") <(printf '%s\n' "$in_matrix") >&2 || true | |
| exit 1 | |
| fi | |
| # Build `hm` once and share the binary across every matrix leg. | |
| # Each leg only needs Docker + the binary; making them re-compile | |
| # the whole workspace 17× was the long tent-pole. | |
| build-hm: | |
| needs: validate-matrix | |
| runs-on: ubuntu-latest | |
| # Debug build only — examples just need a working `hm` binary. | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: examples-hm | |
| - name: Install esbuild (for harmont-ts bundle) | |
| working-directory: crates/hm-dsl-engine/harmont-ts | |
| run: npm ci | |
| - name: Build hm | |
| run: cargo build -p harmont-cli | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: hm-bin | |
| path: target/debug/hm | |
| retention-days: 1 | |
| if-no-files-found: error | |
| run-example: | |
| needs: build-hm | |
| name: ${{ matrix.example }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: | |
| - bun | |
| - c | |
| - cmake-advanced | |
| - cpp | |
| - elixir | |
| - elixir-phoenix | |
| - go | |
| - nextjs | |
| - python-uv | |
| - react | |
| - rust | |
| - typescript | |
| - zig-js | |
| - zig | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "23" | |
| - name: Download hm binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: hm-bin | |
| path: bin | |
| - name: Mark hm executable | |
| run: chmod +x bin/hm | |
| - name: Enable FUSE allow_other | |
| run: sudo sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf | |
| - name: Run example via harmont | |
| uses: harmont-dev/actions-hm@main | |
| with: | |
| pipeline: ci | |
| hm-path: ${{ github.workspace }}/bin/hm | |
| working-directory: examples/${{ matrix.example }} | |
| cache: 'false' |