fix build
This commit is contained in:
@@ -21,18 +21,18 @@ jobs:
|
||||
artifact_name: rlogg-linux-x86_64
|
||||
binary_extension: ""
|
||||
setup_cmd: ""
|
||||
# - platform: macos
|
||||
# docker_image: messense/cargo-zigbuild:latest
|
||||
# target: x86_64-apple-darwin
|
||||
# artifact_name: rlogg-macos-x86_64
|
||||
# binary_extension: ""
|
||||
# setup_cmd: ""
|
||||
# - platform: windows
|
||||
# docker_image: rust:latest
|
||||
# target: x86_64-pc-windows-gnu
|
||||
# artifact_name: rlogg-windows-x86_64
|
||||
# binary_extension: ".exe"
|
||||
# setup_cmd: "apt-get update && apt-get install -y mingw-w64"
|
||||
- platform: macos
|
||||
docker_image: gitea.staspast.click/stas/rust-node-builder:v2
|
||||
target: x86_64-apple-darwin
|
||||
artifact_name: rlogg-macos-x86_64
|
||||
binary_extension: ""
|
||||
setup_cmd: ""
|
||||
- platform: windows
|
||||
docker_image: gitea.staspast.click/stas/rust-node-builder:v3
|
||||
target: x86_64-pc-windows-gnu
|
||||
artifact_name: rlogg-windows-x86_64
|
||||
binary_extension: ".exe"
|
||||
setup_cmd: ""
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -56,9 +56,11 @@ jobs:
|
||||
run: |
|
||||
if [ "${{ matrix.platform }}" = "macos" ]; then
|
||||
cargo zigbuild --release --target ${{ matrix.target }}
|
||||
else
|
||||
# Define RUSTFLAGS to use the system linker (cc) and disable debug compression
|
||||
elif [ "${{ matrix.platform }}" = "linux" ]; then
|
||||
cargo build --release
|
||||
else
|
||||
# Cross-compile for other targets (e.g., Windows)
|
||||
cargo build --release --target ${{ matrix.target }}
|
||||
fi
|
||||
|
||||
# Show sccache statistics
|
||||
|
||||
@@ -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
|
||||
@@ -1,5 +1,6 @@
|
||||
FROM rust:latest
|
||||
# Install GNU tar and ensure it's used instead of BusyBox tar
|
||||
|
||||
# Install system dependencies and tools
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
nodejs \
|
||||
@@ -7,6 +8,7 @@ RUN apt-get update && \
|
||||
tar \
|
||||
gzip \
|
||||
curl \
|
||||
mingw-w64 \
|
||||
&& rm -rf /var/lib/apt/lists/* && \
|
||||
# Check if /bin/tar is BusyBox and replace it with GNU tar
|
||||
if /bin/tar --version 2>&1 | grep -q "BusyBox"; then \
|
||||
@@ -22,3 +24,7 @@ RUN SCCACHE_VERSION=0.7.4 && \
|
||||
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/ && \
|
||||
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
|
||||
Reference in New Issue
Block a user