Skip to content

Update OpusCompile.yml #23

Update OpusCompile.yml

Update OpusCompile.yml #23

Workflow file for this run

name: Opus Compile

Check failure on line 1 in .github/workflows/OpusCompile.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/OpusCompile.yml

Invalid workflow file

(Line: 28, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory, (Line: 32, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory, (Line: 36, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory, (Line: 40, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
Android:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, x86, arm64, arm32]
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 }}
# Not much I can do to reduce the bloat.
- name: Set Variables
if: ${{ matrix.arch == 'x64' }}
env:
ABI: x86_64
- name: Set Variables
if: ${{ matrix.arch == 'x86' }}
env:
ABI: x86
- name: Set Variables
if: ${{ matrix.arch == 'arm64' }}
env:
ABI: arm64-v8a
- name: Set Variables
if: ${{ matrix.arch == 'arm32' }}
env:
ABI: armeabi-v7a
- name: Install Required Packages
run: sudo apt install llvm
- 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=${{ env.ABI }} -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: Check Alignment
working-directory: ./build
run: llvm-objdump -p libopus.so | grep LOAD
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: android-${{ matrix.abi }}-libopus.so
path: ./build/libopus.so
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
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