From 8b2f49a112199f5818da7e6eeddac7a63de5f8a9 Mon Sep 17 00:00:00 2001 From: "Jae Lo Presti [j4]" Date: Tue, 5 Nov 2024 11:39:37 +0200 Subject: [PATCH 1/6] feat: add arm64 build --- .github/workflows/build-ydms.yml | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/build-ydms.yml b/.github/workflows/build-ydms.yml index 42c3dbb8f..1778eef93 100644 --- a/.github/workflows/build-ydms.yml +++ b/.github/workflows/build-ydms.yml @@ -33,6 +33,43 @@ jobs: name: opus-linux path: ${{ steps.buildoutput.outputs.build-output-dir }}/**/*.so + Build-Linux-Arm64: + name: Builds Opus for Linux on ARM64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install build dependencies + run: | + sudo apt-get update + sudo apt-get install build-essential arm-linux-gnueabi-gcc arm-linux-gnueabi-g++ + export CMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ + + - name: Download models + run: ./autogen.sh + + - name: Create build directory + run: mkdir build + + - name: Create build out variable + run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Configure CMake + working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} + environment: + CMAKE_CXX_COMPILER: 'arm-linux-gnueabi-g++' + run: cmake .. -DBUILD_SHARED_LIBS=ON + + - name: Build Opus for Linux + working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} + run: cmake --build . --config Release --target package + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: opus-linux-arm64 + path: ${{ steps.buildoutput.outputs.build-output-dir }}/**/*.so + Build-Windows: name: Builds Opus for Windows runs-on: windows-latest From a9dc2563bee10a169b21ce914ddc6658b78b216f Mon Sep 17 00:00:00 2001 From: "Jae Lo Presti [j4]" Date: Tue, 5 Nov 2024 11:40:55 +0200 Subject: [PATCH 2/6] fix: fix environment -> env --- .github/workflows/build-ydms.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-ydms.yml b/.github/workflows/build-ydms.yml index 1778eef93..a9cda802e 100644 --- a/.github/workflows/build-ydms.yml +++ b/.github/workflows/build-ydms.yml @@ -56,7 +56,7 @@ jobs: - name: Configure CMake working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} - environment: + env: CMAKE_CXX_COMPILER: 'arm-linux-gnueabi-g++' run: cmake .. -DBUILD_SHARED_LIBS=ON From a268c05fa864d441146555cf353bb0e319f7cee4 Mon Sep 17 00:00:00 2001 From: "Jae Lo Presti [j4]" Date: Tue, 5 Nov 2024 13:23:51 +0200 Subject: [PATCH 3/6] fix: add quotes so it stops complaining --- .github/workflows/build-ydms.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-ydms.yml b/.github/workflows/build-ydms.yml index a9cda802e..b944cdc87 100644 --- a/.github/workflows/build-ydms.yml +++ b/.github/workflows/build-ydms.yml @@ -42,7 +42,7 @@ jobs: - name: Install build dependencies run: | sudo apt-get update - sudo apt-get install build-essential arm-linux-gnueabi-gcc arm-linux-gnueabi-g++ + sudo apt-get install "build-essential" "arm-linux-gnueabi-gcc" "arm-linux-gnueabi-g++" export CMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ - name: Download models From a7b17c9e87ceb42a5451c692b647baedf958828e Mon Sep 17 00:00:00 2001 From: "Jae Lo Presti [j4]" Date: Tue, 5 Nov 2024 13:29:51 +0200 Subject: [PATCH 4/6] fix: update packages & create ARM toolchain file --- .github/workflows/build-ydms.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-ydms.yml b/.github/workflows/build-ydms.yml index b944cdc87..bdce4cada 100644 --- a/.github/workflows/build-ydms.yml +++ b/.github/workflows/build-ydms.yml @@ -42,9 +42,16 @@ jobs: - name: Install build dependencies run: | sudo apt-get update - sudo apt-get install "build-essential" "arm-linux-gnueabi-gcc" "arm-linux-gnueabi-g++" + sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu export CMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ + - name: Create ARM toolchain file + run: | + echo "set(CMAKE_SYSTEM_NAME Linux)" > ${{ github.workspace }}/arm-toolchain.cmake + echo "set(CMAKE_SYSTEM_PROCESSOR aarch64)" >> ${{ github.workspace }}/arm-toolchain.cmake + echo "set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)" >> ${{ github.workspace }}/arm-toolchain.cmake + echo "set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)" >> ${{ github.workspace }}/arm-toolchain.cmake + - name: Download models run: ./autogen.sh @@ -56,9 +63,7 @@ jobs: - name: Configure CMake working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} - env: - CMAKE_CXX_COMPILER: 'arm-linux-gnueabi-g++' - run: cmake .. -DBUILD_SHARED_LIBS=ON + run: cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/arm-toolchain.cmake -DBUILD_SHARED_LIBS=ON - name: Build Opus for Linux working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} From 26475198d59149c277243d91310e37baee7fbef3 Mon Sep 17 00:00:00 2001 From: "Jae Lo Presti [j4]" Date: Tue, 5 Nov 2024 13:33:36 +0200 Subject: [PATCH 5/6] fix: revert to env --- .github/workflows/build-ydms.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-ydms.yml b/.github/workflows/build-ydms.yml index bdce4cada..81378f82d 100644 --- a/.github/workflows/build-ydms.yml +++ b/.github/workflows/build-ydms.yml @@ -45,13 +45,6 @@ jobs: sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu export CMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ - - name: Create ARM toolchain file - run: | - echo "set(CMAKE_SYSTEM_NAME Linux)" > ${{ github.workspace }}/arm-toolchain.cmake - echo "set(CMAKE_SYSTEM_PROCESSOR aarch64)" >> ${{ github.workspace }}/arm-toolchain.cmake - echo "set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)" >> ${{ github.workspace }}/arm-toolchain.cmake - echo "set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)" >> ${{ github.workspace }}/arm-toolchain.cmake - - name: Download models run: ./autogen.sh @@ -63,7 +56,10 @@ jobs: - name: Configure CMake working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} - run: cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/arm-toolchain.cmake -DBUILD_SHARED_LIBS=ON + env: + CC: aarch64-linux-gnu-gcc + CXX: aarch64-linux-gnu-g++ + run: cmake .. -DBUILD_SHARED_LIBS=ON - name: Build Opus for Linux working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} From 5cbc502ff6d61a3b945d4edd68f731cd0f663e09 Mon Sep 17 00:00:00 2001 From: "Jae Lo Presti [j4]" Date: Tue, 5 Nov 2024 13:36:38 +0200 Subject: [PATCH 6/6] fix: add missing ID --- .github/workflows/build-ydms.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-ydms.yml b/.github/workflows/build-ydms.yml index 81378f82d..45dec9e55 100644 --- a/.github/workflows/build-ydms.yml +++ b/.github/workflows/build-ydms.yml @@ -52,6 +52,7 @@ jobs: run: mkdir build - name: Create build out variable + id: buildoutput run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - name: Configure CMake