|
80 | 80 | with: |
81 | 81 | node-version: 18 |
82 | 82 |
|
83 | | - - uses: pnpm/action-setup@v4 |
| 83 | + - uses: ./.github/actions/setup-pnpm |
84 | 84 | with: |
85 | 85 | run_install: true |
86 | 86 |
|
@@ -221,7 +221,7 @@ jobs: |
221 | 221 | with: |
222 | 222 | node-version: 22 |
223 | 223 |
|
224 | | - - uses: pnpm/action-setup@v4 |
| 224 | + - uses: ./.github/actions/setup-pnpm |
225 | 225 | with: |
226 | 226 | run_install: true |
227 | 227 |
|
@@ -297,7 +297,7 @@ jobs: |
297 | 297 | with: |
298 | 298 | node-version: 22 |
299 | 299 |
|
300 | | - - uses: pnpm/action-setup@v4 |
| 300 | + - uses: ./.github/actions/setup-pnpm |
301 | 301 | with: |
302 | 302 | run_install: true |
303 | 303 |
|
@@ -524,7 +524,7 @@ jobs: |
524 | 524 | with: |
525 | 525 | node-version: 22 |
526 | 526 |
|
527 | | - - uses: pnpm/action-setup@v4 |
| 527 | + - uses: ./.github/actions/setup-pnpm |
528 | 528 | with: |
529 | 529 | run_install: true |
530 | 530 |
|
@@ -558,39 +558,6 @@ jobs: |
558 | 558 | run: | |
559 | 559 | cargo ci cli-docs |
560 | 560 |
|
561 | | - llm_ci_check: |
562 | | - name: Verify LLM benchmark is up to date |
563 | | - permissions: |
564 | | - contents: read |
565 | | - runs-on: ubuntu-latest |
566 | | - # Disable the tests because they are causing us headaches with merge conflicts and re-runs etc. |
567 | | - if: false |
568 | | - steps: |
569 | | - # Build the tool from master to ensure consistent hash computation |
570 | | - # with the llm-benchmark-update workflow (which also uses master's tool). |
571 | | - - name: Checkout master (build tool from trusted code) |
572 | | - uses: actions/checkout@v4 |
573 | | - with: |
574 | | - ref: master |
575 | | - fetch-depth: 1 |
576 | | - |
577 | | - - uses: dtolnay/rust-toolchain@stable |
578 | | - - uses: Swatinem/rust-cache@v2 |
579 | | - |
580 | | - - name: Install llm-benchmark tool from master |
581 | | - run: | |
582 | | - cargo install --path tools/xtask-llm-benchmark --locked |
583 | | - command -v llm_benchmark |
584 | | -
|
585 | | - # Now checkout the PR branch to verify its benchmark files |
586 | | - - name: Checkout PR branch |
587 | | - uses: actions/checkout@v4 |
588 | | - with: |
589 | | - clean: false |
590 | | - |
591 | | - - name: Run hash check (both langs) |
592 | | - run: llm_benchmark ci-check |
593 | | - |
594 | 561 | unity-testsuite: |
595 | 562 | needs: [lints] |
596 | 563 | # Skip if this is an external contribution. |
@@ -689,7 +656,7 @@ jobs: |
689 | 656 | } |
690 | 657 |
|
691 | 658 | - name: Hydrate Unity SDK DLLs |
692 | | - run: cargo ci dlls |
| 659 | + run: cargo regen csharp dlls |
693 | 660 |
|
694 | 661 | - name: Check Unity meta files |
695 | 662 | uses: DeNA/unity-meta-check@v3 |
@@ -830,10 +797,9 @@ jobs: |
830 | 797 | ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime |
831 | 798 |
|
832 | 799 | - name: Check quickstart-chat bindings are up to date |
833 | | - working-directory: sdks/csharp |
834 | 800 | run: | |
835 | | - bash tools~/gen-quickstart.sh |
836 | | - "${GITHUB_WORKSPACE}"/tools/check-diff.sh examples~/quickstart-chat || { |
| 801 | + bash sdks/csharp/tools~/gen-quickstart.sh |
| 802 | + tools/check-diff.sh templates/chat-console-cs/module_bindings || { |
837 | 803 | echo 'Error: quickstart-chat bindings have changed. Please run `sdks/csharp/tools~/gen-quickstart.sh`.' |
838 | 804 | exit 1 |
839 | 805 | } |
@@ -887,15 +853,20 @@ jobs: |
887 | 853 | const targetRepo = process.env.TARGET_REPO; |
888 | 854 | // Use the ref for pull requests because the head sha is brittle (github does some extra dance where it merges in master). |
889 | 855 | const publicRef = (context.eventName === 'pull_request') ? context.payload.pull_request.head.ref : context.sha; |
| 856 | + const publicPrNumber = context.payload.pull_request?.number ?? context.payload.inputs?.pr_number; |
890 | 857 | const preDispatch = new Date().toISOString(); |
891 | | - |
| 858 | + const inputs = { public_ref: publicRef }; |
| 859 | + if (publicPrNumber) { |
| 860 | + inputs.public_pr_number = String(publicPrNumber); |
| 861 | + } |
| 862 | +
|
892 | 863 | // Dispatch the workflow in the target repository |
893 | 864 | await github.rest.actions.createWorkflowDispatch({ |
894 | 865 | owner: targetOwner, |
895 | 866 | repo: targetRepo, |
896 | 867 | workflow_id: workflowId, |
897 | 868 | ref: targetRef, |
898 | | - inputs: { public_ref: publicRef } |
| 869 | + inputs, |
899 | 870 | }); |
900 | 871 | |
901 | 872 | const sleep = (ms) => new Promise(r => setTimeout(r, ms)); |
@@ -1024,36 +995,6 @@ jobs: |
1024 | 995 | - name: Check global.json policy |
1025 | 996 | run: cargo ci global-json-policy |
1026 | 997 |
|
1027 | | - warn-python-smoketests: |
1028 | | - name: Check for Python smoketest edits |
1029 | | - runs-on: ubuntu-latest |
1030 | | - if: github.event_name == 'pull_request' |
1031 | | - permissions: |
1032 | | - contents: read |
1033 | | - steps: |
1034 | | - - name: Checkout sources |
1035 | | - uses: actions/checkout@v4 |
1036 | | - with: |
1037 | | - fetch-depth: 0 |
1038 | | - |
1039 | | - - name: Fail if Python smoketests were modified |
1040 | | - run: | |
1041 | | - MERGE_BASE="$(git merge-base origin/${{ github.base_ref }} HEAD)" |
1042 | | - PYTHON_SMOKETEST_CHANGES="$(git diff --name-only "$MERGE_BASE" HEAD -- 'smoketests/**.py')" |
1043 | | -
|
1044 | | - if [ -n "$PYTHON_SMOKETEST_CHANGES" ]; then |
1045 | | - echo "::error::This PR modifies legacy Python smoketests. Please add new tests to the Rust smoketests in crates/smoketests/ instead." |
1046 | | - echo "" |
1047 | | - echo "Changed files:" |
1048 | | - echo "$PYTHON_SMOKETEST_CHANGES" |
1049 | | - echo "" |
1050 | | - echo "The Python smoketests are being replaced by Rust smoketests." |
1051 | | - echo "See crates/smoketests/DEVELOP.md for instructions on adding Rust smoketests." |
1052 | | - exit 1 |
1053 | | - fi |
1054 | | -
|
1055 | | - echo "No Python smoketest changes detected." |
1056 | | -
|
1057 | 998 | smoketests_mod_rs_complete: |
1058 | 999 | name: Check smoketests/mod.rs is complete |
1059 | 1000 | runs-on: ubuntu-latest |
@@ -1122,7 +1063,7 @@ jobs: |
1122 | 1063 | with: |
1123 | 1064 | node-version: '22' |
1124 | 1065 |
|
1125 | | - - uses: pnpm/action-setup@v4 |
| 1066 | + - uses: ./.github/actions/setup-pnpm |
1126 | 1067 | with: |
1127 | 1068 | run_install: true |
1128 | 1069 |
|
@@ -1159,7 +1100,7 @@ jobs: |
1159 | 1100 | with: |
1160 | 1101 | node-version: 22 |
1161 | 1102 |
|
1162 | | - - uses: pnpm/action-setup@v4 |
| 1103 | + - uses: ./.github/actions/setup-pnpm |
1163 | 1104 | with: |
1164 | 1105 | run_install: true |
1165 | 1106 |
|
@@ -1257,3 +1198,24 @@ jobs: |
1257 | 1198 | # - name: Print rows in the user table |
1258 | 1199 | # if: always() |
1259 | 1200 | # run: spacetime sql quickstart-chat "SELECT * FROM user" |
| 1201 | + |
| 1202 | + version_upgrade_check: |
| 1203 | + runs-on: spacetimedb-new-runner-2 |
| 1204 | + steps: |
| 1205 | + - name: Checkout |
| 1206 | + uses: actions/checkout@v3 |
| 1207 | + - uses: dsherret/rust-toolchain-file@v1 |
| 1208 | + - name: Set default rust toolchain |
| 1209 | + run: rustup default $(rustup show active-toolchain | cut -d' ' -f1) |
| 1210 | + # pnpm is required for regenerating the typescript bindings |
| 1211 | + - name: Set up Node.js |
| 1212 | + uses: actions/setup-node@v4 |
| 1213 | + with: |
| 1214 | + node-version: 20 |
| 1215 | + - uses: ./.github/actions/setup-pnpm |
| 1216 | + with: |
| 1217 | + run_install: true |
| 1218 | + - name: Verify that upgrade-version still works |
| 1219 | + run: cargo ci version-upgrade-check |
| 1220 | + - name: Show diff |
| 1221 | + run: git diff HEAD |
0 commit comments