build: bundle platform binaries in Skill package #28
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: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - run: cargo fmt --all -- --check | |
| - run: cargo test --all-targets --locked | |
| - run: cargo clippy --all-targets --locked -- -D warnings | |
| - name: Verify release target contract | |
| run: | | |
| ! grep -q 'x86_64-unknown-linux' .github/workflows/release.yml | |
| ! grep -q 'x86_64-apple-darwin' .github/workflows/release.yml | |
| grep -q 'aarch64-apple-darwin' .github/workflows/release.yml | |
| grep -q 'x86_64-pc-windows-msvc' .github/workflows/release.yml | |
| grep -q 'environment: macos-release' .github/workflows/release.yml | |
| grep -q './scripts/sign_and_notarize_macos.sh' .github/workflows/release.yml | |
| grep -q 'needs: \[build-macos, build-windows\]' .github/workflows/release.yml | |
| - run: bash -n scripts/sign_and_notarize_macos.sh | |
| - run: sh -n scripts/package-skill.sh skills/lexmount-browser/scripts/bootstrap.sh skills/lexmount-browser/scripts/doctor.sh | |
| - name: Verify Skill doctor rejects PATH fallback | |
| run: | | |
| test_dir="$(mktemp -d)" | |
| trap 'rm -rf "$test_dir"' EXIT | |
| mkdir -p "$test_dir/skill/scripts" "$test_dir/fake-path" | |
| cp skills/lexmount-browser/scripts/doctor.sh "$test_dir/skill/scripts/doctor.sh" | |
| ln -s /usr/bin/true "$test_dir/fake-path/browser-cli" | |
| set +e | |
| output="$(PATH="$test_dir/fake-path:/usr/bin:/bin" "$test_dir/skill/scripts/doctor.sh")" | |
| status=$? | |
| set -e | |
| test "$status" -eq 1 | |
| test "$output" = '{"ok":false,"error":"command_not_found","message":"Skill-local browser-cli is missing. Run scripts/bootstrap.sh first."}' | |
| ! grep -q 'command -v browser-cli' skills/lexmount-browser/scripts/doctor.sh | |
| ! grep -q 'Get-Command browser-cli' skills/lexmount-browser/scripts/doctor.ps1 | |
| - name: Verify Python-free packaging contract | |
| run: | | |
| ! grep -R -E 'python3[[:space:]]|python[[:space:]]+-m|uv[[:space:]]' scripts skills .github/workflows | |
| - run: ./scripts/package-skill.sh | |
| - run: unzip -t dist/lexmount-browser.zip | |
| - name: Verify SkillHub ZIP root | |
| run: | | |
| unzip -Z1 dist/lexmount-browser.zip | grep -qx 'SKILL.md' | |
| ! unzip -Z1 dist/lexmount-browser.zip | grep -q '^lexmount-browser/' | |
| ! unzip -Z1 dist/lexmount-browser.zip | grep -q '^bin/' |