Skip to content

Commit b4dec6d

Browse files
authored
Add CI (#60)
1 parent 71fe10e commit b4dec6d

File tree

1 file changed

+227
-0
lines changed

1 file changed

+227
-0
lines changed

.github/workflows/build.yml

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
ubuntu-latest:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Clone
10+
uses: actions/checkout@v1
11+
12+
- name: Dependencies
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get install build-essential
16+
17+
- name: Build
18+
run: |
19+
make
20+
21+
macOS-latest:
22+
runs-on: macOS-latest
23+
24+
steps:
25+
- name: Clone
26+
uses: actions/checkout@v1
27+
28+
- name: Dependencies
29+
run: |
30+
brew update
31+
32+
- name: Build
33+
run: |
34+
make
35+
36+
# ubuntu-latest-gcc:
37+
# runs-on: ubuntu-latest
38+
#
39+
# strategy:
40+
# matrix:
41+
# build: [Debug, Release]
42+
#
43+
# steps:
44+
# - name: Clone
45+
# uses: actions/checkout@v1
46+
#
47+
# - name: Dependencies
48+
# run: |
49+
# sudo apt-get update
50+
# sudo apt-get install build-essential
51+
# sudo apt-get install cmake
52+
#
53+
# - name: Configure
54+
# run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
55+
#
56+
# - name: Build
57+
# run: |
58+
# make
59+
#
60+
# ubuntu-latest-clang:
61+
# runs-on: ubuntu-latest
62+
#
63+
# strategy:
64+
# matrix:
65+
# build: [Debug, Release]
66+
#
67+
# steps:
68+
# - name: Clone
69+
# uses: actions/checkout@v1
70+
#
71+
# - name: Dependencies
72+
# run: |
73+
# sudo apt-get update
74+
# sudo apt-get install build-essential
75+
# sudo apt-get install cmake
76+
#
77+
# - name: Configure
78+
# run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
79+
#
80+
# - name: Build
81+
# run: |
82+
# make
83+
#
84+
# ubuntu-latest-gcc-sanitized:
85+
# runs-on: ubuntu-latest
86+
#
87+
# strategy:
88+
# matrix:
89+
# sanitizer: [ADDRESS, THREAD, UNDEFINED]
90+
#
91+
# steps:
92+
# - name: Clone
93+
# uses: actions/checkout@v1
94+
#
95+
# - name: Dependencies
96+
# run: |
97+
# sudo apt-get update
98+
# sudo apt-get install build-essential
99+
# sudo apt-get install cmake
100+
#
101+
# - name: Configure
102+
# run: cmake . -DCMAKE_BUILD_TYPE=Debug -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON
103+
#
104+
# - name: Build
105+
# run: |
106+
# make
107+
#
108+
# windows:
109+
# runs-on: windows-latest
110+
#
111+
# strategy:
112+
# matrix:
113+
# build: [Release]
114+
# arch: [Win32, x64]
115+
# include:
116+
# - arch: Win32
117+
# s2arc: x86
118+
# - arch: x64
119+
# s2arc: x64
120+
#
121+
# steps:
122+
# - name: Clone
123+
# uses: actions/checkout@v1
124+
#
125+
# - name: Add msbuild to PATH
126+
# uses: microsoft/setup-msbuild@v1
127+
#
128+
# - name: Configure
129+
# run: >
130+
# cmake -S . -B ./build -A ${{ matrix.arch }}
131+
# -DCMAKE_BUILD_TYPE=${{ matrix.build }}
132+
#
133+
# - name: Build
134+
# run: |
135+
# cd ./build
136+
# msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
137+
#
138+
# - name: Upload binaries
139+
# uses: actions/upload-artifact@v1
140+
# with:
141+
# name: llama-bin-${{ matrix.arch }}
142+
# path: build/bin/${{ matrix.build }}
143+
#
144+
# windows-blas:
145+
# runs-on: windows-latest
146+
#
147+
# strategy:
148+
# matrix:
149+
# build: [Release]
150+
# arch: [Win32, x64]
151+
# blas: [ON]
152+
# include:
153+
# - arch: Win32
154+
# obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x86.zip
155+
# s2arc: x86
156+
# - arch: x64
157+
# obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip
158+
# s2arc: x64
159+
#
160+
# steps:
161+
# - name: Clone
162+
# uses: actions/checkout@v1
163+
#
164+
# - name: Add msbuild to PATH
165+
# uses: microsoft/setup-msbuild@v1
166+
#
167+
# - name: Fetch OpenBLAS
168+
# if: matrix.blas == 'ON'
169+
# run: |
170+
# C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
171+
# 7z x blas.zip -oblas -y
172+
# copy blas/include/cblas.h .
173+
# copy blas/include/openblas_config.h .
174+
# echo "blasdir=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
175+
#
176+
# - name: Configure
177+
# run: >
178+
# cmake -S . -B ./build -A ${{ matrix.arch }}
179+
# -DCMAKE_BUILD_TYPE=${{ matrix.build }}
180+
# -DLLAMA_SUPPORT_OPENBLAS=${{ matrix.blas }}
181+
# -DCMAKE_LIBRARY_PATH="$env:blasdir/lib"
182+
#
183+
# - name: Build
184+
# run: |
185+
# cd ./build
186+
# msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
187+
#
188+
# - name: Copy libopenblas.dll
189+
# if: matrix.blas == 'ON'
190+
# run: copy "$env:blasdir/bin/libopenblas.dll" build/bin/${{ matrix.build }}
191+
#
192+
# - name: Upload binaries
193+
# if: matrix.blas == 'ON'
194+
# uses: actions/upload-artifact@v1
195+
# with:
196+
# name: llama-blas-bin-${{ matrix.arch }}
197+
# path: build/bin/${{ matrix.build }}
198+
#
199+
# emscripten:
200+
# runs-on: ubuntu-latest
201+
#
202+
# strategy:
203+
# matrix:
204+
# build: [Release]
205+
#
206+
# steps:
207+
# - name: Clone
208+
# uses: actions/checkout@v1
209+
#
210+
# - name: Dependencies
211+
# run: |
212+
# wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
213+
# tar -xvf master.tar.gz
214+
# emsdk-master/emsdk update
215+
# emsdk-master/emsdk install latest
216+
# emsdk-master/emsdk activate latest
217+
#
218+
# - name: Configure
219+
# run: echo "tmp"
220+
#
221+
# - name: Build
222+
# run: |
223+
# pushd emsdk-master
224+
# source ./emsdk_env.sh
225+
# popd
226+
# emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
227+
# make

0 commit comments

Comments
 (0)