mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
Refactor: rename CMake presets and remove Docker/Jenkins build pipeline
This commit is contained in:
1 parent
1dcad52e15
commit
5f9fb7f1b4
4 files changed
+3
-127
No files matched your search
+3
-16
@@ -2,33 +2,20 @@
|
||||
"version": 3,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "ninja-release",
|
||||
"name": "release",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"RELEASE_BUILD": "ON"
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ninja-debug",
|
||||
"name": "debug",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mingw-release",
|
||||
"inherits": "ninja-release",
|
||||
"binaryDir": "${sourceDir}/build-mingw",
|
||||
"toolchainFile": "${sourceDir}/toolchains/x86_64-w64-mingw32.cmake"
|
||||
},
|
||||
{
|
||||
"name": "mingw-debug",
|
||||
"inherits": "ninja-debug",
|
||||
"binaryDir": "${sourceDir}/build-mingw",
|
||||
"toolchainFile": "${sourceDir}/toolchains/x86_64-w64-mingw32.cmake"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
# Use USTC mirror
|
||||
RUN sed -i \
|
||||
's|deb.debian.org/debian|mirrors.ustc.edu.cn/debian|g; \
|
||||
s|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' \
|
||||
/etc/apt/sources.list.d/debian.sources
|
||||
|
||||
# Install build tools and MinGW-w64 x86_64 toolchain
|
||||
RUN for i in 1 2 3 4 5; do \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
git \
|
||||
cmake \
|
||||
ninja-build \
|
||||
zip \
|
||||
gcc-mingw-w64-x86-64-posix \
|
||||
g++-mingw-w64-x86-64-posix \
|
||||
binutils-mingw-w64-x86-64 \
|
||||
mingw-w64-x86-64-dev \
|
||||
&& break \
|
||||
|| { echo "apt install failed (attempt $i), retrying..."; sleep 5; }; \
|
||||
done \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
|
||||
COPY toolchains/x86_64-w64-mingw32.cmake /opt/toolchains/mingw-x64.cmake
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Vendored
-26
@@ -1,26 +0,0 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
DOCKER_IMAGE = 'juiceagent-builder:latest'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build Image') {
|
||||
steps {
|
||||
sh 'docker build -t juiceagent-builder:latest .'
|
||||
}
|
||||
}
|
||||
stage('Package') {
|
||||
steps {
|
||||
sh 'docker run --rm -v "$WORKSPACE:/workspace" juiceagent-builder:latest bash -lc "cd /workspace && bash tools/build-release.sh"'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts artifacts: 'JuiceAgent-windows-x64.zip, JuiceAgent-windows-x64-examples.zip', fingerprint: true, allowEmptyArchive: false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# JuiceAgent release build script.
|
||||
# Runs inside the juiceagent-builder Docker container.
|
||||
# The example JARs are committed to the repository, so only the native
|
||||
# binaries are compiled here (MinGW cross-compile).
|
||||
# Produces two artifacts:
|
||||
# 1. JuiceAgent-windows-x64.zip - pure compiled binaries
|
||||
# 2. JuiceAgent-windows-x64-examples.zip - binaries + runnable example
|
||||
#
|
||||
set -e
|
||||
|
||||
cd /workspace
|
||||
|
||||
EXAMPLE_DIR=examples/load-via-injector-exe
|
||||
|
||||
echo "========================================"
|
||||
echo " [1/3] Building native binaries (MinGW)"
|
||||
echo "========================================"
|
||||
rm -rf build-mingw
|
||||
cmake --preset mingw-release
|
||||
cmake --build build-mingw
|
||||
|
||||
echo "========================================"
|
||||
echo " [2/3] Packaging pure binaries"
|
||||
echo "========================================"
|
||||
rm -f /workspace/JuiceAgent-windows-x64.zip
|
||||
cd build-mingw/bin
|
||||
zip -9 -j /workspace/JuiceAgent-windows-x64.zip injector.exe libagent.dll libloader.dll libinject.dll
|
||||
cd /workspace
|
||||
|
||||
echo "========================================"
|
||||
echo " [3/3] Packaging binaries + example"
|
||||
echo "========================================"
|
||||
rm -rf /workspace/release-examples
|
||||
mkdir -p /workspace/release-examples
|
||||
|
||||
cp -r "$EXAMPLE_DIR/." /workspace/release-examples/
|
||||
|
||||
cp build-mingw/bin/injector.exe /workspace/release-examples/
|
||||
cp build-mingw/bin/libagent.dll /workspace/release-examples/
|
||||
cp build-mingw/bin/libloader.dll /workspace/release-examples/
|
||||
cp build-mingw/bin/libinject.dll /workspace/release-examples/
|
||||
|
||||
rm -f /workspace/JuiceAgent-windows-x64-examples.zip
|
||||
cd /workspace/release-examples
|
||||
zip -9 -r /workspace/JuiceAgent-windows-x64-examples.zip .
|
||||
cd /workspace
|
||||
|
||||
echo "========================================"
|
||||
echo " Done. Artifacts:"
|
||||
ls -lh /workspace/JuiceAgent-windows-x64.zip /workspace/JuiceAgent-windows-x64-examples.zip
|
||||
echo "========================================"
|
||||
Reference in new issue
Block a user