diff --git a/.github/workflows/gen_vc_ci.yml b/.github/workflows/gen_vc_ci.yml index 43026c1976..8c4cd3b2a0 100644 --- a/.github/workflows/gen_vc_ci.yml +++ b/.github/workflows/gen_vc_ci.yml @@ -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 ] @@ -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