Skip to content

Commit a86cdd4

Browse files
committed
improve enzyme-ci
1 parent d79e612 commit a86cdd4

File tree

1 file changed

+26
-31
lines changed

1 file changed

+26
-31
lines changed

.github/workflows/enzyme-ci.yml

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@ jobs:
2424
steps:
2525
- name: add llvm
2626
run: |
27-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
28-
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
29-
sudo apt-get install -y cmake gcc g++ llvm-${{ matrix.llvm }}-dev libzstd-dev
27+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
28+
sudo apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-${{ matrix.llvm }} main"
29+
sudo apt-get install -y cmake ninja-build llvm-${{ matrix.llvm }}-dev
3030
sudo python3 -m pip install --upgrade pip lit
3131
- uses: actions/checkout@v4
3232
- name: mkdir
33-
run: rm -rf build && mkdir build
33+
run: mkdir build
3434
- name: cmake
3535
working-directory: build
36-
run: cmake ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
37-
- name: make
36+
run: cmake -G Ninja ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
37+
- name: build
3838
working-directory: build
39-
run: make -j `nproc`
40-
- name: make check-typeanalysis
39+
run: ninja
40+
- name: check-typeanalysis
4141
working-directory: build
42-
run: make -j `nproc` check-typeanalysis
43-
- name: make check-activityanalysis
42+
run: ninja check-typeanalysis
43+
- name: ninja check-activityanalysis
4444
working-directory: build
45-
run: make -j `nproc` check-activityanalysis
46-
- name: make check-enzyme
45+
run: ninja check-activityanalysis
46+
- name: check-enzyme
4747
working-directory: build
48-
run: make -j `nproc` check-enzyme-bench
48+
run: ninja check-enzyme-bench
4949

5050
build-macos:
5151
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS
@@ -60,28 +60,25 @@ jobs:
6060
timeout-minutes: 30
6161
steps:
6262
- name: add llvm
63-
run: |
64-
brew update
65-
brew install llvm@${{ matrix.llvm }} make cmake
66-
sudo python3 -m pip install --upgrade --break-system-packages --user pip lit requests
63+
run: brew install llvm@${{ matrix.llvm }} ninja-build cmake lit
6764
- uses: actions/checkout@v4
6865
- name: mkdir
69-
run: rm -rf build && mkdir build
66+
run: mkdir build
7067
- name: cmake
7168
working-directory: build
72-
run: cmake ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`find /Users/runner/Library/Python/ -iname lit` -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm
73-
- name: make
69+
run: cmake -G Ninja ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm
70+
- name: build
7471
working-directory: build
75-
run: make -j 3
76-
- name: make check-typeanalysis
72+
run: ninja
73+
- name: check-typeanalysis
7774
working-directory: build
78-
run: make -j 3 check-typeanalysis
79-
- name: make check-activityanalysis
75+
run: ninja check-typeanalysis
76+
- name: check-activityanalysis
8077
working-directory: build
81-
run: make -j 3 check-activityanalysis
82-
- name: make check-enzyme
78+
run: ninja check-activityanalysis
79+
- name: check-enzyme
8380
working-directory: build
84-
run: make -j3 check-enzyme-bench
81+
run: ninja check-enzyme-bench
8582

8683
build-xcode:
8784
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS XCode
@@ -96,12 +93,10 @@ jobs:
9693
timeout-minutes: 30
9794
steps:
9895
- name: add llvm
99-
run: |
100-
brew install llvm@${{ matrix.llvm }} make cmake gcc
101-
sudo python3 -m pip install --upgrade --break-system-packages --user pip lit
96+
run: brew install llvm@${{ matrix.llvm }} make cmake lit
10297
- uses: actions/checkout@v4
10398
- name: mkdir
104-
run: rm -rf build && mkdir build
99+
run: mkdir build
105100
- name: cmake
106101
working-directory: build
107102
run: |

0 commit comments

Comments
 (0)