diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49c323c6b..4e64d2d17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - target: Linux # Build using older Linux version to preserve sdk compatibility with old GLIBC # See discussion in https://github.com/getsentry/sentry-unity/issues/1730 for more details - host: ubuntu-20.04 + host: ubuntu-22.04 - target: Windows host: windows-latest uses: ./.github/workflows/sdk.yml diff --git a/.github/workflows/sdk.yml b/.github/workflows/sdk.yml index a63d11880..60397b50d 100644 --- a/.github/workflows/sdk.yml +++ b/.github/workflows/sdk.yml @@ -50,13 +50,17 @@ jobs: key: sdk=${{ inputs.target }}-${{ hashFiles('submodules-status', 'package/package.json', 'Directory.Build.targets', 'sdk-static/**') }} - name: Installing Linux Dependencies - if: ${{ inputs.target == 'Linux' && steps.cache.outputs.cache-hit != 'true' }} + if: ${{ inputs.target == 'Linux'}} run: | sudo apt-get update sudo apt-get install zlib1g-dev libcurl4-openssl-dev libssl-dev + # Ubuntu 22.04 -> 20.04 GLIBC Compatibility Solution + sudo apt-get install -y gcc-multilib g++-multilib + echo "CFLAGS=-Wl,--hash-style=both -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fstack-protector" >> $GITHUB_ENV + echo "LDFLAGS=-Wl,--hash-style=both -Wl,--dynamic-linker=/lib64/ld-linux-x86-64.so.2" >> $GITHUB_ENV + echo "CMAKE_FLAGS=-DCMAKE_C_FLAGS=\"-U__GLIBC_MINOR__ -D__GLIBC_MINOR__=26 -fPIC\" -DCMAKE_CXX_FLAGS=\"-U__GLIBC_MINOR__ -D__GLIBC_MINOR__=26 -fPIC\"" >> $GITHUB_ENV - name: Build - if: steps.cache.outputs.cache-hit != 'true' run: | git submodule update --init --recursive ${{ steps.env.outputs.submodules }} dotnet msbuild /t:Build${{ inputs.target }}SDK /p:Configuration=Release /p:OutDir=other src/Sentry.Unity