Skip to content

Commit 914a5b4

Browse files
authored
[GHA] Add GitHub Action to run the tests for llvm-zorg itself (#282)
This adds a GitHub action to at least run the very minimal lit tests we have for zorg itself. With appropriate repository settings it should provide pass/fail for both PRs and commits. The GH Actions in the main llvm-repos tend to be gated on `if: github.repository_owner == 'llvm'`, which I've copied across here. There's a question mark about how to handle `test/jenkins/test_build.py`. I've marked it XFAIL as a command-line `lit` option, as the test ends up trying to call `xcrun` which has no hope of succeeding on Linux. But perhaps the test is fixable, or it would be better to mark the test itself XFAIL. Either way, I think the GH Action in the PR is definitely an improvement over the status quo.
1 parent 9db7725 commit 914a5b4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/lit-tests.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: llvm-zorg testing
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
check_zorg:
10+
name: llvm-zorg lit tests
11+
if: github.repository_owner == 'llvm'
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install dependencies
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y llvm-18-tools buildbot
19+
sudo ln -s /usr/lib/llvm-18/build/utils/lit/lit.py /usr/bin/lit
20+
sudo ln -s /usr/bin/FileCheck-18 /usr/bin/FileCheck
21+
- name: Run lit tests
22+
run: /usr/lib/llvm-18/build/utils/lit/lit.py -v --xfail jenkins/test_build.py test

0 commit comments

Comments
 (0)