[llvm] [workflows] Port buildkite Windows config to GitHub actions (PR #82093)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 19 19:47:12 PST 2024
================
@@ -0,0 +1,61 @@
+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:
+ build-llvm-windows:
+ name: "Build and test LLVM (Windows)"
+ runs-on: windows-2022
+ steps:
+ - name: Setup Windows
+ uses: llvm/actions/setup-windows at main
+ with:
+ arch: amd64
+ - name: Fetch LLVM sources
+ uses: actions/checkout at v4
+ with:
+ fetch-depth: 2
+ - name: Setup ccache
+ uses: hendrikmuhs/ccache-action at v1
+ with:
+ max-size: 500M
+ variant: sccache
+ key: precommit-windows
+ - name: Compute projects to test
+ id: compute-projects
+ uses: ./.github/workflows/compute-projects-to-test
+ with:
+ projects: clang llvm lld
+
+ - name: Configure LLVM
+ shell: bash
+ if: ${{ steps.compute-projects.outputs.check-targets }}
+ run: |
+ cmake -B build -GNinja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLLVM_ENABLE_PROJECTS="${{ steps.compute-projects.outputs.projects }}" \
+ -DCMAKE_C_COMPILER_LAUNCHER=sccache \
+ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
+ -DLLVM_ENABLE_ASSERTIONS=ON \
+ -DLLVM_LIT_ARGS="-v --no-progress-bar" \
+ -S llvm
+ - name: Build LLVM
+ if: ${{ steps.compute-projects.outputs.check-targets }}
+ run: |
+ ninja -C build test-depends
----------------
joker-eph wrote:
This step will overbuild: if a PR only touches clang and not LLVM, it should only run `ninja check-clang` and not build the LLVM unit-tests and other things not needed by clang for example.
(same for the other projects)
```suggestion
```
https://github.com/llvm/llvm-project/pull/82093
More information about the llvm-commits
mailing list