config: Update 3 files
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 7s
Build-Test-Publish / build (linux/arm64) (push) Failing after 8s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped

This commit is contained in:
Your Name
2025-06-29 23:05:58 +12:00
parent 3eb78acf70
commit af95d27964
3 changed files with 5 additions and 48 deletions

View File

@ -15,8 +15,6 @@ jobs:
- linux/amd64
- linux/arm64
runs-on: ${{ matrix.platform }}
container:
image: gitea.jde.nz/public/dropshell-build-base:latest
steps:
- name: Checkout
uses: actions/checkout@v4

View File

@ -17,31 +17,12 @@ mkdir -p "${SCRIPT_DIR}/build"
mkdir -p "${SCRIPT_DIR}/output"
# Run build in container with mounted directories
COMMAND_TO_RUN="
cmake -G Ninja -S . -B ./build \
COMMAND_TO_RUN="cmake -G Ninja -S . -B ./build \
-DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE} \
-DPROJECT_NAME=${PROJECT} && \
cmake --build ./build && \
cp ./build/${PROJECT} ./output/
"
cp ./build/${PROJECT} ./output/"
if [ -n "${GITEA_CONTAINER_NAME:-}" ]; then
echo "We're in a gitea container: ${GITEA_CONTAINER_NAME}"
echo "Checking cmake availability..."
if which cmake >/dev/null 2>&1; then
echo "cmake found, building directly"
cd "${SCRIPT_DIR}" && ${COMMAND_TO_RUN}
else
echo "cmake not found in CI environment, using docker build instead"
docker run --rm \
-v "${SCRIPT_DIR}:/app:ro" \
-v "${SCRIPT_DIR}/build:/app/build" \
-v "${SCRIPT_DIR}/output:/app/output" \
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
gitea.jde.nz/public/dropshell-build-base:latest \
bash -c "cd /app && ${COMMAND_TO_RUN}"
fi
else
echo "Building in new docker container"
docker run --rm \
--user "$(id -u):$(id -g)" \
@ -51,6 +32,5 @@ else
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
gitea.jde.nz/public/dropshell-build-base:latest \
bash -c "cd /app && ${COMMAND_TO_RUN}"
fi
echo "Build complete"

View File

@ -23,26 +23,6 @@ COMMAND_TO_RUN="cmake -G Ninja -S . -B ./build \
cmake --build ./build && \
cp ./build/${PROJECT} ./output/"
if [ -n "${GITEA_CONTAINER_NAME:-}" ]; then
echo "We're in a gitea container: ${GITEA_CONTAINER_NAME}"
echo "=== ENVIRONMENT DEBUG ==="
echo "Image info:"
cat /etc/os-release 2>/dev/null || cat /etc/alpine-release 2>/dev/null || echo "Unknown OS"
echo "Current PATH: $PATH"
echo "cmake location: $(which cmake 2>/dev/null || echo 'not found')"
echo "========================="
# Should now be running in Alpine build-base image with cmake available
if which cmake >/dev/null 2>&1; then
echo "cmake found at: $(which cmake)"
echo "Building directly in Alpine CI environment"
cd "${SCRIPT_DIR}" && ${COMMAND_TO_RUN}
else
echo "ERROR: cmake not found in build-base image!"
echo "This indicates the container directive isn't working"
exit 1
fi
else
echo "Building in new docker container"
docker run --rm \
--user "$(id -u):$(id -g)" \
@ -52,6 +32,5 @@ else
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
gitea.jde.nz/public/dropshell-build-base:latest \
bash -c "cd /app && ${COMMAND_TO_RUN}"
fi
echo "Build complete"