From 4b0f966fb4fc629d42147c784343094be78863c6 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 2 Dec 2023 13:08:39 -0700 Subject: fetch tags on CI checkout, so 'git describe' can work --- .github/workflows/compile.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows/compile.yml') diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 893eb41..e695a3a 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -14,6 +14,9 @@ jobs: - name: Checkout uses: actions/checkout@master + # allow 'git describe' to work, by fetching tags + with: + fetch-tags: true - name: Stop committing version.h # reject commit if version.h was changed -- cgit v1.2.3 From 1ca7e77cec953cb4cce5868336c24042ec3cf800 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 2 Dec 2023 13:09:08 -0700 Subject: run CI on all branches, not just on trunk --- .github/workflows/compile.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to '.github/workflows/compile.yml') diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index e695a3a..3f03c40 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -1,10 +1,13 @@ name: build all on: - push: - branches: [ "trunk" ] - pull_request: - branches: [ "trunk" ] + # all branches: + [ push, pull_request ] + # trunk only: + #push: + # branches: [ "trunk" ] + #pull_request: + # branches: [ "trunk" ] jobs: compile: -- cgit v1.2.3 From 73d1f3e156296642bdc35aed2ffa16458e321d2d Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 2 Dec 2023 13:35:59 -0700 Subject: github CI: fetch history too, to allow detection of version tags It needs history to determine which tag precedes the current commit. This could be expensive on large repos, but for Anduril it seems to only increase the checkout size by about 40% or so. (11 MiB -> 15 MiB) --- .github/workflows/compile.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows/compile.yml') diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 3f03c40..2ba771f 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -17,8 +17,9 @@ jobs: - name: Checkout uses: actions/checkout@master - # allow 'git describe' to work, by fetching tags + # allow 'git describe' to work, by fetching tags and history with: + fetch-depth: 0 fetch-tags: true - name: Stop committing version.h -- cgit v1.2.3