Commit Graph

16 Commits

Author SHA1 Message Date
classabbyamp 56db7de319
common/travis/changed_templates: sort-dependencies
should fix issues where e.g. a library is not built before its dependents
2023-11-01 14:14:39 -04:00
Piotr Wójcik f5a960da8f .github/workflows: compare PR branch to master
Since 4410de52c1 we fetch all origin branches, and FETCH_HEAD can point
elsewhere
2023-01-10 18:07:35 -05:00
classabbyamp c1dc168f80 common/travis/changed_templates.sh: change branch age check for treeless
small logic change because we now have the complete commit history instead
of just `--depth=200`. This preserves the 200 commit limit with a slightly-
enhanced error message (wording clarified and it now shows up as an error
annotation)
2022-12-21 01:15:15 -05:00
classabbyamp 8fe8739a23 common/: remove PATH adds from CI scripts
they are now specified in the workflow file
2022-10-25 14:23:46 -04:00
Đoàn Trần Công Danh 28c485ecfc changed_templates: explain what has been done 2022-09-17 23:32:50 +07:00
Đoàn Trần Công Danh 7510b96218 common: simplify logic to find git
From chroot-git 2.33.1, we always have an executable named git
for other build infrastructure and lints.

Let's remove the shenanegan to find which git to be used, prepend the
path to chroot-git's git into $PATH, and let's the shell call the
correct git for us instead.
2022-09-17 23:32:50 +07:00
Đoàn Trần Công Danh 2380f8cb1a changed_templates: use $GIT_CMD instead of git everywhere 2021-10-27 07:37:34 +07:00
Đoàn Trần Công Danh 4b009994e5 changed_templates: exit early if no merge-base could be found
GitHub Action and fetch_upstream.sh script limits fetch depth to 200.
With such depth, should the PR was based on very old tree, we couldn't
find the merge-base to diff again.

In theory, we could replace actions/checkout and fetch_upstream.sh to
fetch more than 200 depth. However, there isn't much gain from such
change and it will increase the time to fetch upstream for all PR.
Arguably, such problematic PR couldn't be built because other steps
would build changed packages' dependencies, too.

Let's complain and exit early instead.
2021-06-01 08:31:00 +07:00
Đoàn Trần Công Danh 987dfd294f changed_templates: use current tip for non-merge commit
Some people uses this scripts to detect changes locally.
Let's not break their script.
2021-06-01 08:31:00 +07:00
Đoàn Trần Công Danh 7f8e1f56fa ci/changed-templates: use tip of feature branch as tip
The HEAD given by GitHub Action is always non-fast-forward merge commit.
In the next change, lint-commits will use the tip from
"changed_templates.sh".

Let pick the correct tip for interrogation.
2021-05-31 17:47:56 +07:00
Piotr Wójcik 2dbe48e260 common/changed_templates.sh: store merge-base in file 2021-05-27 21:18:38 +02:00
Đoàn Trần Công Danh f5417b7b99 travis/changed_templates: correct left tree-ish
From b881f32687 (travis/changed_templates: filter by git itself,
2020-05-23), we replaced git-diff(1) with git-diff-tree(1).

The change wasn't equivalence, though.
We used to compare between merge-base of FETCH_HEAD and HEAD.
From that commit, we started to compare FETCH_HEAD and HEAD instead.

Fix them by changing left tree-ish to the merge-base.
2020-06-10 16:40:39 +00:00
Đoàn Trần Công Danh b881f32687 travis/changed_templates: filter by git itself
- Use plumbing git-diff-tree(1) instead of porcelain git-diff(1)
- Disable rename detection, gains some speed up and fix missing template
  with name-status Renamed and Copied.
- Use "--diff-filter" to filter by Git itself.
- Tell Git to only check 'srcpkgs/*/template', this glob will only look
  into template file inside direct sub-directory of srcpkgs
- With all of those options, we don't need a grep and a pipe
2020-05-31 02:10:29 +00:00
maxice8 81e021bd8a common/travis/changed_templates.sh: try chroot-git then git 2019-03-07 17:26:45 -08:00
Enno Boland bb71db78dd common/travis: use the same shebang format for all travis scripts. 2015-04-10 15:42:12 +02:00
Enno Boland 8351befa28 .travis.yml: test build packages on travis. 2015-04-10 10:37:26 +02:00