From 3eb78acf704a10c2ba0321d9cbdd7ed12c353459 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 29 Jun 2025 22:49:28 +1200 Subject: [PATCH] config: Update 2 files --- .gitea/workflows/BuildTestPublish.yaml | 3 ++- getpkg/build.sh | 27 ++++++++------------------ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/BuildTestPublish.yaml b/.gitea/workflows/BuildTestPublish.yaml index f476bba..aefefcf 100644 --- a/.gitea/workflows/BuildTestPublish.yaml +++ b/.gitea/workflows/BuildTestPublish.yaml @@ -15,7 +15,8 @@ jobs: - linux/amd64 - linux/arm64 runs-on: ${{ matrix.platform }} - image: gitea.jde.nz/public/dropshell-build-base:latest + container: + image: gitea.jde.nz/public/dropshell-build-base:latest steps: - name: Checkout uses: actions/checkout@v4 diff --git a/getpkg/build.sh b/getpkg/build.sh index 7780210..0b6d712 100755 --- a/getpkg/build.sh +++ b/getpkg/build.sh @@ -27,31 +27,20 @@ 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 || echo "No /etc/os-release" - echo "Available in /usr/local/bin:" - ls -la /usr/local/bin/ 2>/dev/null || echo "No /usr/local/bin" - echo "Available in /usr/bin (cmake related):" - ls -la /usr/bin/ | grep cmake || echo "No cmake in /usr/bin" + cat /etc/os-release 2>/dev/null || cat /etc/alpine-release 2>/dev/null || echo "Unknown OS" echo "Current PATH: $PATH" - echo "Checking for cmake..." - find /usr -name "cmake" 2>/dev/null || echo "cmake not found anywhere in /usr" + echo "cmake location: $(which cmake 2>/dev/null || echo 'not found')" echo "=========================" - # Try to use cmake directly since we should be in the build image - export PATH="/usr/local/bin:/usr/bin:$PATH" + # Should now be running in Alpine build-base image with cmake available if which cmake >/dev/null 2>&1; then - echo "cmake found, building directly" + echo "cmake found at: $(which cmake)" + echo "Building directly in Alpine CI environment" cd "${SCRIPT_DIR}" && ${COMMAND_TO_RUN} else - echo "ERROR: cmake not available in build image - this shouldn't happen!" - echo "Falling back to nested docker (not ideal)" - 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}" + 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"