Optimize MP::parallelFor (#102) #216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macOS | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- '*' | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
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 | |
rm ffmpeg/version | |
- 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}} | |
- name: Copy dependencies | |
run: cp $(brew --prefix)/opt/libomp/lib/libomp.dylib ${{github.workspace}}/build/ | |
- run: install_name_tool | |
-change "$(brew --prefix)/opt/libomp/lib/libomp.dylib" | |
'@loader_path/libomp.dylib' | |
${{github.workspace}}/build/libllm.dylib | |
- 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 | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: download | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Create release package | |
run: ls -lh artifacts/darwin-build/ && | |
cd artifacts/darwin-build/ && | |
chmod +x llm && | |
tar -cvzf release-darwin-arm64.tar.gz | |
llm | |
libllm.dylib | |
libllmpluginffmpeg.dylib | |
libomp.dylib | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: darwin-package | |
path: artifacts/darwin-build/release-darwin-arm64.tar.gz | |
- name: create-release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
artifacts/darwin-build/release-darwin-arm64.tar.gz |