From 206441c9df3413dd2e877d35bd3d4b8f3edb69ac Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Sat, 4 May 2024 16:06:49 +0200 Subject: [PATCH] ci: ensure v master is available when trying to check out its commits to build oldv (#21414) --- .github/workflows/bootstrapping_ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bootstrapping_ci.yml b/.github/workflows/bootstrapping_ci.yml index 591932b5dc29b3..91067410278051 100644 --- a/.github/workflows/bootstrapping_ci.yml +++ b/.github/workflows/bootstrapping_ci.yml @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 10 + fetch-depth: 0 - name: Build V run: make -j4 - name: Test bootstrapping (v.c can be compiled and run with -os cross) @@ -68,6 +68,9 @@ jobs: ls -la v vc/v.c ls -la v_from_vc v_from_vc_produced_native_v ls -la v_from_vc2 v_from_vc_produced_native_v2 + - name: Ensure V master is available + if: github.ref_name != 'master' + run: git branch master remotes/origin/master - name: Test `v up` run: | # Derive a commit sha from an older successful fast workflow on master that was able to build V. @@ -79,7 +82,9 @@ jobs: "https://api.github.com/repos/vlang/v/actions/workflows/18477644/runs?branch=master&status=success&per_page=2" \ | jq -r '.workflow_runs[1].head_sha') echo "recent_good_commit=$recent_good_commit" + # Build oldv at recent_good_commit. ./v run cmd/tools/oldv.v -v $recent_good_commit cd ~/.cache/oldv/v_at_$recent_good_commit + # Test updating ./v version && ./v -v up && ./v version ./v -o v2 cmd/v && ./v2 -o v3 cmd/v