Skip to content

Commit bdf48c1

Browse files
committed
add nightly test
Signed-off-by: Shankar Easwaran <[email protected]>
1 parent 1b6a2f9 commit bdf48c1

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- '.github/workflows/docs.yaml'
1010
- '.github/workflows/ci-win.yml'
1111
- '.github/workflows/picolibc-builder.yml'
12+
- '.github/workflows/nightly-test.yml'
1213

1314
jobs:
1415
build:

.github/workflows/nightly-test.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Nightly check
2+
3+
on:
4+
schedule:
5+
- cron: '0 7 * * *' # Runs daily at 1:00 AM CST
6+
workflow_dispatch: # Allows manual triggering
7+
8+
jobs:
9+
build-and-runtest-nightly:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Set up Clang 20
14+
uses: egor-tensin/setup-clang@v1
15+
with:
16+
version: "20"
17+
platform: x64
18+
19+
- name: Install libc++ and libc++abi
20+
run: |
21+
sudo apt update
22+
sudo apt install -y clang libc++-dev libc++abi-dev ccache libclang-rt-20-dev
23+
24+
- name: Build and Test with Clang and show versions
25+
run: |
26+
echo "clang version"
27+
clang --version
28+
echo "clang++ version"
29+
clang++ -stdlib=libc++ --version
30+
dpkg -L clang
31+
echo '#include <iostream>' > test.cpp
32+
echo 'int main() { std::cout << "Hello, Clang on Ubuntu 24.04!" << std::endl; return 0; }' >> test.cpp
33+
clang++ -std=c++17 -stdlib=libc++ test.cpp -o test_clang
34+
./test_clang
35+
36+
- name: CPU and Memory information
37+
run: |
38+
echo "Number of CPUs:"
39+
nproc --all # or grep -c ^processor /proc/cpuinfo
40+
echo "Memory information:"
41+
free -h # or cat /proc/meminfo
42+
43+
- name: Checkout llvm-project
44+
uses: actions/checkout@v4
45+
with:
46+
repository: llvm/llvm-project
47+
path: llvm-project
48+
ref: main
49+
50+
- name: Checkout eld
51+
uses: actions/checkout@v4
52+
with:
53+
path: llvm-project/llvm/tools/eld
54+
ref: main
55+
56+
- name: Run CMake
57+
run: |
58+
mkdir obj
59+
cd obj
60+
cmake -G Ninja \
61+
-DCMAKE_BUILD_TYPE=Release \
62+
-DLLVM_ENABLE_PROJECTS="llvm;clang;clang-tools-extra" \
63+
-DCMAKE_C_COMPILER:STRING=`which clang` \
64+
-DCMAKE_CXX_COMPILER:STRING=`which clang++` \
65+
-DCMAKE_CXX_FLAGS:STRING="-stdlib=libc++" \
66+
-DLLVM_TARGETS_TO_BUILD:STRING="ARM;AArch64;RISCV;Hexagon;X86" \
67+
-DLLVM_CCACHE_BUILD:BOOL=ON \
68+
-DLLVM_CCACHE_DIR:STRING=$PWD/ccache/ \
69+
-DELD_TARGETS_TO_BUILD='ARM;AArch64;RISCV;Hexagon;x86_64' \
70+
-DLLVM_ENABLE_SPHINX=OFF \
71+
../llvm-project/llvm
72+
73+
- name: Build Project
74+
run: |
75+
cd obj
76+
ninja -j8
77+
78+
- name: Run tests
79+
run: |
80+
cd obj
81+
ninja -j8 check-eld

0 commit comments

Comments
 (0)