2023-01-30 00:19:03 +01:00
|
|
|
# github workflow to automate builds
|
|
|
|
|
2022-02-15 03:17:29 +01:00
|
|
|
name: macOS build
|
|
|
|
|
2023-01-30 00:19:03 +01:00
|
|
|
on: [push, pull_request, workflow_dispatch]
|
2022-02-15 03:17:29 +01:00
|
|
|
|
|
|
|
env:
|
|
|
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: CMake, macOS
|
|
|
|
runs-on: macos-latest
|
2023-01-30 00:19:03 +01:00
|
|
|
|
2022-02-15 03:17:29 +01:00
|
|
|
steps:
|
2022-10-24 16:26:49 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-15 03:17:29 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: brew install autoconf automake cmake ffmpeg jansson libao libvorbis mpg123
|
|
|
|
|
|
|
|
- name: Cache celt
|
2022-10-24 16:26:49 +02:00
|
|
|
uses: actions/cache@v3
|
2022-02-15 03:17:29 +01:00
|
|
|
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
|
2022-10-24 16:26:49 +02:00
|
|
|
uses: actions/cache@v3
|
2022-02-15 03:17:29 +01:00
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}/build/dependencies/LibAtrac9/bin
|
|
|
|
key: mac-atrac9-${{ hashFiles('cmake/dependencies/atrac9.cmake') }}
|
|
|
|
|
|
|
|
- name: Cache g719
|
2022-10-24 16:26:49 +02:00
|
|
|
uses: actions/cache@v3
|
2022-02-15 03:17:29 +01:00
|
|
|
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
|
2022-10-24 16:26:49 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-15 03:17:29 +01:00
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}/build/cli/vgmstream-cli
|
2022-02-15 10:59:52 +01:00
|
|
|
name: vgmstream-mac
|
2023-01-29 21:12:45 +01:00
|
|
|
|
|
|
|
# uploads current assets to vgmstream-releases (token only works on merges)
|
|
|
|
- name: Upload artifacts to vgmstream-releases
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
working-directory: ${{github.workspace}}
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
UPLOADER_GITHUB_TOKEN: ${{ secrets.UPLOADER_GITHUB_TOKEN }}
|
2023-01-29 23:11:33 +01:00
|
|
|
# tar cvfz vgmstream-linux-123.tar.gz -C ./build/cli vgmstream123
|
|
|
|
# tar cvfz vgmstream-linux-audacious.tar.gz -C ./build/audacious vgmstream.so
|
2023-01-29 23:25:29 +01:00
|
|
|
run: |
|
|
|
|
tar cvfz vgmstream-mac-cli.tar.gz -C ./build/cli vgmstream-cli
|
2023-01-30 00:19:03 +01:00
|
|
|
python3 .github/uploader.py vgmstream-mac-cli.tar.gz
|