Skip to content

CI: Update build-mapscript-python to use Docker - #7227

Merged
geographika merged 2 commits into
MapServer:mainfrom
geographika:ci-ubuntu-latest
Feb 15, 2025
Merged

geographika merged 2 commits into
MapServer:mainfrom
geographika:ci-ubuntu-latest

Conversation

@geographika

@geographika geographika commented Feb 13, 2025 •

Copy link
Copy Markdown
Member

As with #7224 run the build-mapscript-python workflow using Docker. Also switch the main build to use ubuntu-latest (as there are modifications to the shared setup.sh script).

Quite a few hurdles to overcome to get this working, and unsure why moving to a shell script caused some parts of setup.sh to stop working. pyenv is also tricky to configure (and the approach seems to have changed a few times over the years).

A couple of notes for reference. The following error docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/home/runner/work/mapserver/mapserver/scripts/build-mapscript-python.sh": permission denied: unknown. was becuase the new shell script required execute permissions to be set with:

git update-index --chmod=+x ./scripts/build-mapscript-python.sh

To run locally on a Windows machine:

cd D:\GitHub\MapServer
docker run -e WORK_DIR="/mapserver" -e PYTHON_VERSION="3.10" -e MAPSCRIPT_PYTHON_ONLY="true" -v D:\GitHub\mapserver:/mapserver ubuntu:20.04 /mapserver/scripts/build-mapscript-python.sh

Note some clean-up needs to be done to avoid the following error - D:\GitHub\mapserver\swig-git-master needs to be removed prior to each run or get: # fatal: destination path 'swig-git-master' already exists and is not an empty directory.

@geographika geographika changed the title CI: Update Python MapScript to use Docker CI: Update build-mapscript-python to use Docker Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant