Skip to content

Commit

Permalink
ci: stop earlier on vc/v.c files, that may break on systems != linux (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman authored May 1, 2024
1 parent 6f7f7e0 commit c3d75cf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/gen_vc_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,21 @@ jobs:
COMMIT_MSG=$(git log -1 --oneline --pretty='%s' HEAD)
rm -rf vc
.github/workflows/retry.sh git clone --depth=1 \
./v retry -- git clone --depth=1 \
https://vlang-bot:${{ secrets.VLANG_BOT_SECRET }}@github.com/vlang/vc.git
rm -rf vc/v.c vc/v_win.c
./v -o vc/v.c -os cross cmd/v
./v -o vc/v.c -cross cmd/v
./v -o vc/v_win.c -os windows -cc msvc cmd/v
sed -i "1s/^/#define V_COMMIT_HASH \"$COMMIT_HASH\"\n/" vc/v.c
sed -i "1s/^/#define V_COMMIT_HASH \"$COMMIT_HASH\"\n/" vc/v_win.c
# do some sanity checks for the generated v.c file:
grep 'Turned ON custom defines: no_backtrace,cross' vc/v.c
grep '#define CUSTOM_DEFINE_cross' vc/v.c
# ensure the C files are over 5000 lines long, as a safety measure
[ $(wc -l < vc/v.c) -gt 5000 ]
[ $(wc -l < vc/v_win.c) -gt 5000 ]
Expand All @@ -61,7 +65,7 @@ jobs:
git -C vc commit -m "[v:master] $COMMIT_HASH - $COMMIT_MSG"
# in case there are recent commits:
.github/workflows/retry.sh git -C vc pull --rebase origin master
./v retry -- git -C vc pull --rebase origin master
git -C vc log -3
- name: Deploy
Expand Down

0 comments on commit c3d75cf

Please sign in to comment.