-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for docker-based builds and test in worktrees #48752
Conversation
This works for me locally, so that I can test ANY worktree of qgis source using the script. |
I consider this work ready for review. The failure I got was unrelated (see #47395 (comment)) |
CI is now green. Any test lover willing to review this ? |
I can have a look later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is something wrong with the common dir, whatever is it for it shouldn't point to my home.
.ci/run_tests.sh
Outdated
export QGIS_WORKSPACE_MOUNTPOINT | ||
echo "--=[ QGIS_WORKSPACE_MOUNTPOINT is $QGIS_WORKSPACE_MOUNTPOINT" | ||
|
||
QGIS_COMMON_GIT_DIR="$(cd $(cat $(git rev-parse --git-dir)/commondir) && pwd -P)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
First run on my machine:
ale@blackhole ~/dev/QGIS (ci)$ .ci/run_tests.sh
--=[ QGIS_WORKSPACE is /home/ale/dev/QGIS
--=[ QGIS_WORKSPACE_MOUNTPOINT is /root/QGIS
cat: .git/commondir: File o directory non esistente
--=[ QGIS_COMMON_GIT_DIR is /home/ale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's specifically for making worktrees work. The problem is that worktrees are tipically in a directory which does NOT include the full git repository, but just a link to it (referenced in the .git file). The code needs to make the real git repository accessible in the docker container at the same path as expected by that .git file. That's what that cod is about.
Are you NOT running this in a wortree ? I'll have to test that better and handle the absence of commondir file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I'm not running in a work tree but in my main source tree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now, with 90cfe96, can you give it another go ?
11a7cfd
to
4d9a69e
Compare
@elpaso did you get a chance to test this script ? |
I just tested this again and had to force-push with an actual fix |
Yes, tested it now, all good! |
Work to make it possible to run .ci/run_tests.sh from a worktree