fix(core): compile Linux collectors on macOS #31
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: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Rust | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust components | |
| run: rustup component add rustfmt clippy | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: Test | |
| run: cargo test --workspace --locked | |
| - name: Package runglass-core | |
| run: cargo package -p runglass-core --locked | |
| - name: Check runglass-web package file list | |
| run: cargo package -p runglass-web --locked --list | |
| - name: Check runglass package file list | |
| run: cargo package -p runglass --locked --list | |
| macos: | |
| name: macOS readiness | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build workspace | |
| run: cargo build --workspace --locked | |
| - name: Test cross-platform CLI surface | |
| run: cargo test -p runglass --bin runglass --locked | |
| - name: Build release binary | |
| run: cargo build --release --locked -p runglass | |
| - name: Smoke test non-observation commands | |
| run: | | |
| target/release/runglass --version | |
| target/release/runglass --help | |
| target/release/runglass doctor | |
| target/release/runglass demo | |
| target/release/runglass validate latest | |
| - name: Verify observation guard | |
| run: | | |
| set +e | |
| output="$(target/release/runglass run -- echo hello 2>&1)" | |
| status=$? | |
| set -e | |
| echo "$output" | |
| if [ "$status" -eq 0 ]; then | |
| echo "::error::runglass run unexpectedly succeeded on macOS" | |
| exit 1 | |
| fi | |
| echo "$output" | grep "Linux-first" |