Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

ci: check out full history only in jobs that use BASE

shoudi zhenga481748a648c
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index f9ec0f16..2568d6a8 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -21,9 +21,14 @@ runs:
# A push's `before` shares no history with HEAD after a branch's first push
# (all zeros) or a force push that replaced the history. The checks then
# compare HEAD with itself: the changed-file checks have nothing to check and
- # every whole-tree check still runs.
+ # every whole-tree check still runs. Shallow checkouts belong to jobs that do
+ # not use BASE, so anything there that starts using it fails loudly on the
+ # unknown ref instead of silently comparing HEAD with itself.
- shell: bash
run: |
+ if [ "$(git rev-parse --is-shallow-repository)" = true ]; then
+ exit 0
+ fi
if ! git merge-base "$BASE" HEAD >/dev/null 2>&1; then
echo "::notice::BASE $BASE shares no history with HEAD; the changed-file checks compare HEAD with itself."
echo "BASE=$(git rev-parse HEAD)" >>"$GITHUB_ENV"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 902b2c97..3cf0db26 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,8 +7,8 @@ name: CI
# filter makes every app check fail instead of skipping. A merge-queue build
# checks the paths its whole group changes, on top of the latest main. Pushes
# to main run every check. scripts/check-plan.mjs maps paths to checks, here
-# and in `make check`. CI runs the
-# computer daemon's Go unit tests; the rest of check-computer (TS and process
+# and in `make check`. Only jobs that use BASE check out full history. CI runs
+# the computer daemon's Go unit tests; the rest of check-computer (TS and process
# tests) and the heavier suites (node-services, voice-runtime, integration,
# containers and E2E) stay local: run `make check BASE=<target-ref>` and the
# targets in the Makefile before you open a pull request.
@@ -101,8 +101,6 @@ jobs:
shard: [1, 2, 3]
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- uses: ./.github/actions/setup
with:
go: false
@@ -150,8 +148,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- uses: ./.github/actions/check
with:
app: packages
@@ -164,8 +160,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- uses: ./.github/actions/check
with:
app: teamhub-cli
@@ -178,8 +172,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- uses: ./.github/actions/check
with:
app: installer
@@ -192,8 +184,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- uses: ./.github/actions/check
with:
app: desktop
@@ -206,8 +196,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- uses: ./.github/actions/check
with:
app: contracts
@@ -234,8 +222,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- uses: ./.github/actions/check
with:
app: computer-go