Skip to content

Commit

Permalink
ci: ensure v master is available when trying to check out its commits…
Browse files Browse the repository at this point in the history
… to build oldv (#21414)
  • Loading branch information
ttytm committed May 4, 2024
1 parent 065399e commit 206441c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/bootstrapping_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand All @@ -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

0 comments on commit 206441c

Please sign in to comment.