Skip to content

Commit

Permalink
✨ feat: Add workflow for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
caoccao committed Aug 24, 2024
1 parent 17ab414 commit eab692a
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: caocao
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: caoccao
otechie: # Replace with a single Otechie username
custom: ['https://paypal.me/caoccao?locale.x=en_US'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
101 changes: 101 additions & 0 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: MacOS Build

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "**.md"
- "docs/**"
push:
branches:
- main
paths-ignore:
- "**.md"
- "docs/**"

env:
BETTER_MEDIA_INFO_VERSION: 0.1.0

jobs:
build_package:
strategy:
matrix:
include:
- image: macos-13
os: macos
arch: x86_64
- image: macos-14
os: macos
arch: arm64

name: Build for ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.image }}

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout the code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Install brew packages
run: |
brew install autoconf automake libtool pkg-config zlib wxwidgets
- name: Build ZLib
run: |
cd ..
curl -o zlib.tar.gz https://www.zlib.net/zlib-1.3.1.tar.gz
tar -xzvf zlib.tar.gz
mv zlib-1.3.1 ZLib
rm zlib.tar.gz
cd ZLib
./configure --static
make -j 4
- name: Build ZenLib
run: |
cd ..
git clone https://github.com/MediaArea/ZenLib.git
cd ZenLib/Project/GNU/Library
./autogen.sh
./configure --enable-static
make -j 4
- name: Build MediaInfoLib
run: |
cd ..
git clone https://github.com/MediaArea/MediaInfoLib.git
cd MediaInfoLib/Project/GNU/Library
./autogen.sh
./configure --enable-static
make -j 4
- name: Build Better Media Info
run: |
pnpm install
pnpm tauri build
- name: Upload the Artifact
uses: actions/upload-artifact@v4
with:
name: Better_Media_Info-${{ matrix.os }}-${{ matrix.arch }}-${{ env.BETTER_MEDIA_INFO_VERSION }}
path: |
src-tauri/target/release/bundle/dmg/*.dmg

0 comments on commit eab692a

Please sign in to comment.