Skip to content

ci: clean up CI workflows and fix WSL2 Docker on Windows#604

Merged
lwshang merged 11 commits into
mainfrom
lwshang/update-actions
Jun 15, 2026
Merged

ci: clean up CI workflows and fix WSL2 Docker on Windows#604
lwshang merged 11 commits into
mainfrom
lwshang/update-actions

Conversation

@lwshang

@lwshang lwshang commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Maintenance pass on the CI workflows. The goal was clearing two classes of CI warnings; bumping setup-wsl to v7 then surfaced a Windows Docker regression, which is fixed here too.

Silence CI warnings

  • Node.js 20 deprecation — clear every Node 20 action that ran in the test jobs:
    • bump Vampire/setup-wsl → v7.0.0 and t1m0thyj/unlock-keyring → v1.2.0 (Node 24 runtime);
    • drop dfinity/setup-mops, which transitively pulled in actions/setup-node@v4 + actions/cache@v4 (both Node 20) — the warning still showing at the "Complete job" step. mops is now installed directly via curl … cli.mops.one/install.sh (the same thing the action did for us, minus a Linux/macOS-only cache).
  • Homebrew untrusted taps — the macOS runner image pre-taps aws/tap and azure/bicep, which Homebrew now flags on every brew install (including the one inside setup-rust-toolchain, so even the unit-tests job warned). We use neither, so before any brew call we uninstall bicep (the only installed formula from those taps) and untap both — cleanly, without --force (which untaps but re-warns).

Fix: Docker daemon in WSL2 (regression from the setup-wsl v7 bump)

setup-wsl v7 provisions the Ubuntu rootfs with systemd enabled, so apt-get install docker.io now auto-starts docker.service, which holds /var/run/docker.pid and blocked our manual tcp-only dockerd (the daemon the Windows-side tests connect to). init-docker.sh now stops the systemd service and clears the pid file before launching the tcp daemon. On a non-systemd image systemctl is absent, so it's a no-op.

Reduce noise & simplify

  • Drop --verbose from the cargo clippy lint step in checks.yml — a cargo flag that prints the full rustc/clippy-driver command line for every compiled crate, flooding the log without adding any lint detail.
  • Fold each tool's verify (which + --version) into its install step, so mops and ic-wasm are one step each instead of two. mops is also skipped on Windows, since the Motoko (moc) tests that need it are all #[cfg(unix)].

An earlier commit tried gating WSL2+Docker setup to only the Windows jobs that "need" Docker, but on Windows the local test network itself runs as a Docker container, so nearly all tests need it — that change was reverted.

🤖 Generated with Claude Code

lwshang and others added 8 commits June 15, 2026 08:36
The macOS runner image pre-taps aws/tap and azure/bicep. Homebrew now
emits an "untrusted taps" warning on every `brew install` — including the
`brew install bash` inside setup-rust-toolchain, which is why even the
unit-tests job warns. We use nothing from those taps (softhsm/mitmproxy
and bash all come from homebrew/core), so untap them once up front, before
any brew call, in both macOS jobs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ock it

brew refuses to untap a tap that has an installed formula without --force,
so the previous one-liner untapped aws/tap but left azure/bicep (which ships
bicep). The 2>/dev/null also hid the "Refusing to untap" error. Add --force,
split to one tap per line so a future missing tap can't abort the other, and
drop the stderr suppression so real failures surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
--force untapped azure/bicep but printed "even though it contains the
following installed formulae or casks: bicep". Uninstall bicep (the only
formula installed from these taps, and unused by us) first, then untap both
taps cleanly without --force.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
setup-wsl v7 provisions the Ubuntu rootfs with systemd enabled, so
`apt-get install docker.io` auto-starts docker.service, which holds
/var/run/docker.pid and blocks our manual tcp-only dockerd (the one the
Windows-side tests connect to). Stop the service and clear the pid file
first. On a non-systemd image systemctl is absent, so this is a no-op.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Every test file gets its own Windows job, and all ~30 of them ran the WSL2
+ dockerd setup (~1 min each), but only 4 test files use Docker. Add a
needs_docker flag to the matrix (true for the Docker-backed test files) and
gate the Setup WSL2 / Setup Docker steps on it, skipping the setup on the 26
Windows jobs that never touch Docker. Linux uses preinstalled Docker so the
flag is a no-op there; macOS has no Docker steps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lwshang lwshang changed the title ci: silence Node.js 20 deprecation and Homebrew untrusted-tap warnings ci: refresh test-workflow actions, fix WSL2 Docker on Windows, and skip unneeded Docker setup Jun 15, 2026
@lwshang lwshang changed the title ci: refresh test-workflow actions, fix WSL2 Docker on Windows, and skip unneeded Docker setup ci: clean up and speed up the test workflow Jun 15, 2026
lwshang and others added 2 commits June 15, 2026 09:54
--verbose is a cargo flag that prints the full rustc/clippy-driver command
line for every crate compiled, flooding the log without adding any lint
detail (diagnostics are printed regardless). Removing it keeps the actual
clippy errors easy to find.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Docker"

This reverts commit 4bf2a63.

The needs_docker gating rested on a wrong assumption. On Windows the local
test network itself runs as a Docker container (the native network launcher
ships only for darwin/linux), so Docker is the default network backend there
-- see network/config.rs: "A Docker container (used on Windows or when
explicitly configured)". That means essentially any test that starts a
network needs the WSL2+Docker setup, not just the handful of Docker-network
test files, so gating it broke many Windows jobs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lwshang lwshang requested a review from Copilot June 15, 2026 14:07
@lwshang lwshang changed the title ci: clean up and speed up the test workflow ci: clean up CI workflows and fix WSL2 Docker on Windows Jun 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs a maintenance cleanup of GitHub Actions CI to remove recurring warnings and to restore Windows WSL2-based Docker functionality after bumping the Vampire/setup-wsl action to v7.

Changes:

  • Adds a macOS-only Homebrew “untap unused taps” step to eliminate “untrusted tap” warnings during any brew install.
  • Updates CI action pins (Vampire/setup-wsl to v7.0.0 and t1m0thyj/unlock-keyring to v1.2.0) to address Node runtime deprecation warnings.
  • Fixes WSL2 Docker initialization by stopping systemd’s Docker units (when present) and removing the stale pid file before starting the tcp-only dockerd.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/test.yml Adds macOS Homebrew untap step, bumps action pins, and updates WSL setup to v7 for Windows jobs.
.github/workflows/checks.yml Reduces lint log verbosity by removing cargo clippy --verbose.
.github/scripts/init-docker.sh Stops systemd-managed Docker (if present) and clears pid file before launching tcp-only dockerd in WSL2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Replace dfinity/setup-mops with a direct `curl … cli.mops.one/install.sh`
  call. For our usage the action just wrapped this same script with a
  Linux/macOS-only package cache and two Node 20 actions (setup-node@v4,
  cache@v4), which were the remaining "Node.js 20 deprecation" warning at the
  Complete job step.
- Gate mops to non-Windows: the Motoko (moc) tests that need it are all
  #[cfg(unix)], so Windows never used it.
- Fold each tool's verify (which + --version) into its install step, so mops
  and ic-wasm are one step each instead of two.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lwshang lwshang marked this pull request as ready for review June 15, 2026 14:39
@lwshang lwshang requested a review from a team as a code owner June 15, 2026 14:39
@lwshang lwshang enabled auto-merge (squash) June 15, 2026 14:39
@lwshang lwshang merged commit 999efca into main Jun 15, 2026
91 checks passed
@lwshang lwshang deleted the lwshang/update-actions branch June 15, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants