-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (79 loc) · 2.6 KB
/
build.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
name: build
on:
push:
branches: [ master ]
jobs:
lifuren:
name: Build lifuren
# https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout deps
run: |
git submodule update --init --recursive
cd ./deps
################################ fltk
sudo apt install libfltk1.3-dev -y
apt-cache madison libfltk1.3-dev
################################ json
cd ./json
git switch -c v3.11.2
cd ../
################################ spdlog
# sudo apt install libspdlog-dev -y
# apt-cache madison libspdlog-dev
git clone https://github.com/fmtlib/fmt.git
cd fmt
git switch -c 10.2.0
mkdir build ; cd $_
cmake .. -DFMT_TEST=OFF
make -j 8
sudo make install
cd ../../
git clone https://github.com/gabime/spdlog.git
cd spdlog
git switch -c v1.12.0
mkdir build ; cd $_
cmake .. -DSPDLOG_BUILD_EXAMPLE=OFF
make -j 8
sudo make install
cd ../../
################################ opencv
sudo apt install libopencv-dev -y
apt-cache madison libopencv-dev
################################ libtorch
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.2.1%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-2.2.1+cpu.zip
################################ yaml-cpp
sudo apt install libyaml-cpp-dev -y
apt-cache madison libyaml-cpp-dev
################################ cpp-httplib
# sudo apt install libcpp-httplib-dev -y
# apt-cache madison libcpp-httplib-dev
git clone https://github.com/yhirose/cpp-httplib.git
cd cpp-httplib
git switch -c v0.16.2
mkdir build ; cd $_
cmake ..
make -j 8
sudo make install
cd ../../
################################ stable-diffusion.cpp
cd ./stable-diffusion.cpp
git switch -c master-c837c5d
cd ../
- name: Deploy lifuren
run: |
pwd
gcc -v
g++ -v
cmake -version
mkdir build ; cd $_
cmake ..
make -j
ls -lh Debug/bin
ls -lh Debug/lib
sudo make install
make clean