Skip to content

Commit fcf5e6a

Browse files
authored
ci: drop Windows and macOS runners (#10845)
* ci: drop Windows and macOS runners Remove the Windows/macOS unit-test matrix and the brew/choco install branches from setup-zebra-build. Unnecessary CI overhead: no relevant node operators run those OSes, and other enthusiasts can use Docker. Claude-Session: https://claude.ai/code/session_01VUPwpe81Ws8c5MeXWWgZb7 * docs: demote Windows and macOS to tier 3 CI no longer builds or tests them, so they no longer meet the tier 2 "guaranteed to build" bar. Tier 3 = supported in code, untested, may or may not work — use Docker. Claude-Session: https://claude.ai/code/session_01VUPwpe81Ws8c5MeXWWgZb7 * test: drop Windows and macOS test exclusions Remove the `cfg(not(windows))` / `cfg(not(macos))` skips and the nextest `delete_old_databases` Windows filter, now that neither platform runs in CI. For feature-combined gates, keep the `#[cfg(feature = ...)]` and drop only the OS predicate. Genuine platform-abstraction code (`stop()`, `random_known_port`, `default_lwd_cache_dir`) is left intact. Claude-Session: https://claude.ai/code/session_01VUPwpe81Ws8c5MeXWWgZb7 * test: drop Windows guard from rpc.rs test imports The `metrics_endpoint` / `tracing_endpoint` helper imports kept `not(target_os = "windows")` after the tests themselves became feature-only gated, so a Windows build with `prometheus` or `filter-reload` would compile the tests without their imports and fail. Match the imports to the tests' gating. Claude-Session: https://claude.ai/code/session_01VUPwpe81Ws8c5MeXWWgZb7 * test: merge config.rs imports after dropping the macOS gate Addresses review: the two `crate::common` import blocks can be one now that the `#[cfg(not(target_os = "macos"))]` gate is gone. Claude-Session: https://claude.ai/code/session_01VUPwpe81Ws8c5MeXWWgZb7 * ci: keep the Linux guard on setup-zebra-build's apt step Addresses review: the composite action is Linux-only, but guarding the apt-get step keeps it inert if ever reused on another runner. Claude-Session: https://claude.ai/code/session_01VUPwpe81Ws8c5MeXWWgZb7
1 parent 3b6f695 commit fcf5e6a

14 files changed

Lines changed: 17 additions & 137 deletions

File tree

.config/nextest.toml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ fail-fast = true
1212
status-level = "pass"
1313
default-filter = 'not test(/^stateful::/) and not test(/^e2e::/) and not test(=unit::end_of_support::check_no_git_dependencies)'
1414

15-
# --- Platform overrides ---
16-
17-
[[profile.default.overrides]]
18-
platform = 'cfg(target_os = "windows")'
19-
filter = "not test(=integration::database::delete_old_databases)"
20-
2115
# --- CI Profile (PRs) ---
2216

2317
[profile.ci]
@@ -26,10 +20,6 @@ failure-output = "immediate"
2620
slow-timeout = { period = "5m", terminate-after = 4 }
2721
default-filter = 'not test(/^stateful::/) and not test(/^e2e::/) and not test(=unit::end_of_support::check_no_git_dependencies)'
2822

29-
[[profile.ci.overrides]]
30-
platform = 'cfg(target_os = "windows")'
31-
filter = "not test(=integration::database::delete_old_databases)"
32-
3323
[[profile.ci.overrides]]
3424
filter = 'test(=integration::network::disconnects_from_misbehaving_peers)'
3525
retries = 2

.github/actions/setup-zebra-build/action.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,3 @@ runs:
1010
sudo apt-get -qq update
1111
sudo apt-get -qq install -y --no-install-recommends protobuf-compiler librocksdb-dev
1212
echo "ROCKSDB_LIB_DIR=/usr/lib/" >> $GITHUB_ENV
13-
14-
- name: Install protoc and RocksDB on macOS
15-
if: runner.os == 'macOS'
16-
shell: bash
17-
run: |
18-
brew install protobuf rocksdb
19-
# Set ROCKSDB_LIB_DIR for both Intel and Apple Silicon Macs
20-
if [ -d "/opt/homebrew/lib" ]; then
21-
echo "ROCKSDB_LIB_DIR=/opt/homebrew/lib" >> $GITHUB_ENV
22-
else
23-
echo "ROCKSDB_LIB_DIR=/usr/local/lib" >> $GITHUB_ENV
24-
fi
25-
26-
- name: Install protoc on Windows
27-
if: runner.os == 'Windows'
28-
shell: bash
29-
run: |
30-
choco install protoc -y

.github/workflows/tests-unit.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,20 @@ jobs:
4343
filters: .github/path-filters.yml
4444

4545
run-unit-tests:
46-
name: ${{ matrix.rust-version }} on ${{ matrix.os }}
46+
name: ${{ matrix.rust-version }}
4747
needs: changes
4848
if: needs.changes.outputs.unit_tests == 'true'
4949
permissions:
5050
contents: read
5151
id-token: write
5252
statuses: write
53-
runs-on: ${{ matrix.os }}
53+
runs-on: ubuntu-latest
5454
timeout-minutes: 120
5555
strategy:
5656
fail-fast: false
5757
matrix:
58-
os: [ubuntu-latest, macos-latest, windows-latest]
5958
rust-version: [stable, beta]
6059
features: [default-release-binaries]
61-
exclude:
62-
# Exclude macOS beta due to limited runner capacity and slower performance
63-
# Exclude Windows beta to reduce the amount of minutes cost per workflow run
64-
- os: macos-latest
65-
rust-version: beta
66-
- os: windows-latest
67-
rust-version: beta
6860

6961
steps:
7062
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
@@ -73,31 +65,13 @@ jobs:
7365
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
7466
with:
7567
toolchain: ${{ matrix.rust-version }}
76-
cache-key: unit-tests-${{ matrix.os }}-${{ matrix.rust-version }}-${{ matrix.features }}
68+
cache-key: unit-tests-${{ matrix.rust-version }}-${{ matrix.features }}
7769
cache-on-failure: true
7870
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
7971
with:
8072
tool: cargo-nextest
8173
- uses: ./.github/actions/setup-zebra-build
8274

83-
# Windows-specific setup
84-
- name: Install LLVM on Windows
85-
if: matrix.os == 'windows-latest'
86-
run: |
87-
choco install llvm -y
88-
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
89-
echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
90-
91-
- name: Minimise proptest cases on macOS and Windows
92-
# We set cases to 1, because some tests already run 1 case by default.
93-
# We keep maximum shrink iterations at the default value, because it only happens on failure.
94-
#
95-
# Windows compilation and tests are slower than other platforms.
96-
if: matrix.os == 'windows-latest'
97-
run: |
98-
echo "PROPTEST_CASES=1" >> $GITHUB_ENV
99-
echo "PROPTEST_MAX_SHRINK_ITERS=1024" >> $GITHUB_ENV
100-
10175
- name: Run unit tests
10276
run: cargo nextest run --profile ci --locked --release --features "${{ matrix.features }}" --run-ignored=all
10377

book/src/user/supported-platforms.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ For the full requirements, see [Tier 2 platform policy](target-tier-policies.md#
4343
| -------------------------- | ----------------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------ | --------- |
4444
| `x86_64-unknown-linux-gnu` | [GitHub ubuntu-latest](https://github.com/actions/virtual-environments#available-environments) | 64-bit | [latest stable release](https://github.com/rust-lang/rust/releases) | N/A |
4545
| `x86_64-unknown-linux-gnu` | [GitHub ubuntu-latest](https://github.com/actions/virtual-environments#available-environments) | 64-bit beta | [latest beta release](https://github.com/rust-lang/rust/blob/beta/src/version) | N/A |
46-
| `x86_64-apple-darwin` | [GitHub macos-latest](https://github.com/actions/virtual-environments#available-environments) | 64-bit | [latest stable release](https://github.com/rust-lang/rust/releases) | N/A |
47-
| `x86_64-pc-windows-msvc` | [GitHub windows-latest](https://github.com/actions/virtual-environments#available-environments) | 64-bit | [latest stable release](https://github.com/rust-lang/rust/releases) | N/A |
4846

4947
> **Note:** Linux is tested on both stable and beta Rust to catch potential regressions early.
5048
@@ -56,6 +54,8 @@ work. Official builds are not available.
5654

5755
For the full requirements, see [Tier 3 platform policy](target-tier-policies.md#tier-3-platform-policy) in the Platform Tier Policy.
5856

59-
| platform | os | notes | rust | artifacts |
60-
| ---------------------- | ------------ | ---------------------- | ------------------------------------------------------------------- | --------- |
61-
| `aarch64-apple-darwin` | latest macOS | 64-bit, Apple M1 or M2 | [latest stable release](https://github.com/rust-lang/rust/releases) | N/A |
57+
| platform | os | notes | rust | artifacts |
58+
| ------------------------ | -------------- | ---------------------- | ------------------------------------------------------------------- | --------- |
59+
| `x86_64-apple-darwin` | latest macOS | 64-bit | [latest stable release](https://github.com/rust-lang/rust/releases) | N/A |
60+
| `aarch64-apple-darwin` | latest macOS | 64-bit, Apple M1 or M2 | [latest stable release](https://github.com/rust-lang/rust/releases) | N/A |
61+
| `x86_64-pc-windows-msvc` | latest Windows | 64-bit | [latest stable release](https://github.com/rust-lang/rust/releases) | N/A |

zebra-network/src/peer_set/initialize/tests/vectors.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use tower::{service_fn, Layer, Service, ServiceExt};
2727

2828
use zebra_chain::{chain_tip::NoChainTip, parameters::Network, serialization::DateTime32};
2929

30-
#[cfg(not(target_os = "windows"))]
3130
use zebra_test::net::random_known_port;
3231

3332
use crate::{
@@ -147,7 +146,6 @@ async fn local_listener_unspecified_port_localhost_addr_v6() {
147146

148147
/// Test that zebra-network propagates fixed localhost listener ports to the `AddressBook`.
149148
#[tokio::test]
150-
#[cfg(not(target_os = "windows"))]
151149
async fn local_listener_fixed_port_localhost_addr_v4() {
152150
let _init_guard = zebra_test::init();
153151

@@ -164,7 +162,6 @@ async fn local_listener_fixed_port_localhost_addr_v4() {
164162

165163
/// Test that zebra-network propagates fixed localhost listener ports to the `AddressBook`.
166164
#[tokio::test]
167-
#[cfg(not(target_os = "windows"))]
168165
async fn local_listener_fixed_port_localhost_addr_v6() {
169166
let _init_guard = zebra_test::init();
170167

@@ -946,10 +943,6 @@ async fn listener_peer_limit_default_handshake_error() {
946943

947944
/// Test the listener with the default inbound peer limit,
948945
/// and a handshaker that returns success then disconnects the peer.
949-
///
950-
/// TODO: tweak the crawler timeouts and rate-limits so we get over the actual limit on macOS
951-
/// (currently, getting over the limit can take 30 seconds or more)
952-
#[cfg(not(target_os = "macos"))]
953946
#[tokio::test]
954947
async fn listener_peer_limit_default_handshake_ok_then_drop() {
955948
let _init_guard = zebra_test::init();

zebra-state/src/service/non_finalized_state/tests/prop.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ fn finalized_equals_pushed_history_tree() -> Result<()> {
447447
/// Check that rejected blocks do not change the internal state of a genesis chain
448448
/// in a non-finalized state.
449449
#[test]
450-
#[cfg(not(target_os = "windows"))]
451450
fn rejection_restores_internal_state_genesis() -> Result<()> {
452451
use zebra_chain::fmt::DisplayToDebug;
453452

zebrad/src/components/health/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ async fn not_ready_when_tip_is_too_old() {
175175
}
176176

177177
#[tokio::test]
178-
#[cfg(not(target_os = "windows"))]
179178
async fn rate_limiting_drops_bursts() {
180179
// With a sleep shorter than the configured interval we should only be able
181180
// to observe one successful request before the limiter responds with 429.

zebrad/tests/e2e/lightwalletd.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@ use crate::common::{lightwalletd::lwd_integration_test, test_type::TestType::Ful
88
/// - `TEST_LIGHTWALLETD` is set,
99
/// - a persistent cached state is configured (e.g., via `ZEBRA_STATE__CACHE_DIR`), and
1010
/// - Zebra is compiled with `--features=lightwalletd-grpc-tests`.
11-
///
12-
///
13-
/// This test doesn't work on Windows, so it is always skipped on that platform.
1411
#[test]
1512
#[ignore]
16-
#[cfg(not(target_os = "windows"))]
1713
fn lwd_sync_full() -> Result<()> {
1814
lwd_integration_test(FullSyncFromGenesis {
1915
allow_lightwalletd_cached_state: false,

zebrad/tests/integration/database.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ where
174174
}
175175

176176
#[test]
177-
#[cfg(not(target_os = "windows"))]
178177
fn delete_old_databases() -> Result<()> {
179178
use std::fs::{canonicalize, create_dir};
180179

zebrad/tests/integration/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
pub mod database;
2-
#[cfg(not(target_os = "windows"))]
32
pub mod network;
43
pub mod regtest;
54
pub mod rpc;

0 commit comments

Comments
 (0)