diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 81bcad7e3c..690a441db8 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -32,6 +32,9 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 + with: + # The action runs this image privileged, so it's pinned like the action + image: docker.io/tonistiigi/binfmt@sha256:400a4873b838d1b89194d982c45e5fb3cda4593fbfd7e08a02e76b03b21166f0 - uses: docker/setup-buildx-action@594f3bf4285d9ea8dc53c9a0c9c4092420091003 # v4.4.0 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de830c7944..71b9758d0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -329,6 +329,37 @@ jobs: with: path: integration-test + # Sentry turns SentryNative off on runtimes that have no native SDK. aot.Tests.ps1 checks that against this + # leg's own packages: linux-arm on the linux-arm64 runner, and win-x86 on the win-x64 runner. + - name: Install Linux ARM 32-bit dependencies + if: matrix.rid == 'linux-arm64' + run: | + sudo dpkg --add-architecture armhf + sudo apt-get update + sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf + + # Some arm64 hosts can't run 32-bit ARM binaries ("Exec format error"), so QEMU runs them on every host. Its + # binfmt_misc handler takes precedence over the kernel's own loader, so it does even where the host could. + - name: Set up QEMU for 32-bit ARM + if: matrix.rid == 'linux-arm64' + uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 + with: + # The action runs this image privileged, so it's pinned like the action + image: docker.io/tonistiigi/binfmt@sha256:400a4873b838d1b89194d982c45e5fb3cda4593fbfd7e08a02e76b03b21166f0 + platforms: arm + + - name: Check that QEMU handles 32-bit ARM binaries + if: matrix.rid == 'linux-arm64' + run: grep -q '^enabled' /proc/sys/fs/binfmt_misc/qemu-arm + + - name: Test AOT on an unsupported runtime + if: matrix.rid == 'linux-arm64' || matrix.rid == 'win-x64' + uses: getsentry/github-workflows/sentry-cli/integration-test@959162c159b866489d3fabe93327f48f9b8cb7ee # 3.4.1 + env: + RuntimeIdentifier: ${{ matrix.rid == 'linux-arm64' && 'linux-arm' || 'win-x86' }} + with: + path: integration-test/aot.Tests.ps1 + # # For the linux-musl runtimes we have to pin the ContainerBaseImage for preview or RC builds, since # # these don't conform to the normal naming conventions and don't get resolved automatically. We do # # by passing it as parameter to aot.Tests.ps1 via an environment variable @@ -484,57 +515,6 @@ jobs: msbuild-maui.binlog if-no-files-found: ignore - # Unsupported Native AOT runtimes should have SentryNative auto-disabled - # to avoid native library loading errors on startup. - unsupported-aot: - needs: build-sentry - name: Unsupported AOT (${{ matrix.rid }}) - runs-on: ${{ matrix.os }} - env: - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_NOLOGO: 1 - - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-24.04-arm - rid: linux-arm - - os: windows-latest - rid: win-x86 - - # This job is on the critical path, after the whole build-sentry matrix. aot.Tests.ps1 only publishes a - # console app against the packages from the macOS build, so it needs the .NET SDK but not the full - # Setup Environment (Java, Android SDK, workloads). - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Install Linux ARM 32-bit dependencies - if: ${{ matrix.rid == 'linux-arm' }} - run: | - sudo dpkg --add-architecture armhf - sudo apt-get update - sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf - - - name: Install .NET SDK - uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 - with: - global-json-file: global.json - - - name: Fetch NuGet Packages - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 - with: - name: ${{ github.sha }} - path: src - - - name: Test AOT - uses: getsentry/github-workflows/sentry-cli/integration-test@959162c159b866489d3fabe93327f48f9b8cb7ee # 3.4.1 - env: - RuntimeIdentifier: ${{ matrix.rid }} - with: - path: integration-test/aot.Tests.ps1 - trim-analysis: needs: build-sentry-native name: Trim analysis