Skip to content

Commit 020144d

Browse files
committed
[rust] Add CI Checks to Rust fork
- On Linux, run `check-llvm` and `check-lld`.
1 parent 74c9471 commit 020144d

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI Checks (Rust fork)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
# When a PR is closed, we still start this workflow, but then skip
13+
# all the jobs, which makes it effectively a no-op. The reason to
14+
# do this is that it allows us to take advantage of concurrency groups
15+
# to cancel in progress CI jobs whenever the PR is closed.
16+
- closed
17+
push:
18+
branches:
19+
- 'rustc/**'
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
premerge-checks-linux:
27+
name: Build and Test Linux
28+
if: >-
29+
github.repository_owner == 'rust-lang' &&
30+
(github.event_name != 'pull_request' || github.event.action != 'closed')
31+
runs-on: ubuntu-24.04
32+
steps:
33+
- name: Checkout LLVM
34+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
with:
36+
fetch-depth: 1
37+
- name: Free up disk space
38+
run: |
39+
curl -sSL https://raw.githubusercontent.com/rust-lang/rust/474466dc16f890083af1cdebad0aebf4d4ba88d7/src/ci/scripts/free-disk-space.sh | bash
40+
- name: Install clang-18
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y clang-18 cmake ninja-build
44+
- name: Build and Test
45+
run: |
46+
cmake -S llvm -B build -G Ninja \
47+
-DLLVM_ENABLE_PROJECTS=lld \
48+
-DLLVM_ENABLE_ASSERTIONS=ON \
49+
-DLLVM_ENABLE_LLD=ON \
50+
-DCMAKE_BUILD_TYPE=Release \
51+
-DCMAKE_C_COMPILER=/usr/bin/clang-18 \
52+
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-18
53+
ninja -C build check-llvm check-lld

0 commit comments

Comments
 (0)