[llvm] [Github] Add initial version of precommit checks (PR #80951)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 22:34:07 PST 2024
================
@@ -0,0 +1,47 @@
+name: "Precommit tests"
+
+permissions:
+ contents: read
+
+on:
+ pull_request:
+ branches:
+ - main
+ paths:
+ - '.github/workflows/precommit.yaml'
+ - 'llvm/**'
+
+jobs:
+ build-llvm:
+ name: "Build and test LLVM"
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/llvm/ci-ubuntu-22.04:latest
+ steps:
+ - name: Fetch LLVM sources
+ uses: actions/checkout at v4
+ with:
+ fetch-depth: 1
+ - name: Setup ccache
+ uses: hendrikmuhs/ccache-action at v1
+ with:
+ max-size: 500M
+ variant: sccache
+ key: precommit-linux
----------------
boomanaiden154 wrote:
I think it will work reasonably well. The job should be run pretty often to keep a warm cache. Things might be a little bit less optimal if there are PRs that touch common headers that trigger a lot of rebuilt files or something and things go back and forth, but I think with a reasonable cache size, we should be fine. The max size is 2-3x the size of the cache generated from a cold build from my experiments, so we should be able to hold a reasonable amount of objects.
I think this is something that theoretically should work, but we'll just have to evaluate in practice however.
https://github.com/llvm/llvm-project/pull/80951
More information about the llvm-commits
mailing list