Skip to content

Opus Compile

Opus Compile #20

Workflow file for this run

name: Opus Compile
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
Linux_Build_x64:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Rename file
working-directory: ./build
run: mv libopus.so.0.10.1 opus.so
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-opus.so
path: ./build/opus.so
Linux_Build_x32:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Build Libraries
run: sudo apt-get install g++-multilib
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Rename file
working-directory: ./build
run: mv libopus.so.0.10.1 opus.so
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux-x86-opus.so
path: ./build/opus.so
Linux_Build_Arm64:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Build Libraries
run: sudo apt-get install g++-aarch64-linux-gnu
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Rename file
working-directory: ./build
run: mv libopus.so.0.10.1 opus.so
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux-arm64-opus.so
path: ./build/opus.so
Linux_Build_Arm32:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Build Libraries
run: sudo apt-get install g++-arm-linux-gnueabi
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DCMAKE_C_COMPILER=arm-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabi-g++
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Rename file
working-directory: ./build
run: mv libopus.so.0.10.1 opus.so
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux-arm32-opus.so
path: ./build/opus.so
Win_Build_x64:
if: false
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.bat
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: win-x64-opus.dll
path: ./build/Release/opus.dll
Win_Build_x32:
if: false
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.bat
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -G "Visual Studio 17 2022" -A Win32 -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: win-x32-opus.dll
path: ./build/Release/opus.dll
Win_Build_arm64:
if: false
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.bat
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -G "Visual Studio 17 2022" -A ARM64 -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: win-arm64-opus.dll
path: ./build/Release/opus.dll
Win_Build_arm32:
if: false
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.bat
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -G "Visual Studio 17 2022" -A ARM,version=10.0.22621.0 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: win-arm32-opus.dll
path: ./build/Release/opus.dll
Android_Build_x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r28c
add-to-path: false
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS='-Wl,-z,max-page-size=16384,-z,common-page-size=16384' -DCMAKE_EXE_LINKER_FLAGS='-Wl,-z,max-page-size=16384,-z,common-page-size=16384'
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Install llvm
run: sudo apt install llvm
- name: Check 16KB Alignment
working-directory: ./build
run: llvm-objdump -p libopus.so | grep LOAD
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: android-x64-libopus.so
path: ./build/libopus.so
Android_Build_x32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r28c
add-to-path: false
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS='-Wl,-z,max-page-size=16384,-z,common-page-size=16384' -DCMAKE_EXE_LINKER_FLAGS='-Wl,-z,max-page-size=16384,-z,common-page-size=16384'
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Install llvm
run: sudo apt install llvm
- name: Check 16KB Alignment
working-directory: ./build
run: llvm-objdump -p libopus.so | grep LOAD
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: android-x32-libopus.so
path: ./build/libopus.so
Android_Build_Arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r28c
add-to-path: false
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS='-Wl,-z,max-page-size=16384,-z,common-page-size=16384' -DCMAKE_EXE_LINKER_FLAGS='-Wl,-z,max-page-size=16384,-z,common-page-size=16384'
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Install llvm
run: sudo apt install llvm
- name: Check 16KB Alignment
working-directory: ./build
run: llvm-objdump -p libopus.so | grep LOAD
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: android-arm64-libopus.so
path: ./build/libopus.so
Android_Build_Arm32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r28c
add-to-path: false
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS='-Wl,-z,max-page-size=16384,-z,common-page-size=16384' -DCMAKE_EXE_LINKER_FLAGS='-Wl,-z,max-page-size=16384,-z,common-page-size=16384'
- name: Install llvm
run: sudo apt install llvm
- name: Check 16KB Alignment
working-directory: ./build
run: llvm-objdump -p libopus.so | grep LOAD
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: android-arm32-libopus.so
path: ./build/libopus.so
MacOS_Build_x64:
if: false
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Install AutoConf, AutoMake and LibTool # Needed for autogen.sh
run: brew install autoconf automake libtool
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES=x86_64
- name: Build
working-directory: ./build
run: cmake --build .
- name: Rename file
working-directory: ./build
run: mv libopus.0.10.1.dylib opus.dylib
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: macos-x86_64-opus.dylib
path: ./build/opus.dylib
MacOS_Build_arm64:
if: false
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Install AutoConf, AutoMake and LibTool # Needed for autogen.sh
run: brew install autoconf automake libtool
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake ../opus -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES=arm64
- name: Build
working-directory: ./build
run: cmake --build .
- name: Rename file
working-directory: ./build
run: mv libopus.0.10.1.dylib opus.dylib
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: macos-arm64-opus.dylib
path: ./build/opus.dylib
Wasm_Build_x64:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
- name: Clone Repository
run: git clone https://github.com/xiph/opus.git
- name: Autogen
run: ./opus/autogen.sh
- name: Create Build Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: emcmake cmake ../opus -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: wasm-libopus.a
path: ./build/libopus.a