Add macOS build GitHub Actions

This commit is contained in:
xxyzz 2022-02-15 10:17:29 +08:00
parent 12e5b4be0a
commit ab316e0989
No known key found for this signature in database
GPG Key ID: F796163E6DCFEE9D
2 changed files with 54 additions and 0 deletions

53
.github/workflows/cmake-mac.yml vendored Normal file
View File

@ -0,0 +1,53 @@
name: macOS build
on: [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
name: CMake, macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: brew install autoconf automake cmake ffmpeg jansson libao libvorbis mpg123
- name: Cache celt
uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/dependencies/celt-0061
${{ github.workspace }}/dependencies/celt-0110
${{ github.workspace }}/build/dependencies/celt-0061/libcelt/.libs
${{ github.workspace }}/build/dependencies/celt-0110/libcelt/.libs
key: mac-celt-${{ hashFiles('cmake/dependencies/celt.cmake') }}
- name: Cache atrac9
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/build/dependencies/LibAtrac9/bin
key: mac-atrac9-${{ hashFiles('cmake/dependencies/atrac9.cmake') }}
- name: Cache g719
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/build/dependencies/libg719_decode/libg719_decode.a
key: mac-g719-${{ hashFiles('cmake/dependencies/g719.cmake') }}
- name: Build
run: |
export LIBRARY_PATH=$(brew --prefix)/lib
cmake -S . -B build -DBUILD_AUDACIOUS:BOOL=OFF -DCMAKE_BUILD_TYPE=$BUILD_TYPE
cmake --build build
- name: Upload CLI tools artifact
uses: actions/upload-artifact@v2
with:
path: ${{ github.workspace }}/build/cli/vgmstream-cli
name: vgmstream-cli

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
.*
!/.gitignore
!.gitattributes
!.github
*.user
*.o
*.a