Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more configurations for Github Action and remove legacy visual studio solution #284

Closed
wants to merge 9 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .appveyor.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Autotools

on: [push, pull_request]

jobs:

AutoMakeBuild:
name: AutoMake/${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Linux/GCC",
os: ubuntu-latest,
compiler: gcc,
automakeconfig:
}
- {
name: "Linux/GCC/EnableAssertions",
os: ubuntu-latest,
compiler: gcc,
buildconfig: --enable-assertions
}
- {
name: "Linux/GCC/EnableCustomModes",
os: ubuntu-latest,
compiler: gcc,
buildconfig: --enable-assertions --enable-custom-modes
}
steps:
- uses: actions/checkout@v3
- name: Pull git submodules
run: git submodule update --init --recursive
# No AutoMake on Mac so let's install it
- name: Install AutoConf, AutoMake and LibTool on MacOSX
if: matrix.config.os == 'macos-latest'
run: brew install autoconf automake libtool
- name: Autogen
run: CC=${{ matrix.config.compiler }} ./autogen.sh
- name: Configure
run: CFLAGS="-mavx -mfma -mavx2 -O2 -ffast-math" ./configure --enable-float-approx ${{ matrix.config.buildconfig }}
- name: Build
run: make -j 2
- name: Test
run: make check -j 2
258 changes: 258 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
name: CMake

on: [push, pull_request]

jobs:
CMakeVersionTest:
name: Test build with CMake 3.1.0
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Pull git submodules
run: git submodule update --init --recursive
- name: Submodule init and Download models
run: ./autogen.sh
- name: Install CMake 3.1
run: |
curl -sL https://github.com/Kitware/CMake/releases/download/v3.1.0/cmake-3.1.0-Linux-x86_64.sh -o cmakeinstall.sh
chmod +x cmakeinstall.sh
sudo ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir
rm cmakeinstall.sh
sudo apt-get install libidn11
- name: Create Work Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake .. -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON
- name: Build
working-directory: ./build
run: make -j 2 -s
- name: Test
working-directory: ./build
run: ctest -j 2

CMakeMINGW:
name: CMake MINGW
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Pull git submodules
run: git submodule update --init --recursive
- name: Submodule init and Download models
run: ./autogen.sh
- name: Install MINGW
run: sudo apt-get install -y mingw-w64
- name: Create Work Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake .. -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config Release --target package

CMakeBuild:
name: CMake/${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Android/So/ARMv8/Release",
os: ubuntu-latest,
config: Release,
args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DBUILD_SHARED_LIBS=ON"
}
# TODO: Android ARMv7
# - {
# name: "Android/So/ARMv7/Release",
# os: ubuntu-latest,
# config: Release,
# args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DBUILD_SHARED_LIBS=ON"
# }
- {
name: "Android/So/X86/Release",
os: ubuntu-latest,
config: Release,
args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 -DBUILD_SHARED_LIBS=ON"
}
- {
name: "Android/So/X64/Release",
os: ubuntu-latest,
config: Release,
args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DBUILD_SHARED_LIBS=ON"
}
- {
name: "Windows/Dll/X86/Release",
os: windows-latest,
config: Release,
args: -G "Visual Studio 17 2022" -A Win32 -DBUILD_SHARED_LIBS=ON
}
- {
name: "Windows/Dll/X64/Release",
os: windows-latest,
config: Release,
args: -G "Visual Studio 17 2022" -A Win32 -DBUILD_SHARED_LIBS=ON
}
- {
name: "Windows/Dll/ARMv8/Release",
os: windows-latest,
config: Release,
args: -G "Visual Studio 17 2022" -A ARM64 -DBUILD_SHARED_LIBS=ON
}
- {
name: "Linux/So/X64/Release",
os: ubuntu-latest,
config: Release,
args: -DBUILD_SHARED_LIBS=ON
}
- {
name: "MacOSX/So/X64/Release",
os: macos-latest,
config: Release,
args: -DBUILD_SHARED_LIBS=ON
}
- {
name: "MacOSX/Framework/X64/Release",
os: macos-latest,
config: Release,
args: -DBUILD_FRAMEWORK=ON -DCMAKE_INSTALL_PREFIX=install
}
# use unix makefiles for iOS to avoid Xcode to complain about signing.
- {
name: "iOS/Dll/arm64/Release",
os: macos-latest,
config: Release,
args: -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64
}
# use unix makefiles for iOS to avoid Xcode to complain about signing.
- {
name: "iOS/Framework/arm64/Release",
os: macos-latest,
config: Release,
args: -G "Unix Makefiles" -DBUILD_FRAMEWORK=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64
}
- {
name: "Windows/Lib/X86/Release",
os: windows-latest,
config: Release,
args: -G "Visual Studio 17 2022" -A Win32
}
- {
name: "Windows/Lib/X64/Release",
os: windows-latest,
config: Release,
args: -G "Visual Studio 17 2022" -A Win32
}
- {
name: "Windows/Lib/armv8/Release",
os: windows-latest,
config: Release,
args: -G "Visual Studio 17 2022" -A ARM64
}
- {
name: "Linux/Lib/X64/Release",
os: ubuntu-latest,
config: Release,
args: ""
}
- {
name: "MacOSX/Lib/X64/Release",
os: macos-latest,
config: Release,
args: ""
}
# use unix makefiles for iOS to avoid Xcode to complain about signing.
- {
name: "iOS/Lib/arm64/Release",
os: macos-latest,
config: Release,
args: -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64
}
- {
name: "Android/Lib/ARMv8/Release",
os: ubuntu-latest,
config: Release,
args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a"
}
# TODO: Android ARMv7
# - {
# name: "Android/Lib/ARMv7/Release",
# os: ubuntu-latest,
# config: Release,
# args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a"
# }
- {
name: "Android/Lib/X86/Release",
os: ubuntu-latest,
config: Release,
args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86"
}
- {
name: "Android/Lib/X64/Release",
os: ubuntu-latest,
config: Release,
args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64"
}
- {
name: "CustomModes/Linux/Lib/X64/Release",
os: ubuntu-latest,
config: Release,
args: "-DOPUS_CUSTOM_MODES=ON"
}
- {
name: "AssertionsFuzz/Windows/Lib/X64/Release",
os: windows-latest,
config: Release,
args: -G "Visual Studio 17 2022" -A Win32 -DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON
}
- {
name: "AssertionsFuzz/Linux/Lib/X64/Release",
os: ubuntu-latest,
config: Release,
args: -DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON
}
- {
name: "AssertionsFuzz/MacOSX/Lib/X64/Release",
os: macos-latest,
config: Release,
args: -DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON
}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Pull git submodules
run: git submodule update --init --recursive
- name: Install AutoConf, AutoMake and LibTool # Needed for autogen.sh
if: matrix.config.os == 'macos-latest'
run: brew install autoconf automake libtool
- name: Download models Windows
if: contains(matrix.config.name, 'Windows')
run: .\autogen.bat
- name: Submodule init and Download models
if: contains(matrix.config.name, 'MacOSX') ||
contains(matrix.config.name, 'Linux') ||
contains(matrix.config.name, 'Android') ||
contains(matrix.config.name, 'iOS')
run: ./autogen.sh
- name: Create Work Dir
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake .. ${{ matrix.config.args }} -DCMAKE_BUILD_TYPE=${{ matrix.config.config }} -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON
- name: Build
working-directory: ./build
run: cmake --build . -j 2 --config ${{ matrix.config.config }} --target package
- name: Test
if: contains(matrix.config.name, 'Windows') && !contains(matrix.config.name, 'ARM') && !contains(matrix.config.name, 'Dll') ||
contains(matrix.config.name, 'MacOSX') && !contains(matrix.config.name, 'ARM') && !contains(matrix.config.name, 'Dll') ||
contains(matrix.config.name, 'Linux') && !contains(matrix.config.name, 'ARM') && !contains(matrix.config.name, 'Dll')
working-directory: ./build
run: ctest -j 2 -C ${{ matrix.config.config }} --output-on-failure
18 changes: 3 additions & 15 deletions .github/workflows/build.yml → .github/workflows/neural_fec.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
name: Opus Neural FEC Build Matrix
name: Neural FEC

on: [push, pull_request]

jobs:
CheckTrailingWhiteSpaces:
name: Check trailing white spaces
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Check Whitespaces
run: |
git diff-tree --check origin/master HEAD

CMakeBuild:
name: CMake/${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
@@ -98,8 +86,8 @@ jobs:
working-directory: ./build
run: ctest -j 2 -C ${{ matrix.config.config }} --output-on-failure

AutoMakeBuild:
name: AutoMake/${{ matrix.config.name }}
AutoToolsBuild:
name: AutoTools/${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
16 changes: 16 additions & 0 deletions .github/workflows/repository.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Repository

on: [push, pull_request]

jobs:
CheckTrailingWhiteSpaces:
name: Check trailing white spaces
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Check Whitespaces
run: |
git diff-tree --check origin/master HEAD
Loading