Skip to content
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

Merged
merged 4 commits into from
Jun 13, 2022
Merged

Conversation

strk
Copy link
Contributor

@strk strk commented May 25, 2022

Work to make it possible to run .ci/run_tests.sh from a worktree

@github-actions github-actions bot added this to the 3.26.0 milestone May 25, 2022
@strk strk self-assigned this May 25, 2022
@strk strk requested a review from elpaso May 25, 2022 19:02
@strk
Copy link
Contributor Author

strk commented May 25, 2022

This works for me locally, so that I can test ANY worktree of qgis source using the script.
@elpaso does it work for you ?

@strk strk changed the title WIP: Add support for docker-based builds and test in worktrees Add support for docker-based builds and test in worktrees May 28, 2022
@strk
Copy link
Contributor Author

strk commented May 28, 2022

I consider this work ready for review. The failure I got was unrelated (see #47395 (comment))

@strk strk requested a review from nirvn May 30, 2022 09:14
@strk
Copy link
Contributor Author

strk commented May 30, 2022

CI is now green. Any test lover willing to review this ?

@elpaso
Copy link
Contributor

elpaso commented May 30, 2022

CI is now green. Any test lover willing to review this ?

I can have a look later.

Copy link
Contributor

@elpaso elpaso left a 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)"
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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 ?

@strk
Copy link
Contributor Author

strk commented Jun 8, 2022

@elpaso did you get a chance to test this script ?

@strk
Copy link
Contributor Author

strk commented Jun 10, 2022

I just tested this again and had to force-push with an actual fix

@elpaso
Copy link
Contributor

elpaso commented Jun 13, 2022

@elpaso did you get a chance to test this script ?

Yes, tested it now, all good!

@elpaso elpaso merged commit a21f1cc into qgis:master Jun 13, 2022
@strk strk deleted the ci branch June 13, 2022 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore GitHub and other CI infrastructure changes testsuite Issue related to testsuite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants