1# Configs that enables Deep Redudancy (DRED) 2name: DRED 3 4on: [push, pull_request] 5 6jobs: 7 CMakeBuild: 8 name: CMake/${{ matrix.config.name }} 9 runs-on: ${{ matrix.config.os }} 10 strategy: 11 fail-fast: false 12 matrix: 13 config: 14 - { 15 name: "Windows/Lib/X64/Release", 16 os: windows-latest, 17 config: Release, 18 args: -G "Visual Studio 17 2022" -DOPUS_X86_PRESUME_AVX2=ON 19 } 20 - { 21 name: "Windows/Lib/armv8/Release", 22 os: windows-latest, 23 config: Release, 24 args: -G "Visual Studio 17 2022" -A ARM64 25 } 26 - { 27 name: "Linux/Lib/X64/Release", 28 os: ubuntu-latest, 29 config: Release, 30 args: -DOPUS_X86_PRESUME_AVX2=ON 31 } 32 - { 33 name: "Android/Lib/X64/Release", 34 os: ubuntu-latest, 35 config: Release, 36 args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64" 37 } 38 - { 39 name: "Android/Lib/ARMv8/Release", 40 os: ubuntu-latest, 41 config: Release, 42 args: "-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a" 43 } 44 - { 45 name: "MacOSX/Lib/X64/Release", 46 os: macos-latest, 47 config: Release, 48 # some macs are really old in githubs lab so they don't support avx 49 args: -DOPUS_X86_PRESUME_AVX2=OFF 50 } 51 - { 52 name: "iOS/Lib/arm64/Release", 53 os: macos-latest, 54 config: Release, 55 args: -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 56 } 57 steps: 58 - uses: actions/checkout@v3 59 with: 60 fetch-depth: 0 61 - name: Install AutoConf, AutoMake and LibTool # Needed for autogen.sh 62 if: matrix.config.os == 'macos-latest' 63 run: brew install autoconf automake libtool 64 - name: Download models Windows 65 if: contains(matrix.config.name, 'Windows') 66 run: .\autogen.bat 67 - name: Download models 68 if: contains(matrix.config.name, 'MacOSX') || 69 contains(matrix.config.name, 'Linux') || 70 contains(matrix.config.name, 'Android') || 71 contains(matrix.config.name, 'iOS') 72 run: ./autogen.sh 73 - name: Create Work Dir 74 run: mkdir build 75 - name: Configure 76 working-directory: ./build 77 run: cmake .. ${{ matrix.config.args }} -DCMAKE_BUILD_TYPE=${{ matrix.config.config }} -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DOPUS_FAST_MATH=ON -DOPUS_FLOAT_APPROX=ON -DOPUS_DRED=ON -DOPUS_OSCE=ON 78 - name: Build 79 working-directory: ./build 80 run: cmake --build . -j 2 --config ${{ matrix.config.config }} --target package 81 - name: Test 82 if: contains(matrix.config.name, 'Windows') && !contains(matrix.config.name, 'ARM') && !contains(matrix.config.name, 'Dll') || 83 contains(matrix.config.name, 'MacOSX') && !contains(matrix.config.name, 'ARM') && !contains(matrix.config.name, 'Dll') || 84 contains(matrix.config.name, 'Linux') && !contains(matrix.config.name, 'ARM') && !contains(matrix.config.name, 'Dll') 85 working-directory: ./build 86 run: ctest -j 2 -C ${{ matrix.config.config }} --output-on-failure 87 88 AutoToolsBuild: 89 name: AutoTools/${{ matrix.config.name }} 90 runs-on: ${{ matrix.config.os }} 91 strategy: 92 fail-fast: false 93 matrix: 94 config: 95 - { 96 name: "Linux/GCC", 97 os: ubuntu-latest, 98 compiler: gcc, 99 automakeconfig: 100 } 101 - { 102 name: "Linux/Clang", 103 os: ubuntu-latest, 104 compiler: clang, 105 automakeconfig: 106 } 107 steps: 108 - uses: actions/checkout@v3 109 with: 110 fetch-depth: 0 111 - name: Install AutoConf, AutoMake and LibTool on MacOSX 112 if: matrix.config.os == 'macos-latest' 113 run: brew install autoconf automake libtool 114 - name: Autogen 115 run: CC=${{ matrix.config.compiler }} ./autogen.sh 116 - name: Configure 117 run: CFLAGS="-mavx -mfma -mavx2 -O2 -ffast-math" ./configure --enable-float-approx 118 - name: Build 119 run: make -j 2 120 - name: Test 121 run: make check -j 2 122