Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/precommit-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Linux Precommit Tests"

permissions:
contents: read

on:
pull_request:
branches:
- main
paths:
- '.github/workflows/precommit.yaml'
- 'llvm/**'

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-linux:
name: "Build and test LLVM (Linux)"
runs-on: ubuntu-latest
container:
image: ghcr.io/llvm/ci-ubuntu-22.04:latest
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
max-size: 500M
variant: sccache
key: precommit-linux
- name: Configure LLVM
run: |
cmake -B llvm-build -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_LIT_ARGS="-v --no-progress-bar" \
-S ./llvm
- name: Build LLVM
run: |
ninja -C llvm-build llvm-test-depends
- name: Check LLVM
run: |
ninja -C llvm-build check-llvm