diff --git a/.github/workflows/OpusCompile.yml b/.github/workflows/OpusCompile.yml index 119594a..3a61fd1 100644 --- a/.github/workflows/OpusCompile.yml +++ b/.github/workflows/OpusCompile.yml @@ -141,8 +141,10 @@ jobs: - name: Build with shim working-directory: ./build run: | - if [[ "${{ matrix.arch }}" == "x64" || "${{ matrix.arch }}" == "x86" ]]; then - CC=gcc + if [[ "${{ matrix.arch }}" == "x64" ]]; then + CC="gcc -m64" + elif [[ "${{ matrix.arch }}" == "x86" ]]; then + CC="gcc -m32" elif [[ "${{ matrix.arch }}" == "arm64" ]]; then CC=${{ env.C_COMPILER }} elif [[ "${{ matrix.arch }}" == "arm32" ]]; then @@ -209,9 +211,10 @@ jobs: working-directory: ./build shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ env.ARCH }} - cl /O2 /I..\opus\include /c ..\OpusSharp.Natives\opus_shim.c /Foopus_shim.obj - link /DLL /OUT:opus.dll /DEF:NUL opus_shim.obj Release\opus.lib + if "${{ env.ARCH }}"=="Win32" (set "VCARCH=x86") else if "${{ env.ARCH }}"=="x64" (set "VCARCH=amd64") else if "${{ env.ARCH }}"=="ARM64" (set "VCARCH=amd64_arm64") else if "${{ env.ARCH }}"=="ARM" (set "VCARCH=amd64_arm") + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %VCARCH% + cl /O2 /MD /I..\opus\include /c ..\OpusSharp.Natives\opus_shim.c /Foopus_shim.obj + link /DLL /OUT:opus.dll opus_shim.obj Release\opus.lib ucrt.lib vcruntime.lib msvcrt.lib - name: Upload Artifact uses: actions/upload-artifact@v4