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
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:
@ -15,8 +15,6 @@ jobs:
|
|||||||
- linux/amd64
|
- linux/amd64
|
||||||
- linux/arm64
|
- linux/arm64
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
container:
|
|
||||||
image: gitea.jde.nz/public/dropshell-build-base:latest
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -17,31 +17,12 @@ mkdir -p "${SCRIPT_DIR}/build"
|
|||||||
mkdir -p "${SCRIPT_DIR}/output"
|
mkdir -p "${SCRIPT_DIR}/output"
|
||||||
|
|
||||||
# Run build in container with mounted directories
|
# Run build in container with mounted directories
|
||||||
COMMAND_TO_RUN="
|
COMMAND_TO_RUN="cmake -G Ninja -S . -B ./build \
|
||||||
cmake -G Ninja -S . -B ./build \
|
-DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE} \
|
||||||
-DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE} \
|
-DPROJECT_NAME=${PROJECT} && \
|
||||||
-DPROJECT_NAME=${PROJECT} && \
|
cmake --build ./build && \
|
||||||
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"
|
echo "Building in new docker container"
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
--user "$(id -u):$(id -g)" \
|
--user "$(id -u):$(id -g)" \
|
||||||
@ -51,6 +32,5 @@ else
|
|||||||
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
|
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
|
||||||
gitea.jde.nz/public/dropshell-build-base:latest \
|
gitea.jde.nz/public/dropshell-build-base:latest \
|
||||||
bash -c "cd /app && ${COMMAND_TO_RUN}"
|
bash -c "cd /app && ${COMMAND_TO_RUN}"
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Build complete"
|
echo "Build complete"
|
@ -23,26 +23,6 @@ COMMAND_TO_RUN="cmake -G Ninja -S . -B ./build \
|
|||||||
cmake --build ./build && \
|
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 "=== 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"
|
echo "Building in new docker container"
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
--user "$(id -u):$(id -g)" \
|
--user "$(id -u):$(id -g)" \
|
||||||
@ -52,6 +32,5 @@ else
|
|||||||
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
|
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
|
||||||
gitea.jde.nz/public/dropshell-build-base:latest \
|
gitea.jde.nz/public/dropshell-build-base:latest \
|
||||||
bash -c "cd /app && ${COMMAND_TO_RUN}"
|
bash -c "cd /app && ${COMMAND_TO_RUN}"
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Build complete"
|
echo "Build complete"
|
Reference in New Issue
Block a user