WIP: Start on CI configuration

Mikayla Maki created

Change summary

.github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Detailed changes

.github/workflows/ci.yml 🔗

@@ -413,6 +413,43 @@ jobs:
         if: always()
         run: rm -rf ./../.cargo
 
+  publish_gpui:
+    # Nextest currently doesn't support doctests, so run them separately and in parallel.
+    timeout-minutes: 60
+    name: (Linux) Run doctests
+    needs: [macos_tests, windows_tests, linux_tests]
+    if: | # TODO! Change this tag check somehow
+      github.repository_owner == 'zed-industries' &&
+      startsWith(github.ref, 'refs/tags/v')
+    runs-on:
+      - namespace-profile-16x32-ubuntu-2204
+    steps: # TODO! Actually run the action here TODO! get a secret into CI???
+      - name: Add Rust to the PATH
+        run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
+
+      - name: Checkout repo
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+        with:
+          clean: false
+
+      - name: Cache dependencies
+        uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+        with:
+          save-if: ${{ github.ref == 'refs/heads/main' }}
+          # cache-provider: "buildjet"
+
+      - name: Configure CI
+        run: |
+          mkdir -p ./../.cargo
+          cp ./.cargo/ci-config.toml ./../.cargo/config.toml
+
+      - name: Publish GPUI
+        run: cargo xtask publish_gpui
+
+      - name: Clean CI config file
+        if: always()
+        run: rm -rf ./../.cargo
+
   build_remote_server:
     timeout-minutes: 60
     name: (Linux) Build Remote Server