-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (62 loc) · 2.43 KB
/
main.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: main
on:
push:
branches: [ "main" ]
pull_request:
jobs:
testing:
strategy:
matrix:
runner: [ macos-14, ubuntu-latest ]
include:
- runner: ubuntu-latest
CC: gcc
CXX: g++
PRESET: avx2
- runner: macos-14
CC: clang # This will be system AppleClang
CXX: clang++ # This will be system AppleClang
PRESET: apple-silicon
env:
CC: ${{matrix.CC}}
CXX: ${{matrix.CXX}}
BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
runs-on: ${{matrix.runner}}
steps:
- name: Checkout Exo main sources
uses: actions/checkout@v4
with:
repository: exo-lang/exo
submodules: recursive
path: exo-repo
- name: Setup Python environment
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: |
python -m pip install -U pip wheel build
- name: Install Exo
run: python -m build ${{github.workspace}}/exo-repo ; python -m pip install ${{github.workspace}}/exo-repo/dist/*.whl
- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest
- name: Install Google benchmark
run: git clone https://github.com/google/benchmark; cmake -S benchmark -B benchmark/build -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_TESTING=NO ; cmake --build benchmark/build; cmake --install benchmark/build --prefix ~/.local
- name: Checkout BLAS repo
uses: actions/checkout@v4
with:
submodules: recursive
path: BLAS-repo
- name: Configure CMake
env:
CMAKE_PREFIX_PATH: ${{github.workspace}}/benchmark/build
run: cmake ${{github.workspace}}/BLAS-repo -B ${{github.workspace}}/BLAS-repo/build/${{matrix.PRESET}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --preset ${{matrix.PRESET}}
- name: Build
run: cmake --build ${{github.workspace}}/BLAS-repo/build/${{matrix.PRESET}} --config ${{env.BUILD_TYPE}}
- name: Test Codegen
run: ctest --test-dir ${{github.workspace}}/BLAS-repo/build/${{matrix.PRESET}} -C ${{env.BUILD_TYPE}} -R codegen_verbose
if: ${{matrix.runner == 'ubuntu-latest'}}
- name: Test Correctness
run: ctest --test-dir ${{github.workspace}}/BLAS-repo/build/${{matrix.PRESET}} -C ${{env.BUILD_TYPE}} -R correctness