-
Notifications
You must be signed in to change notification settings - Fork 9
166 lines (133 loc) · 5.23 KB
/
Copy pathUbuntu-latest.yml
File metadata and controls
166 lines (133 loc) · 5.23 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: Test on Ubuntu Linux
on: workflow_dispatch
on:
push:
branches: [ "master", "dev-new"]
pull_request:
branches: [ "master", "dev-new"]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
COMET_SRC: ${{github.workspace}}
COMETPY_COMET_PATH: ${{github.workspace}}/build/comet/
COMETPY_LLVM_PATH: ${{github.workspace}}/build/llvm/
jobs:
build-comet-and-dependencies:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
# - name: Install CMake
# run: sudo apt-get install cmake && sudo apt-get install ninja-build
- name: Cache Submodules
id: cache-submodule
uses: actions/cache@v4
# if: always()
with:
path: |
${{github.workspace}}/build/llvm
${{github.workspace}}/build/blis
key: ${{ runner.os }}-submodules
- name: Build clean
if: steps.cache-submodule.outputs.cache-hit != 'true'
run: mkdir ${{github.workspace}}/build && cd ${{github.workspace}}/build && cmake ../ -DCMAKE_BUILD_TYPE=Release && make
- name: Build from cached
if: steps.cache-submodule.outputs.cache-hit == 'true'
run: cd ${{github.workspace}}/build && cmake ../ -DCMAKE_BUILD_TYPE=Release -DLLVM_CUSTOM_BUILD_PATH=${{github.workspace}}/build/llvm -DCMAKE_BUILD_TYPE=Release && make
test-comet-backend:
needs: build-comet-and-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - uses: lukka/get-cmake@latest
- name: Install CMake
run: sudo apt-get install cmake && sudo apt-get install ninja-build
- name: Cache Submodules
id: cache-submodule
uses: actions/cache@v4
# if: always()
with:
path: |
${{github.workspace}}/build/llvm
${{github.workspace}}/build/blis
key: ${{ runner.os }}-submodules
- name: Build COMET
working-directory: ${{github.workspace}}/build/
# Build your program with the given configuration
run: cmake .. -DLLVM_CUSTOM_BUILD_PATH=${{github.workspace}}/build/llvm -DCMAKE_BUILD_TYPE=Release && make
- name: Initialize Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install python dependencies
run: |
sudo apt-get install -y python3-psutil
sudo apt-get install -y python3-pip
- name: Test
working-directory: ${{github.workspace}}/build/comet/
shell: bash
run: ninja check-comet-integration
# ${{github.workspace}}/llvm/build/bin/mlir-cpu-runner --help
# ${{github.workspace}}/build/bin/comet-opt --help
# test-rust-frontend:
# needs: build-comet
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Cache Submodules
# id: cache-submodule
# uses: actions/cache@v4
# # if: always()
# with:
# path: |
# ${{github.workspace}}/llvm
# ${{github.workspace}}/blis/
# ${{github.workspace}}/install/
# ${{github.workspace}}/build/
# key: ${{ runner.os }}-submodules
# - name: Setup Rust environment
# run: rustup update stable && rustup default stable
# - name: Test Rust Frontend
# env:
# COMET_DIR: ${{github.workspace}}/
# working-directory: ${{github.workspace}}/frontends/rust/comet-rs
# run: |
# cargo build
# cargo test
test-cometpy:
needs: build-comet-and-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Submodules
id: cache-submodule
uses: actions/cache@v4
# if: always()
with:
path: |
${{github.workspace}}/build/llvm
${{github.workspace}}/build/blis
key: ${{ runner.os }}-submodules
- name: Initialize Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install python dependencies
run: |
sudo apt-get install -y python3-pip
- name: Build COMET
working-directory: ${{github.workspace}}/build/
# Build your program with the given configuration
run: cmake .. -DLLVM_CUSTOM_BUILD_PATH=${{github.workspace}}/build/llvm -DCMAKE_BUILD_TYPE=Release && make
- name: Setup cometPy
run: cd ${{github.workspace}}/frontends/numpy-scipy/ && pip3 install -e .
- name: Install PyTest
run: pip3 install -U pytest
- name: Test CometPy
working-directory: ${{github.workspace}}/frontends/numpy-scipy/integration_tests/
run: pytest