-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (53 loc) · 1.72 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Test
on:
push:
branches: [ main ]
workflow_dispatch:
repository_dispatch:
types: [on-sdk-update]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest]
opt: [O0, O3, Os, Oz]
fail-fast: false
steps:
- name: Install Ubuntu build dependencies.
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -y install ninja-build llvm
python3 -m pip install --user --use-pep517 lit
- name: Install MacOS tools
if: startsWith(matrix.os, 'macos')
run: |
brew update
brew install ninja
python3 -m pip install --user --use-pep517 --break-system-packages lit
- name: Check out the test suite.
uses: actions/checkout@v2
- name: Fetch the latest Ubuntu llvm-mos release.
if: startsWith(matrix.os, 'ubuntu')
run: |
curl -LO https://github.com/llvm-mos/llvm-mos-sdk/releases/download/prerelease/llvm-mos-linux.tar.xz
tar -xvf llvm-mos-linux.tar.xz
- name: Fetch the latest Mac llvm-mos release.
if: startsWith(matrix.os, 'macos')
run: |
curl -LO https://github.com/llvm-mos/llvm-mos-sdk/releases/download/prerelease/llvm-mos-macos.tar.xz
tar -xvf llvm-mos-macos.tar.xz
- name: Build the test suite.
run: |
mkdir build
cd build
cmake -DLLVM_MOS=$GITHUB_WORKSPACE/llvm-mos \
-C../cmake/caches/${{ matrix.opt }}.cmake \
-C../cmake/caches/target-mos.cmake \
-G Ninja \
..
ninja
- name: Run the test suite.
run: |
cd build
$(python3 -m site --user-base)/bin/lit .