-
Notifications
You must be signed in to change notification settings - Fork 110
115 lines (104 loc) · 4.05 KB
/
enzyme-ci.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Enzyme CI
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
build-linux:
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
llvm: ["15", "16"]
build: ["Release", "Debug"] # "RelWithDebInfo"
os: [ubuntu-22.04]
timeout-minutes: 30
steps:
- name: add llvm
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-${{ matrix.llvm }} main" || true
sudo apt-get install -y cmake gcc g++ llvm-${{ matrix.llvm }}-dev libzstd-dev
sudo python3 -m pip install --upgrade pip lit
- uses: actions/checkout@v4
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
working-directory: build
run: cmake ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
- name: make
working-directory: build
run: make -j `nproc`
- name: make check-typeanalysis
working-directory: build
run: make -j `nproc` check-typeanalysis
- name: make check-activityanalysis
working-directory: build
run: make -j `nproc` check-activityanalysis
- name: make check-enzyme
working-directory: build
run: make -j `nproc` check-enzyme-bench
- name: graph results
if: github.event_name != 'pull_request' && matrix.build == 'Release'
run: python3 enzyme/test/upload-results.py build/test/Enzyme/results.json --url https://enzyme.mit.edu/cibench/api --token ${{ secrets.GRAPH_TOKEN }}
build-macos:
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
llvm: ["15", "16"]
build: ["Release", "Debug"] # "RelWithDebInfo"
timeout-minutes: 30
steps:
- name: add llvm
run: |
brew update
brew install llvm@${{ matrix.llvm }} make cmake
sudo python3 -m pip install --upgrade --break-system-packages --user pip lit requests
- uses: actions/checkout@v4
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
working-directory: build
run: cmake ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=/Users/runner/Library/Python/3.12/bin/lit -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm
- name: make
working-directory: build
run: make -j 3
- name: make check-typeanalysis
working-directory: build
run: make -j 3 check-typeanalysis
- name: make check-activityanalysis
working-directory: build
run: make -j 3 check-activityanalysis
- name: make check-enzyme
working-directory: build
run: make -j3 check-enzyme-bench
- name: graph results
if: github.event_name != 'pull_request' && matrix.build == 'Release'
run: python3 enzyme/test/upload-results.py build/test/Enzyme/results.json --url https://enzyme.mit.edu/cibench/api --token ${{ secrets.GRAPH_TOKEN }}
build-xcode:
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS XCode
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
llvm: ["16"]
build: ["Release"] # "RelWithDebInfo"
timeout-minutes: 30
steps:
- name: add llvm
run: |
brew install llvm@${{ matrix.llvm }} make cmake gcc
sudo python3 -m pip install --upgrade --break-system-packages --user pip lit
- uses: actions/checkout@v4
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
working-directory: build
run: |
cmake ../enzyme -GXcode -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=/Users/runner/Library/Python/3.12/bin/lit -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm
cmake --build . --parallel 3