-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (76 loc) · 2.6 KB
/
opus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Update Opus
on:
release:
types:
- published
workflow_dispatch:
push:
branches:
- master
paths:
- '.github/workflows/opus.yml'
permissions:
contents: write
jobs:
build:
name: Build Opus for ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Linux x64",
os: ubuntu-latest,
install-deps: "sudo apt-get update && sudo apt-get -y install autoconf automake libtool gcc cmake make",
args: "",
find-file: "libopus.so.*.*.*",
file: "libopus.so"
}
- {
name: "MacOS x64",
os: macos-latest,
install-deps: "brew install autoconf automake libtool gcc cmake make && export PATH=\"/usr/local/opt/make/libexec/gnubin:$PATH\"",
args: "",
find-file: "libopus.*.*.*.dylib",
file: "libopus.dylib"
}
- {
name: "Windows x64",
os: windows-latest,
install-deps: "",
args: "-G \"Visual Studio 17 2022\" -A x64",
find-file: "opus.dll",
file: "Release/opus.dll"
}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up MSBuild
if: matrix.config.os == 'windows-latest'
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- name: Install dependencies
run: ${{ matrix.config.install-deps }}
- name: Build on ${{ matrix.config.name }}
run: |
git clone https://gitlab.xiph.org/xiph/opus libs/opus
cd libs/opus
echo "OPUS_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
git checkout $OPUS_VERSION
cmake -S . -B build ${{ matrix.config.args }} -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev
cmake --build build --config Release
rm "${{ github.workspace }}/libs/libopus/${{ matrix.config.file }}"
mv build/${{ matrix.config.find-file }} "${{ github.workspace }}/libs/libopus/${{ matrix.config.file }}"
- name: "Update ${{ matrix.config.file }}"
uses: EndBug/add-and-commit@v9
if: ${{ env.OPUS_VERSION }}
with:
add: "libs/libopus/"
default_author: github_actions
message: Update ${{ matrix.config.file }} to ${{ env.OPUS_VERSION }}
pull: '--rebase --autostash'
push: true