fix build
Some checks failed
Build / Build - linux (push) Successful in 3m33s
Build / Build - macos (push) Failing after 9s
Build / Build - windows (push) Successful in 2m55s

This commit is contained in:
2025-12-11 21:01:25 +01:00
parent f9f81e6dcf
commit e6c30dc403
3 changed files with 25 additions and 17 deletions

View File

@@ -21,18 +21,18 @@ jobs:
artifact_name: rlogg-linux-x86_64 artifact_name: rlogg-linux-x86_64
binary_extension: "" binary_extension: ""
setup_cmd: "" setup_cmd: ""
# - platform: macos - platform: macos
# docker_image: messense/cargo-zigbuild:latest docker_image: gitea.staspast.click/stas/rust-node-builder:v2
# target: x86_64-apple-darwin target: x86_64-apple-darwin
# artifact_name: rlogg-macos-x86_64 artifact_name: rlogg-macos-x86_64
# binary_extension: "" binary_extension: ""
# setup_cmd: "" setup_cmd: ""
# - platform: windows - platform: windows
# docker_image: rust:latest docker_image: gitea.staspast.click/stas/rust-node-builder:v3
# target: x86_64-pc-windows-gnu target: x86_64-pc-windows-gnu
# artifact_name: rlogg-windows-x86_64 artifact_name: rlogg-windows-x86_64
# binary_extension: ".exe" binary_extension: ".exe"
# setup_cmd: "apt-get update && apt-get install -y mingw-w64" setup_cmd: ""
steps: steps:
- name: Checkout code - name: Checkout code
@@ -56,9 +56,11 @@ jobs:
run: | run: |
if [ "${{ matrix.platform }}" = "macos" ]; then if [ "${{ matrix.platform }}" = "macos" ]; then
cargo zigbuild --release --target ${{ matrix.target }} cargo zigbuild --release --target ${{ matrix.target }}
else elif [ "${{ matrix.platform }}" = "linux" ]; then
# Define RUSTFLAGS to use the system linker (cc) and disable debug compression
cargo build --release cargo build --release
else
# Cross-compile for other targets (e.g., Windows)
cargo build --release --target ${{ matrix.target }}
fi fi
# Show sccache statistics # Show sccache statistics

View File

@@ -1 +1 @@
docker build -t gitea.staspast.click/stas/rust-node-builder:v2 -f linux-build.Dockerfile . && docker push gitea.staspast.click/stas/rust-node-builder:v2 docker build -t gitea.staspast.click/stas/rust-node-builder:v3 -f linux-build.Dockerfile . && docker push gitea.staspast.click/stas/rust-node-builder:v3

View File

@@ -1,5 +1,6 @@
FROM rust:latest FROM rust:latest
# Install GNU tar and ensure it's used instead of BusyBox tar
# Install system dependencies and tools
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
nodejs \ nodejs \
@@ -7,6 +8,7 @@ RUN apt-get update && \
tar \ tar \
gzip \ gzip \
curl \ curl \
mingw-w64 \
&& rm -rf /var/lib/apt/lists/* && \ && rm -rf /var/lib/apt/lists/* && \
# Check if /bin/tar is BusyBox and replace it with GNU tar # Check if /bin/tar is BusyBox and replace it with GNU tar
if /bin/tar --version 2>&1 | grep -q "BusyBox"; then \ if /bin/tar --version 2>&1 | grep -q "BusyBox"; then \
@@ -21,4 +23,8 @@ RUN SCCACHE_VERSION=0.7.4 && \
curl -L "$SCCACHE_URL" | tar xz && \ curl -L "$SCCACHE_URL" | tar xz && \
chmod +x sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache && \ chmod +x sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache && \
mv sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache /usr/local/bin/ && \ mv sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache /usr/local/bin/ && \
rm -rf sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl rm -rf sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl
# Install cargo-zigbuild for cross-compilation (macOS targets)
RUN cargo install cargo-zigbuild && \
rm -rf /usr/local/cargo/registry