[llvm] [workflows] Port buildkite Windows config to GitHub actions (PR #82093)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 06:25:21 PDT 2024


================
@@ -0,0 +1,198 @@
+name: "Windows Precommit Tests"
+
+permissions:
+  contents: read
+
+on:
+  pull_request:
+    branches:
+      - main
+
+concurrency:
+  # Skip intermediate builds: always.
+  # Cancel intermediate builds: only if it is a pull request build.
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
+
+jobs:
+  compute-projects:
+    name: "Compute Projects to Test"
+    runs-on: ubuntu-22.04
+    outputs:
+      projects: ${{ steps.vars.outputs.projects }}
+      check-targets: ${{ steps.vars.outputs.check-targets }}
+      test-build: ${{ steps.vars.outputs.check-targets != '' }}
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout at v4
+        with:
+          fetch-depth: 2
+
+      - name: Compute projects to test
+        id: vars
+        uses: ./.github/workflows/compute-projects-to-test
+
+  build-windows-part1:
+    name: "Build LLVM/Clang"
+    runs-on: windows-2022
+    needs:
+      - compute-projects
+    if: ${{ needs.compute-projects.outputs.test-build == 'true' }}
+    steps:
+      - name: Setup Windows
+        uses: llvm/actions/setup-windows at main
+        with:
+          arch: amd64
+
+      - name: Fetch LLVM sources
+        uses: actions/checkout at v4
+
+      - name: Setup sccache
+        uses: hendrikmuhs/ccache-action at v1
+        with:
+          max-size: 2G
+          variant: sccache
+          key: precommit-windows
+
+      - name: Restore sccache from previous PR run
+        uses: ./.github/workflows/pr-sccache-restore
----------------
tstellar wrote:

There is a global cache that is shared by all PRs which is used for the first run.  However, given how many PRs there and the limits on the size of the cache.  I think the benefit from the global cache may be small.

https://github.com/llvm/llvm-project/pull/82093


More information about the llvm-commits mailing list