# Repo CI jobs and the link to TeamCity

In an attempt to synchronize the build and test processes of CI with local development, the tools/ci/* directories underwent a considerable refactor. Many of the TeamCity entrypoint scripts that contained duplicate boilerplate were distilled down to a few shared `repo ci` jobs. They were placed in tools/ci/jobs as a means to separate them from the legacy TeamCity entrypoint wrappers. Said wrappers will gradually be deprecated in favor of direct `repo ci` calls in TeamCity.

## repo ci and you

If you are trying to replicate a TeamCity workflow locally, you can discover the available `repo ci` jobs by executing `repo ci`. It will dump all available jobs along with pointing at the underlying script that will be executed. In hopes of adding some clarity on what is actually executed on TeamCity, the following list attempts to map `repo ci` jobs to TeamCity jobs.

## Master Integration Pipeline

### Build Jobs

- Build Docs == `./repo ci docs --config=release`
- Auto Format Code == `./repo ci format`
- Build Linux AArch64 Release Only == `./repo ci build --config=release` on an ubuntu aarch64 host
- Build Linux AArch64 Debug Only == `./repo ci build --config=debug` on an ubuntu aarch64 host
- Build Linux x86_64 Release Only == `./repo ci build --config=release` on an ubuntu x86_64 host
- Build Linux x86_64 Debug Only == `./repo ci build --config=debug` on an ubuntu x86_64 host
- Build Windows x86_64 Debug Only == `repo.bat ci build --config=debug` on a windows x86_64 host
- Build Windows x86_64 Release Only == `repo.bat ci build --config=release` on a windows x86_64 host

### Test Jobs - Unit Tests

- Extension Tests - non RTX (linux-x86_64, release) == `./repo ci ext-tests-unit` on an ubuntu x86_64 host
- Extension Tests - non RTX (windows-x86_64, release) == `repo.bat ci ext-tests-unit` on a windows x86_64 host
- Extension Tests - with RTX (linux-x86_64, release) == `./repo ci ext-tests-unit-rtx` on an ubuntu x86_64 host
- Extension Tests - with RTX (windows-x86_64, release) == `repo.bat ci ext-tests-unit-rtx` on a windows x86_64 host
- Startup Test (linux-aarch64, release) == `./repo ci startuptest` on an ubuntu aarch64 host
- Startup Test (linux-x86_64, release) == `./repo ci startuptest` on an ubuntu x86_64 host
- Startup Test (windows-x86_64, release) == `repo.bat ci startuptest` on a windows x86_64 host
- Unit Tests (linux-x86_64, release) == `./repo ci cxx-unittests-ubuntu` on an ubuntu x86_64 host
- Unit Tests (windows-x86_64, release) == `repo.bat ci cxx-unittests-windows` on a windows x86_64 host

### Test Jobs - Integration Tests

- RTX Tests (Ubuntu 22.04, release, ci=premerge) == `./repo ci cxx-unittests-ubuntu-rtx` on an ubuntu x86_64 host
- RTX Tests (windows-x86_64, release, ci=premerge) == `repo.bat ci cxx-unittests-windows-rtx`  on a windows x86_64 host
- Startup Test (windows-x86_64, debug) == `repo.bat ci startuptest --config=debug` on a windows x86_64 host


### Test Jobs - End to End Tests

- Sensor tests (linux-x86_64, release) == `./repo ci ext-tests-sensors` on an ubuntu x86_64 host with TeamCity defined extra args
- Sensor tests (windows-x86_64, release) == `repo ci ext-tests-sensors` on a windows x86_64 host with TeamCity defined extra args
- Extension Test Matrix - USD Apps (linux-x86_64, release) == `./repo ci ext-tests-etm` on an ubuntu x86_64 host with TeamCity defined extra args
- Extension Test Matrix - USD Apps (windows-x86_64, release) == `repo ci ext-tests-etm` on a windows x86_64 host with TeamCity defined extra args
- Extension Test Matrix - USD Composer (linux-x86_64, release) == `./repo ci ext-tests-etm` on an ubuntu x86_64 host with TeamCity defined extra args
- Extension Test Matrix - USD Composer (windows-x86_64, release) == `repo ci ext-tests-etm` on a windows x86_64 host with TeamCity defined extra args

### Test Jobs - Unreliable Tests

- Extension Tests Unreliable (linux-x86_64, release) == `./repo ci ext-tests-unreliable` on an ubuntu x86_64 host
- Extension Tests Unreliable (windows-x86_64, release) == `repo.bat ci ext-tests-unreliable` on a windows x86_64 host
- Unit Tests Unreliable (linux-x86_64, release) == `./repo ci cxx-unittests-ubuntu-unreliable` on an ubuntu x86_64 host
- Unit Tests Unreliable (windows-x86_64, release) == `repo.bat ci cxx-unittests-windows-unreliable` on a windows x86_64 host
- RTX Tests Unreliable (Ubuntu 22.04, release, ci=premerge) == `./repo ci cxx-unittests-ubuntu-rtx-unreliable` on an ubuntu x86_64 host
- RTX Tests Unreliable (windows-x86_64, release, ci=premerge) == `repo.bat ci cxx-unittests-windows-rtx-unreliable`  on a windows x86_64 host

### Test Jobs - Nightly / Weekly tests

- Extension Tests Flaky (linux-x86_64, release) == `./repo ci ext-tests-flaky` on an ubuntu x86_64 host
- Extension Tests Flaky (windows-x86_64, release) == `repo.bat ci ext-tests-flaky` on a windows x86_64 host

- ETM Fabric Scene Delegate (linux-x86_64, release) == `./repo ci ext-tests-etm` on an ubuntu x86_64 host with TeamCity defined extra args
- ETM Fabric Scene Delegate (windows-x86_64, release) == `repo ci ext-tests-etm` on a windows x86_64 host with TeamCity defined extra args
- Extension Test Matrix - Others (linux-x86_64, release) == `./repo ci ext-tests-etm` on an ubuntu x86_64 host with TeamCity defined extra args
- Extension Test Matrix - Others (windows-x86_64, release) == `repo ci ext-tests-etm` on a windows x86_64 host with TeamCity defined extra args

- Loop Extension Tests Unreliable (linux-x86_64, release) == `./repo ci ext-tests-unreliable` on an ubuntu x86_64 host
- Loop Extension Tests Unreliable (windows-x86_64, release) == `repo ci ext-tests-unreliable` on a windows x86_64 host
- Loop Extension Tests Flaky (linux-x86_64, release) == `./repo ci ext-tests-flaky` on an ubuntu x86_64 host
- Loop Extension Tests Flaky (windows-x86_64, release) == `repo ci ext-tests-flaky` on a windows x86_64 host
- Loop Unit Tests Unreliable (linux-x86_64, release) == `./repo ci cxx-unittests-ubuntu-unreliable` on an ubuntu x86_64 host
- Loop Unit Tests Unreliable (windows-x86_64, release) == `repo.bat ci cxx-unittests-windows-unreliable` on a windows x86_64 host

- RTX Nightly Tests (linux-x86_64, release) == `./repo ci cxx-rtxnightlytests-linux-rtx-nightly` on an ubuntu x86_64 host
- RTX Nightly Tests (windows-x86_64, release) == `./repo ci cxx-rtxnightlytests-windows-rtx-nightly-dx12` on an windows x86_64 host
- RTX Nightly Tests (windows-x86_64, release) == `./repo ci cxx-rtxnightlytests-windows-rtx-nightly-vulkan` on an windows x86_64 host

## Master Pipeline

### Build Jobs

- Build Docs == `./repo ci docs --config=release`
- Build Linux AArch64 Release Only == `./repo ci build --config=release` on an ubuntu aarch64 host
- Build Linux AArch64 Debug Only == `./repo ci build --config=debug` on an ubuntu aarch64 host
- Build Linux x86_64 Release Only == `./repo ci build --config=release` on an ubuntu x86_64 host
- Build Linux x86_64 Debug Only == `./repo ci build --config=debug` on an ubuntu x86_64 host
- Build Windows x86_64 Debug Only == `repo.bat ci build --config=debug` on a windows x86_64 host
- Build Windows x86_64 Release Only == `repo.bat ci build --config=release` on a windows x86_64 host

### Testing

- Test Linux x86_64 Release Startup Tests (Ubuntu 22.04) == `./repo ci startuptest` on an ubuntu x86_64 host
- Test Linux x86_64 Release (Ubuntu 22.04) == `./repo ci cxx-unittests-ubuntu` on an ubuntu x86_64 host
- Test Linux x86_64 RTX Pre-merge (Ubuntu 22.04) == `./repo ci cxx-unittests-ubuntu` on an ubuntu x86_64 host
- Linux x86_64 Python Tests == `./repo ci pythontests` on an ubuntu x86_64 host
- Test Windows x86_64 Release Startup == `repo.bat ci startuptest` on a windows x86_64 host
- Test Windows x86_64 Debug Startup == `repo.bat ci startuptest --config=debug` on a windows x86_64 host
- Test Windows x86_64 == `repo.bat ci cxx-unittests-windows` on a windows x86_64 host
- Test Windows x86_64 RTX ci premerge == `repo.bat ci cxx-unittests-windows-rtx` on a windows x86_64 host
- Windows x86_64 Python Tests == `repo.bat ci pythontests` on a windows x86_64 host
- Extension Tests Coverage == broken

### OmniHydra scene delegate override:

Set `OMNI_HYDRA_SCENE_DELEGATE_OVERRIDE=1` environment variable to run tests with the OmniHydra scene delegate instead of the default. This applies to extension tests, etm tests and RTX C++ tests. Use it by setting the environment variable before your existing `repo ci` command.
`OMNI_HYDRA_SCENE_DELEGATE_OVERRIDE=1` will skip any tests that specify what scene delegate to use in its config to reduce duplicated test runs. Only tests without a scene delegate preference will run with OmniHydra with this environment variable.