-
Notifications
You must be signed in to change notification settings - Fork 203
117 lines (106 loc) · 3.94 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
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
name: BuildAll
on: [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build_halide:
name: build_halide-${{matrix.target_os}}-${{matrix.target_arch}}-${{matrix.target_bits}}
runs-on: ${{matrix.host_os}}
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
LD: ${{matrix.ld}}
THIRDPARTY_DIR: ${{github.workspace}}/3rdparty
HALIDE_BUILD_DIR: ${{github.workspace}}/3rdparty/Halide-10.0.0/build
HALIDE_INSTALL_DIR: ${{github.workspace}}/3rdparty/Halide-10.0.0/install
strategy:
matrix:
target_arch: [x86, arm]
target_bits: [32, 64]
target_os: [linux]
include:
- target_os: linux
host_os: ubuntu-18.04
cc: clang-10
cxx: clang++-10
ld: ld
steps:
- name: Configure Ubuntu/linux target os
if: startsWith(matrix.host_os, 'ubuntu')
shell: bash
run: |
sudo apt-get update
sudo apt install clang-10 llvm-10 libclang-10-dev
sudo apt purge clang-9 llvm-9 clang-8 llvm-8 clang-6.0 llvm-6.0
- uses: actions/checkout@v1
- name: Download Halide
run: |
mkdir -p ${THIRDPARTY_DIR} && cd ${THIRDPARTY_DIR}
wget https://github.com/halide/Halide/archive/v10.0.0.zip
unzip -o v10.0.0.zip
- name: Build Halide-${{matrix.target_os}}-${{matrix.target_arch}}-${{matrix.target_bits}}
working-directory: ${{ github.workspace }}/3rdparty
run: |
mkdir -p ${HALIDE_BUILD_DIR} && cd ${HALIDE_BUILD_DIR}
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HALIDE_INSTALL_DIR} \
-DWITH_TESTS=OFF -DWITH_APPS=OFF -DWITH_TUTORIALS=OFF \
-DWITH_ARM=OFF -DWITH_AARCH64=OFF -DWITH_HEXAGON=OFF -DWITH_MIPS=OFF -DWITH_POWERPC=OFF -DWITH_NVPTX=OFF -DWITH_RISCV=OFF \
..
make -j 8 install
- name: Upload Install Directory
uses: actions/upload-artifact@v1
with:
name: halide-install
path: ${{ github.workspace }}/3rdparty/Halide-10.0.0/install/
build_all:
needs: build_halide
name: build_all-${{matrix.target_os}}-${{matrix.target_arch}}-${{matrix.target_bits}}
runs-on: ${{matrix.host_os}}
env:
BUILD_DIR: ${{github.workspace}}/build
HALIDE_DISTRIB_DIR: ${{github.workspace}}/3rdparty/Halide
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
LD: ${{matrix.ld}}
THIRDPARTY_DIR: ${{github.workspace}}/3rdparty
strategy:
matrix:
target_arch: [x86, arm]
target_bits: [32, 64]
target_os: [linux]
include:
- target_os: linux
host_os: ubuntu-18.04
cc: clang
cxx: clang++
ld: ld
steps:
- uses: actions/checkout@v1
- name: Download Halide
uses: actions/download-artifact@v4.1.7
with:
name: halide-install
path: ${{github.workspace}}/3rdparty/Halide
- name: List 3rdparty
run: |
ls -lha ${{github.workspace}}/3rdparty
ls -lha ${HALIDE_DISTRIB_DIR}
- name: Install Dependencies
run: sudo apt update && sudo apt install -y libtiff-dev libraw-dev libpng-dev libjpeg-dev zlib1g-dev
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}
run: |
mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
cmake -DHALIDE_DISTRIB_DIR=${HALIDE_DISTRIB_DIR} -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
- name: Build
shell: bash
working-directory: ${{github.workspace}}
run: cd ${BUILD_DIR} && make -j 8 all
# - name: Test
# working-directory: ${{runner.workspace}}/build
# shell: bash
# # Execute tests defined by the CMake configuration.
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C $BUILD_TYPE