-
Notifications
You must be signed in to change notification settings - Fork 22
120 lines (94 loc) · 3.87 KB
/
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
116
117
118
119
120
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
Ubuntu:
runs-on: ubuntu-22.04
env:
CC: gcc-12
CXX: g++-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install GCC 12
run: |
sudo apt-get update
sudo apt-get install g++-12
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Install meson
run: |
python -m pip install --upgrade pip
pip install meson -U
- name: Install ninja
run: sudo apt-get install ninja-build
- name: Install zimg
run: git clone https://github.com/sekrit-twc/zimg --depth 1 --recurse-submodules --shallow-submodules && cd zimg && ./autogen.sh && CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-static --disable-shared && make -j$(nproc) && sudo make install
- name: Install VapourSynth
run: |
git clone https://github.com/vapoursynth/vapoursynth --depth 1 --branch R65
pushd vapoursynth
./autogen.sh
./configure --disable-static --disable-x86-asm --disable-vsscript --disable-vspipe --disable-python-module
make -j2
sudo make install -j2
popd
rm -rf vapoursynth
- name: Install glslang
run: sudo apt-get install glslang-dev
- name: Install libvulkan
run: sudo apt-get install libvulkan-dev
- name: Install ncnn
run: |
git clone https://github.com/Tencent/ncnn --depth 1
pushd ncnn
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr/local -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_SHARED_LIB=ON -DNCNN_SYSTEM_GLSLANG=ON -DNCNN_VULKAN=ON -DGLSLANG_TARGET_DIR=/usr/lib/x86_64-linux-gnu/cmake -G Ninja
ninja -C build
sudo ninja -C build install
popd
rm -rf ncnn
- name: Build
run: |
meson build -Duse_system_ncnn=true
ninja -C build
macOS:
runs-on: macos-13
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install automake # remove 'brew update' due to it erroring out when installing libomp, may be fixed later.
run: |
export LDFLAGS="-L/usr/local/opt/libomp/lib"
export CPPFLAGS="-I/usr/local/opt/libomp/include"
brew install libomp
brew install llvm@15
brew install automake ninja pkg-config molten-vk vulkan-headers ncnn
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Install meson
run: |
python -m pip install --upgrade pip
pip install meson -U
- name: Install zimg
run: git clone https://github.com/sekrit-twc/zimg --depth 1 --recurse-submodules --shallow-submodules && cd zimg && CC=clang CXX=clang++ ./autogen.sh && CC=clang CXX=clang++ CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-static --disable-shared && CC=clang CXX=clang++ make -j$(nproc) && sudo make install
- name: Install VapourSynth
run: |
git clone https://github.com/vapoursynth/vapoursynth --depth 1 --branch R65
pushd vapoursynth
CC=clang CXX=clang++ ./autogen.sh
CC=clang CXX=clang++ ./configure --disable-static --disable-x86-asm --disable-vsscript --disable-vspipe --disable-python-module
CC=clang CXX=clang++ make -j3
sudo make install -j3
popd
rm -rf vapoursynth
- name: Build
run: |
git submodule update --init --recursive --depth 1
PKG_CONFIG_PATH="$PWD/pkgconfig/" CC=clang CXX=clang++ meson build
CC=clang CXX=clang++ ninja -C build