forked from comp-imaging/ProxImaL
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (49 loc) · 1.98 KB
/
compile-halide-cpp.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Compile Halide C++ on Windows/Linux
on:
push:
branches: [ master, validate-halide-compile-windows ]
pull_request:
types: [edited, submitted]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-20.04, ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest]
# TODO(Antony): add Python 3.9 to test the Meson build system support
python-version: ["3.10"]
steps:
- name: Fetch sources
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install gcc toolchain
run: sudo apt-get install build-essential
if: startsWith(matrix.os, 'ubuntu') == true
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install meson ninja
- name: Cache 3rd party C++ projects
uses: actions/cache@v3
with:
key: ${{ runner.os }}-meson-cache
path: proximal/halide/subprojects/packagecache/
- name: Resolve C++ build dependencies (non-Windows)
run: meson setup proximal/halide proximal/halide/build
if: startsWith(matrix.os, 'window') == false
- name: Resolve C++ build dependencies (msvc toolchain)
run: meson setup --vsenv proximal/halide proximal/halide/build
if: startsWith(matrix.os, 'window') == true
- name: Build Python interfaces
run: meson compile -C proximal/halide/build python_interface
- name: Build ProxImaL-codegen
run: meson compile -C proximal/halide/build ladmm-runtime:alias
- name: Run test suite
run: meson test -C proximal/halide/build --suite codegen