Skip to content
Snippets Groups Projects
Commit 70fe67ed authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Remove need for sudo in the CI by setting ownership inside of CIBW docker.

parent 42ec1848
No related branches found
No related tags found
1 merge request!75Update 0.5.1 -> 0.6.0
Pipeline #71696 failed
......@@ -85,8 +85,8 @@ release:pip:ubuntu:
# - /home/ubuntu/.local/bin/cibuildwheel --output-dir wheelhouse
- cibuildwheel --output-dir wheelhouse
after_script:
# Ensure all files are owned by the correct user at the end of the job
# Note: sudo requires the job to have privileged = true
- sudo chown -R $(whoami):$(whoami) .
# after_script:
# # Ensure all files are owned by the correct user at the end of the job
# # Note: sudo requires the job to have privileged = true
# - sudo chown -R $(whoami):$(whoami) .
#!/bin/bash
set -e
if [[ "$1" == "" ]]; then
if [[ "$1" == "" ]]; then
echo "build aidge deps in cibuildwheel container before building wheel."
echo "search path defines where the dependencies will be searched."
echo "Hint : In wheel containers, files are mounted on /host by default."
......@@ -10,7 +10,7 @@ set -x
if [[ $AIDGE_DEPENDENCIES == "" ]]; then # case for aidge_ core
mkdir -p build # creating build if its not already there to hold the build of cpp files
rm -rf build/* # build from scratch
else
else
for repo in $AIDGE_DEPENDENCIES ; do # case for other projects
search_path=$1
REPO_PATH=$(find $search_path ! -writable -prune -o -type d \
......@@ -25,7 +25,7 @@ else
-not -path "*/$repo/$repo/*" \
-not -path "*/proc/*" \
-print -quit)
if [[ -z "$REPO_PATH" ]]; then
if [[ -z "$REPO_PATH" ]]; then
echo "ERROR : dependency $repo not found in search_path \"$search_path\". ABORTING."
exit -1
fi
......@@ -34,6 +34,10 @@ else
mkdir -p build # creating build if its not already there to hold the build of cpp files
rm -rf build/* # build from scratch
pip install . -v
# Give all rights on generated build folder to avoid root issues once out of the Docker
chmod -R a+rwX build/
chmod -R a+rwX *.egg-info/
cd -
done
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment