-
Notifications
You must be signed in to change notification settings - Fork 7
64 lines (59 loc) · 1.72 KB
/
cmake-darwin.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
name: macOS
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: macos-14
steps:
- name: Install Go
uses: actions/[email protected]
with:
go-version: '1.22.5'
- run: go version
- uses: actions/checkout@v3
- name: Install OpenMP
run: |
brew install libomp
ls $(brew --prefix)/opt/libomp
- name: Build ffmpeg
run: cd third_party && bash install_ffmpeg.sh
- name: Configure CMake
run: OpenMP_ROOT=$(brew --prefix)/opt/libomp cmake
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DWITH_FFMPEG=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- uses: actions/upload-artifact@v4
with:
name: darwin-build
path: ${{github.workspace}}/build
- name: Test
run: ctest --verbose -C ${{env.BUILD_TYPE}} --test-dir ${{github.workspace}}/build/src/libllm
release:
permissions:
contents: write # for softprops/action-gh-release to create a release
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: download
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create release package
run: cd artifacts/darwin-build/ && zip release-darwin-arm64.zip
llm
libllm.dylib
libllmplugincublas.dylib
libllmpluginffmpeg.dylib
- name: create-release
uses: softprops/action-gh-release@v2
with:
files: |
${{github.workspace}}/build/release-darwin-arm64.zip