Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,84 @@ jobs:
pnpm --dir desktop lint
pnpm --dir desktop test

# The Windows port's progress report (issue #293), not a gate: it is absent
# from `verify`'s `needs`, so nothing here holds a pull request. The compile
# check and the desktop unit suite fail today and are `continue-on-error`:
# `cargo check` skips every crate that depends on a failed one, so its log
# lists the Unix-only code at the bottom of the dependency graph (the
# summary step groups it by crate), and it shrinks as the port lands. The
# web suite and the desktop typecheck pass today, so a failure of either
# turns this job red: that is a Windows regression. Promote the job into
# `needs` only once the compile check is green.
windows-check:
name: windows check
runs-on: windows-latest
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- name: Keep line endings as committed
# The runner converts to CRLF by default, which would make the unit
# suites report line endings instead of code.
run: git config --global core.autocrlf false
- uses: actions/checkout@v7
- uses: Swatinem/rust-cache@v2
with:
workspaces: ". -> target"
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Compile the workspace for Windows
id: cargo-check
continue-on-error: true
run: |
set -o pipefail
cargo check --locked --workspace --all-targets --keep-going --message-format short 2>&1 | tee "$RUNNER_TEMP/cargo-check.log"
- name: Summarize the compile errors
run: |
log="$RUNNER_TEMP/cargo-check.log"
{
echo '### Windows cargo check'
echo
echo "outcome: ${{ steps.cargo-check.outcome }}"
echo
echo 'Crates that failed to compile:'
echo '```'
grep -oE 'could not compile `[^`]+`' "$log" | sort | uniq -c || true
echo '```'
echo 'Errors by crate (first path component) and code:'
echo '```'
grep -E ': error(\[E[0-9]+\])?:' "$log" | sed -E 's#^(.*[\\/]registry[\\/]src[\\/][^\\/]+[\\/])?([^\\/:]+).*: (error(\[E[0-9]+\])?: .*)$#\2 \3#' | sort | uniq -c | sort -rn || true
echo '```'
} | tee -a "$GITHUB_STEP_SUMMARY"
- name: Keep the compile log
uses: actions/upload-artifact@v4
with:
name: windows-cargo-check-log
path: ${{ runner.temp }}/cargo-check.log
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Web shell typecheck and unit suite, desktop app typecheck
timeout-minutes: 10
run: |
pnpm --dir web typecheck
pnpm --dir web test
pnpm --dir desktop typecheck
- name: Desktop app unit suite
# 20 tests in 6 files fail on Windows today: path separators baked
# into expectations, `/bin/sh` and `/bin/sleep` as test programs, and
# 8.3 short temp paths. Drop `continue-on-error` when they are fixed.
continue-on-error: true
timeout-minutes: 10
run: pnpm --dir desktop test

# The web shell is the same code on every operating system, so the whole
# suite runs once, on Linux, where runners are plentiful. What differs by
# system is the daemon and Herdr under it, and the `@platform` tests cover
Expand Down
Loading