mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
chore: remove windows build and release support (#21902)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6f7486a61e
commit
755ea5762b
5
.changelog/dry-ants-bow.md
Normal file
5
.changelog/dry-ants-bow.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
reth: patch
|
||||
---
|
||||
|
||||
Removed Windows platform support from the codebase, including the Windows cross-compilation Dockerfile, build targets in Cross.toml and Makefile, and Windows-specific options in the bug report template.
|
||||
3
.github/ISSUE_TEMPLATE/bug.yml
vendored
3
.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -43,7 +43,6 @@ body:
|
||||
|
||||
- `~/.cache/reth/logs` on Linux
|
||||
- `~/Library/Caches/reth/logs` on macOS
|
||||
- `%localAppData%/reth/logs` on Windows
|
||||
render: text
|
||||
validations:
|
||||
required: false
|
||||
@@ -58,8 +57,6 @@ body:
|
||||
- Linux (ARM)
|
||||
- Mac (Intel)
|
||||
- Mac (Apple Silicon)
|
||||
- Windows (x86)
|
||||
- Windows (ARM)
|
||||
- type: dropdown
|
||||
id: container_type
|
||||
attributes:
|
||||
|
||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -85,10 +85,6 @@ jobs:
|
||||
os: macos-14
|
||||
profile: maxperf
|
||||
allow_fail: false
|
||||
- target: x86_64-pc-windows-gnu
|
||||
os: ubuntu-24.04
|
||||
profile: maxperf
|
||||
allow_fail: false
|
||||
- target: riscv64gc-unknown-linux-gnu
|
||||
os: ubuntu-24.04
|
||||
profile: maxperf
|
||||
@@ -122,8 +118,7 @@ jobs:
|
||||
- name: Move binary
|
||||
run: |
|
||||
mkdir artifacts
|
||||
[[ "${{ matrix.configs.target }}" == *windows* ]] && ext=".exe"
|
||||
mv "target/${{ matrix.configs.target }}/${{ matrix.configs.profile }}/${{ matrix.build.binary }}${ext}" ./artifacts
|
||||
mv "target/${{ matrix.configs.target }}/${{ matrix.configs.profile }}/${{ matrix.build.binary }}" ./artifacts
|
||||
|
||||
- name: Configure GPG and create artifacts
|
||||
env:
|
||||
@@ -240,7 +235,6 @@ jobs:
|
||||
|:---:|:---:|:---:|:---|
|
||||
| <img src="https://www.svgrepo.com/download/473700/linux.svg" width="50"/> | x86_64 | [reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) |
|
||||
| <img src="https://www.svgrepo.com/download/473700/linux.svg" width="50"/> | aarch64 | [reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) |
|
||||
| <img src="https://www.svgrepo.com/download/513083/windows-174.svg" width="50"/> | x86_64 | [reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz.asc) |
|
||||
| <img src="https://www.svgrepo.com/download/511330/apple-173.svg" width="50"/> | x86_64 | [reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) |
|
||||
| <img src="https://www.svgrepo.com/download/511330/apple-173.svg" width="50"/> | aarch64 | [reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) |
|
||||
| <img src="https://www.svgrepo.com/download/473589/docker.svg" width="50"/> | Docker | [${{ env.IMAGE_NAME }}](${{ env.DOCKER_IMAGE_NAME_URL }}) | - |
|
||||
|
||||
34
.github/workflows/windows.yml
vendored
34
.github/workflows/windows.yml
vendored
@@ -1,34 +0,0 @@
|
||||
# Windows build
|
||||
|
||||
name: windows
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
merge_group:
|
||||
|
||||
env:
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
|
||||
jobs:
|
||||
check-reth:
|
||||
runs-on: depot-ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: rui314/setup-mold@v1
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
target: x86_64-pc-windows-gnu
|
||||
- uses: taiki-e/install-action@cross
|
||||
- uses: mozilla-actions/sccache-action@v0.0.9
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
- name: mingw-w64
|
||||
run: sudo apt-get install -y mingw-w64
|
||||
- name: Check Reth
|
||||
run: cargo check --target x86_64-pc-windows-gnu
|
||||
@@ -15,15 +15,6 @@ pre-build = [
|
||||
"apt-get update && apt-get install --assume-yes --no-install-recommends llvm-dev libclang-dev clang",
|
||||
]
|
||||
|
||||
[target.x86_64-pc-windows-gnu]
|
||||
# Why do we need a custom Dockerfile on Windows:
|
||||
# 1. `reth-libmdbx` stopped working with MinGW 9.3 that cross image comes with.
|
||||
# 2. To be able to update the version of MinGW, we need to also update the Ubuntu that the image is based on.
|
||||
#
|
||||
# Also see https://github.com/cross-rs/cross/issues/1667
|
||||
# Inspired by https://github.com/cross-rs/cross/blob/9e2298e17170655342d3248a9c8ac37ef92ba38f/docker/Dockerfile.x86_64-pc-windows-gnu#L51
|
||||
dockerfile = "./Dockerfile.x86_64-pc-windows-gnu"
|
||||
|
||||
[target.riscv64gc-unknown-linux-gnu]
|
||||
image = "ubuntu:24.04"
|
||||
pre-build = [
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
FROM ubuntu:24.04 AS cross-base
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Use HTTPS for package sources
|
||||
RUN apt-get update && apt-get install --assume-yes --no-install-recommends ca-certificates
|
||||
RUN find /etc/apt/ -type f \( -name '*.list' -o -name '*.sources' \) -exec sed -i 's|http://|https://|g' {} +
|
||||
|
||||
# Configure APT retries and timeouts to handle network issues
|
||||
RUN echo 'Acquire::Retries \"3\";' > /etc/apt/apt.conf.d/80-retries && \
|
||||
echo 'Acquire::http::Timeout \"60\";' >> /etc/apt/apt.conf.d/80-retries && \
|
||||
echo 'Acquire::ftp::Timeout \"60\";' >> /etc/apt/apt.conf.d/80-retries
|
||||
|
||||
# configure fallback mirrors
|
||||
RUN sed -i 's|URIs: https://archive.ubuntu.com/ubuntu/|URIs: https://mirror.cov.ukservers.com/ubuntu/ https://archive.ubuntu.com/ubuntu/ https://mirror.ox.ac.uk/sites/archive.ubuntu.com/ubuntu/|g' /etc/apt/sources.list.d/ubuntu.sources
|
||||
|
||||
RUN apt-get update && apt-get install --assume-yes --no-install-recommends git
|
||||
|
||||
RUN git clone https://github.com/cross-rs/cross /cross
|
||||
WORKDIR /cross/docker
|
||||
RUN git checkout baf457efc2555225af47963475bd70e8d2f5993f
|
||||
|
||||
# xargo doesn't work with Rust 1.89 and higher: https://github.com/cross-rs/cross/issues/1701.
|
||||
#
|
||||
# When this PR https://github.com/cross-rs/cross/pull/1580 is merged,
|
||||
# we can update the checkout above and remove this replacement.
|
||||
RUN sed -i 's|sh rustup-init.sh -y --no-modify-path --profile minimal|sh rustup-init.sh -y --no-modify-path --profile minimal --default-toolchain=1.88.0|' xargo.sh
|
||||
|
||||
RUN cp common.sh lib.sh / && /common.sh
|
||||
RUN cp cmake.sh / && /cmake.sh
|
||||
RUN cp xargo.sh / && /xargo.sh
|
||||
|
||||
FROM cross-base AS build
|
||||
|
||||
RUN apt-get install --assume-yes --no-install-recommends libz-mingw-w64-dev g++-mingw-w64-x86-64 gfortran-mingw-w64-x86-64
|
||||
|
||||
# Install Wine using OpenSUSE repository because official one is often lagging behind
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get install --assume-yes --no-install-recommends wget gpg && \
|
||||
mkdir -pm755 /etc/apt/keyrings && curl -fsSL \
|
||||
https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_24.04/Release.key \
|
||||
| tee /etc/apt/keyrings/obs-winehq.key >/dev/null && \
|
||||
echo "deb [arch=amd64,i386 signed-by=/etc/apt/keyrings/obs-winehq.key] \
|
||||
https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_24.04/ ./" \
|
||||
| tee /etc/apt/sources.list.d/obs-winehq.list && \
|
||||
apt-get update && apt-get install --assume-yes --install-recommends winehq-stable
|
||||
|
||||
# run-detectors are responsible for calling the correct interpreter for exe
|
||||
# files. For some reason it does not work inside a docker container (it works
|
||||
# fine in the host). So we replace the usual paths of run-detectors to run wine
|
||||
# directly. This only affects the guest, we are not messing up with the host.
|
||||
#
|
||||
# See /usr/share/doc/binfmt-support/detectors
|
||||
RUN mkdir -p /usr/lib/binfmt-support/ && \
|
||||
rm -f /usr/lib/binfmt-support/run-detectors /usr/bin/run-detectors && \
|
||||
ln -s /usr/bin/wine /usr/lib/binfmt-support/run-detectors && \
|
||||
ln -s /usr/bin/wine /usr/bin/run-detectors
|
||||
|
||||
RUN cp windows-entry.sh /
|
||||
ENTRYPOINT ["/windows-entry.sh"]
|
||||
|
||||
RUN cp toolchain.cmake /opt/toolchain.cmake
|
||||
|
||||
# for why we always link with pthread support, see:
|
||||
# https://github.com/cross-rs/cross/pull/1123#issuecomment-1312287148
|
||||
ENV CROSS_TOOLCHAIN_PREFIX=x86_64-w64-mingw32-
|
||||
ENV CROSS_TOOLCHAIN_SUFFIX=-posix
|
||||
ENV CROSS_SYSROOT=/usr/x86_64-w64-mingw32
|
||||
ENV CROSS_TARGET_RUNNER="env -u CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER wine"
|
||||
ENV CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc"$CROSS_TOOLCHAIN_SUFFIX" \
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER="$CROSS_TARGET_RUNNER" \
|
||||
AR_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \
|
||||
CC_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc"$CROSS_TOOLCHAIN_SUFFIX" \
|
||||
CXX_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"g++"$CROSS_TOOLCHAIN_SUFFIX" \
|
||||
CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_gnu=/opt/toolchain.cmake \
|
||||
BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_windows_gnu="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
|
||||
CROSS_CMAKE_SYSTEM_NAME=Windows \
|
||||
CROSS_CMAKE_SYSTEM_PROCESSOR=AMD64 \
|
||||
CROSS_CMAKE_CRT=gnu \
|
||||
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -m64"
|
||||
5
Makefile
5
Makefile
@@ -98,9 +98,6 @@ build-native-%:
|
||||
# pages. See: https://github.com/paradigmxyz/reth/issues/6742
|
||||
build-aarch64-unknown-linux-gnu: export JEMALLOC_SYS_WITH_LG_PAGE=16
|
||||
|
||||
# No jemalloc on Windows
|
||||
build-x86_64-pc-windows-gnu: FEATURES := $(filter-out jemalloc jemalloc-prof,$(FEATURES))
|
||||
|
||||
# Note: The additional rustc compiler flags are for intrinsics needed by MDBX.
|
||||
# See: https://github.com/cross-rs/cross/wiki/FAQ#undefined-reference-with-build-std
|
||||
build-%:
|
||||
@@ -152,8 +149,6 @@ build-release-tarballs: ## Create a series of `.tar.gz` files in the BIN_DIR dir
|
||||
$(call tarball_release_binary,"x86_64-unknown-linux-gnu","reth","")
|
||||
$(MAKE) build-aarch64-unknown-linux-gnu
|
||||
$(call tarball_release_binary,"aarch64-unknown-linux-gnu","reth","")
|
||||
$(MAKE) build-x86_64-pc-windows-gnu
|
||||
$(call tarball_release_binary,"x86_64-pc-windows-gnu","reth.exe","")
|
||||
|
||||
##@ Test
|
||||
|
||||
|
||||
@@ -319,9 +319,6 @@ where
|
||||
F: FnOnce(&mut File) -> std::result::Result<(), E>,
|
||||
E: Into<Box<dyn core::error::Error + Send + Sync>>,
|
||||
{
|
||||
#[cfg(windows)]
|
||||
use std::os::windows::fs::OpenOptionsExt;
|
||||
|
||||
let mut tmp_path = file_path.to_path_buf();
|
||||
tmp_path.set_extension("tmp");
|
||||
|
||||
@@ -350,17 +347,6 @@ where
|
||||
|
||||
// fsync() directory
|
||||
if let Some(parent) = file_path.parent() {
|
||||
#[cfg(windows)]
|
||||
OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.custom_flags(0x02000000) // FILE_FLAG_BACKUP_SEMANTICS
|
||||
.open(parent)
|
||||
.map_err(|err| FsPathError::open(err, parent))?
|
||||
.sync_all()
|
||||
.map_err(|err| FsPathError::fsync(err, parent))?;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
OpenOptions::new()
|
||||
.read(true)
|
||||
.open(parent)
|
||||
|
||||
@@ -763,11 +763,7 @@ impl<HttpMiddleware, RpcMiddleware> Builder<HttpMiddleware, RpcMiddleware> {
|
||||
pub fn dummy_name() -> String {
|
||||
use rand::Rng;
|
||||
let num: u64 = rand::rng().random();
|
||||
if cfg!(windows) {
|
||||
format!(r"\\.\pipe\my-pipe-{num}")
|
||||
} else {
|
||||
format!(r"/tmp/my-uds-{num}")
|
||||
}
|
||||
format!(r"/tmp/my-uds-{num}")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -47,19 +47,9 @@ pub fn default_max_tracing_requests() -> usize {
|
||||
pub const DEFAULT_PROOF_PERMITS: usize = 25;
|
||||
|
||||
/// The default IPC endpoint
|
||||
#[cfg(windows)]
|
||||
pub const DEFAULT_IPC_ENDPOINT: &str = r"\\.\pipe\reth.ipc";
|
||||
|
||||
/// The default IPC endpoint
|
||||
#[cfg(not(windows))]
|
||||
pub const DEFAULT_IPC_ENDPOINT: &str = "/tmp/reth.ipc";
|
||||
|
||||
/// The engine_api IPC endpoint
|
||||
#[cfg(windows)]
|
||||
pub const DEFAULT_ENGINE_API_IPC_ENDPOINT: &str = r"\\.\pipe\reth_engine_api.ipc";
|
||||
|
||||
/// The `engine_api` IPC endpoint
|
||||
#[cfg(not(windows))]
|
||||
pub const DEFAULT_ENGINE_API_IPC_ENDPOINT: &str = "/tmp/reth_engine_api.ipc";
|
||||
|
||||
/// The default limit for blocks count in `eth_simulateV1`.
|
||||
|
||||
@@ -460,7 +460,6 @@ fn preprocess_help(s: &str) -> Cow<'_, str> {
|
||||
// rustup available targets:
|
||||
// aarch64-apple-darwin
|
||||
// x86_64-unknown-linux-gnu
|
||||
// x86_64-pc-windows-gnu
|
||||
(
|
||||
r"default: reth/.*-[0-9A-Fa-f]{6,10}/([_\w]+)-(\w+)-(\w+)(-\w+)?",
|
||||
"default: reth/<VERSION>-<SHA>/<ARCH>",
|
||||
|
||||
Reference in New Issue
Block a user