Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 55 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
group: unity-floating-license
cancel-in-progress: true

# Pull request builds report to, and upload their debug symbols to, the test project
# (TEST_* secrets). Everything else reports to the demo org. The build fingerprint hashes
# the destination, so cached players never cross between the two.
jobs:
format:
name: Check formatting
Expand Down Expand Up @@ -59,9 +62,9 @@ jobs:
uses: ./.github/actions/build-fingerprint
with:
target: StandaloneWindows64
sentry-dsn: ${{ secrets.DSN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

- name: Restore cached Windows player
id: cached
Expand Down Expand Up @@ -89,10 +92,10 @@ jobs:
with:
target: StandaloneWindows64
output-path: Build/StandaloneWindows64/SentaurSurvivors.exe
sentry-dsn: ${{ secrets.DSN }}
sentry-auth-token: ${{ secrets.AUTH_TOKEN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-auth-token: ${{ github.event_name == 'pull_request' && secrets.TEST_AUTH_TOKEN || secrets.AUTH_TOKEN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -139,18 +142,18 @@ jobs:
uses: ./.github/actions/build-fingerprint
with:
target: StandaloneOSX
sentry-dsn: ${{ secrets.DSN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

- name: Fingerprint iOS build
id: fingerprint-ios
uses: ./.github/actions/build-fingerprint
with:
target: iOS
sentry-dsn: ${{ secrets.DSN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

# The archives are cached rather than the build directories: they are what the
# artifacts are made of, and taring first avoids the symlink and permission
Expand Down Expand Up @@ -203,10 +206,10 @@ jobs:
with:
target: StandaloneOSX
output-path: Build/StandaloneOSX/SentaurSurvivors.app
sentry-dsn: ${{ secrets.DSN }}
sentry-auth-token: ${{ secrets.AUTH_TOKEN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-auth-token: ${{ github.event_name == 'pull_request' && secrets.TEST_AUTH_TOKEN || secrets.AUTH_TOKEN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

# Tar the bundle: upload-artifact drops the executable bit and flattens the
# symlinks that the .app relies on to launch.
Expand All @@ -221,10 +224,10 @@ jobs:
with:
target: iOS
output-path: Build/iOS
sentry-dsn: ${{ secrets.DSN }}
sentry-auth-token: ${{ secrets.AUTH_TOKEN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-auth-token: ${{ github.event_name == 'pull_request' && secrets.TEST_AUTH_TOKEN || secrets.AUTH_TOKEN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

- name: Compile iOS Xcode project
if: steps.cached-ios.outputs.hit != 'true'
Expand Down Expand Up @@ -296,18 +299,18 @@ jobs:
uses: ./.github/actions/build-fingerprint
with:
target: StandaloneLinux64
sentry-dsn: ${{ secrets.DSN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

- name: Fingerprint Android build
id: fingerprint-android
uses: ./.github/actions/build-fingerprint
with:
target: Android
sentry-dsn: ${{ secrets.DSN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

- name: Restore cached Linux player
id: cached-linux
Expand Down Expand Up @@ -357,21 +360,21 @@ jobs:
with:
target: StandaloneLinux64
output-path: Build/StandaloneLinux64/SentaurSurvivors
sentry-dsn: ${{ secrets.DSN }}
sentry-auth-token: ${{ secrets.AUTH_TOKEN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-auth-token: ${{ github.event_name == 'pull_request' && secrets.TEST_AUTH_TOKEN || secrets.AUTH_TOKEN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

- name: Build Android player
if: steps.cached-android.outputs.hit != 'true'
uses: ./.github/actions/build-player
with:
target: Android
output-path: Build/Android/SentaurSurvivors.apk
sentry-dsn: ${{ secrets.DSN }}
sentry-auth-token: ${{ secrets.AUTH_TOKEN }}
sentry-org: ${{ secrets.ORG }}
sentry-project: ${{ secrets.PROJECT }}
sentry-dsn: ${{ github.event_name == 'pull_request' && secrets.TEST_DSN || secrets.DSN }}
sentry-auth-token: ${{ github.event_name == 'pull_request' && secrets.TEST_AUTH_TOKEN || secrets.AUTH_TOKEN }}
sentry-org: ${{ github.event_name == 'pull_request' && secrets.TEST_ORG || secrets.ORG }}
sentry-project: ${{ github.event_name == 'pull_request' && secrets.TEST_PROJECT || secrets.PROJECT }}

- name: Upload Linux Build Artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -410,14 +413,26 @@ jobs:
target: StandaloneLinux64
save: true

run-demo:
# Each demo starts as soon as its players are built: Windows alongside the later
# builds, iOS and Android once the chain is through.
run-demo-windows:
name: Run Demo
# Only the Windows demo is enabled in run-demo.yml, and the Windows artifact is
# ready as soon as the first build finishes - so the demo runs alongside the
# macOS and Linux builds instead of behind them. Re-enabling a demo job for
# another platform means adding that platform's build back to this list.
needs: build-windows
uses: ./.github/workflows/run-demo.yml
secrets: inherit
with:
build-run-id: ${{ github.run_id }}
platforms: windows

# Still inside the workflow's license group, so a newer CI run cancels this one too.
# On main the players are uploaded by then, so the scheduled mobile demo carries on from
# them. A cancelled pull request run loses its mobile demo: re-run the job.
run-demo-mobile:
name: Run Demo Mobile
needs: [build-macos, build-linux]
if: ${{ !cancelled() }}
uses: ./.github/workflows/run-demo.yml
secrets: inherit
with:
build-run-id: ${{ github.run_id }}
platforms: ios,android
Loading
Loading