Skip to content

Commit

Permalink
CI ffmpeg build
Browse files Browse the repository at this point in the history
  • Loading branch information
k1nho committed Jun 20, 2024
1 parent a766643 commit 2a5cf72
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
fail-fast: false
matrix:
build:
- name: "Gahara"
platform: "linux/amd64"
os: "ubuntu-latest"
- name: "Gahara"
platform: "darwin/universal"
os: "macos-latest"
Expand All @@ -31,6 +28,12 @@ jobs:
with:
submodules: recursive

- name: Download FFmpeg for macOS
if: matrix.build.platform == 'darwin/universal'
run: |
chmod +x hack/setup.sh
./hack/setup.sh {{matrix.build.platform}}
- name: Build wails
uses: dAppServer/[email protected]
id: build
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.PHONY: ffmpeg
ffmpeg:
chmod +x ./hack/setup.sh
./hack/setup.sh darwin/universal


.PHONY: cleanup
cleanup:
rm -rf ./resources/
20 changes: 20 additions & 0 deletions hack/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

PLATFORM=$1

if [[ "$PLATFORM" == "darwin/universal" ]]; then
echo "Setting up FFmpeg for macOS"
curl -O https://evermeet.cx/ffmpeg/ffmpeg-115960-g3a5202d026.zip
unzip ffmpeg-115960-g3a5202d026.zip
mkdir -p resources/darwin/
mv ffmpeg resources/darwin/ffmpeg
chmod +x resources/darwin/ffmpeg
rm -rf ffmpeg-115960-g3a5202d026.zip
elif [[ "$PLATFORM" == "linux/amd64" ]]; then
echo "Setting up FFmpeg for Linux"
elif [[ "$PLATFORM" == "windows" ]]; then
echo "Setting up FFmpeg for Windows"
else
echo "Unsupported platform: $PLATFORM"
exit 1
fi
Binary file removed resources/darwin/ffmpeg
Binary file not shown.

0 comments on commit 2a5cf72

Please sign in to comment.