From f09b22b033b6c989406b150e469afeb381baf18e Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Mon, 28 Jul 2025 13:34:35 -0400 Subject: [PATCH 1/2] Add test workflow --- .github/workflows/test.yml | 70 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a310107a57..5ba681a883 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,3 +56,73 @@ jobs: - name: Run Cargo Tests run: cargo test --workspace --target ${{ matrix.target }} ${{ matrix.feature-args }} + + cross-platform-test: + strategy: + fail-fast: false + matrix: + os: [macos-14, macos-14-large] + feature-args: ['', '-Funstable-mobile-app'] + include: + - feature-args: '' + feature-suffix: '' + - feature-args: '-Funstable-mobile-app' + feature-suffix: ' (-Funstable-mobile-app)' + + name: Build on macOS 14, Test on macOS 13${{ matrix.feature-suffix }} + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout Repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + + - name: Cache Dependencies + uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # 2.8.0 + + - name: Build on macOS 14 + run: cargo build --release --workspace ${{ matrix.feature-args }} + + - name: Upload Build Artifacts + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2 + with: + name: sentry-cli-macos14-build${{ matrix.feature-suffix }}-${{ matrix.os }} + path: target/release/sentry-cli + retention-days: 1 + + cross-platform-test-runner: + needs: cross-platform-test + strategy: + fail-fast: false + matrix: + os: [macos-13, macos-13-xlarge] + feature-args: ['', '-Funstable-mobile-app'] + include: + - os: macos-13 + base-os: macos-14-large + - os: macos-13-xlarge + base-os: macos-14 + - feature-args: '' + feature-suffix: '' + - feature-args: '-Funstable-mobile-app' + feature-suffix: ' (-Funstable-mobile-app)' + + name: Run macOS 13 ${{ matrix.feature-suffix }} + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout Repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + + - name: Download Build Artifacts + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0 + with: + name: sentry-cli-macos14-build${{ matrix.feature-suffix }}-${{ matrix.base-os }} + path: ./bin + + - name: Make Binary Executable + run: chmod +x ./bin/sentry-cli + + - name: Test Binary Compatibility + run: | + # Ensure the cli runs + ./bin/sentry-cli --help \ No newline at end of file From 58a203722729b75266a0216ff74b9d5d0d1da80e Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Mon, 28 Jul 2025 13:51:26 -0400 Subject: [PATCH 2/2] Simplify --- .github/workflows/test.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ba681a883..7db405cb38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,7 +61,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14, macos-14-large] + os: [macos-14] feature-args: ['', '-Funstable-mobile-app'] include: - feature-args: '' @@ -69,7 +69,7 @@ jobs: - feature-args: '-Funstable-mobile-app' feature-suffix: ' (-Funstable-mobile-app)' - name: Build on macOS 14, Test on macOS 13${{ matrix.feature-suffix }} + name: Build on macOS 14 ${{ matrix.feature-suffix }} runs-on: ${{ matrix.os }} steps: @@ -79,14 +79,17 @@ jobs: - name: Cache Dependencies uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # 2.8.0 + - name: Add Target + run: rustup target add x86_64-apple-darwin + - name: Build on macOS 14 - run: cargo build --release --workspace ${{ matrix.feature-args }} + run: cargo build --release --workspace ${{ matrix.feature-args }} --target=x86_64-apple-darwin - name: Upload Build Artifacts uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2 with: - name: sentry-cli-macos14-build${{ matrix.feature-suffix }}-${{ matrix.os }} - path: target/release/sentry-cli + name: sentry-cli-macos14-build${{ matrix.feature-suffix }} + path: target/x86_64-apple-darwin/release/sentry-cli retention-days: 1 cross-platform-test-runner: @@ -94,13 +97,9 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, macos-13-xlarge] + os: [macos-13-xlarge] feature-args: ['', '-Funstable-mobile-app'] include: - - os: macos-13 - base-os: macos-14-large - - os: macos-13-xlarge - base-os: macos-14 - feature-args: '' feature-suffix: '' - feature-args: '-Funstable-mobile-app' @@ -116,7 +115,7 @@ jobs: - name: Download Build Artifacts uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0 with: - name: sentry-cli-macos14-build${{ matrix.feature-suffix }}-${{ matrix.base-os }} + name: sentry-cli-macos14-build${{ matrix.feature-suffix }} path: ./bin - name: Make Binary Executable