|
5 | 5 | - 'main' |
6 | 6 | pull_request: |
7 | 7 | branches: |
8 | | - - '*' |
| 8 | + - '**' |
9 | 9 | # Allows you to run this workflow manually from the Actions tab |
10 | 10 | workflow_dispatch: |
11 | 11 | concurrency: |
|
17 | 17 | strategy: |
18 | 18 | fail-fast: false |
19 | 19 | matrix: |
20 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
| 20 | + include: # for each os specify the build targets |
| 21 | + - os: ubuntu-latest |
| 22 | + unity-version: 2022.x |
| 23 | + build-target: StandaloneLinux64 |
| 24 | + - os: ubuntu-latest |
| 25 | + unity-version: 6000.x |
| 26 | + build-target: StandaloneLinux64 |
| 27 | + - os: windows-latest |
| 28 | + unity-version: 2022.x |
| 29 | + build-target: StandaloneWindows64 |
| 30 | + - os: windows-latest |
| 31 | + unity-version: 6000.x |
| 32 | + build-target: StandaloneWindows64 |
| 33 | + - os: macos-latest |
| 34 | + unity-version: 2022.x |
| 35 | + build-target: StandaloneOSX |
| 36 | + - os: macos-latest |
| 37 | + unity-version: 6000.x |
| 38 | + build-target: StandaloneOSX |
21 | 39 | steps: |
22 | 40 | - uses: actions/checkout@v4 |
23 | | - - run: echo "hello world" |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + with: |
| 43 | + repository: RageAgainstThePixel/com.utilities.async |
| 44 | + path: com.utilities.async |
| 45 | + ref: test |
| 46 | + - uses: RageAgainstThePixel/unity-setup@v1 |
| 47 | + with: |
| 48 | + unity-version: ${{ matrix.unity-version }} |
| 49 | + build-targets: ${{ matrix.build-target }} |
| 50 | + version-file: ${{ github.workspace }}/com.utilities.async/Utilities.Async/ProjectSettings/ProjectVersion.txt |
| 51 | + - uses: RageAgainstThePixel/activate-unity-license@v1 |
| 52 | + with: |
| 53 | + license: 'Personal' |
| 54 | + username: ${{ secrets.UNITY_USERNAME }} |
| 55 | + password: ${{ secrets.UNITY_PASSWORD }} |
| 56 | + - uses: RageAgainstThePixel/unity-action@v1 |
| 57 | + name: '${{ matrix.build-target }}-Validate' |
| 58 | + with: |
| 59 | + log-name: '${{ matrix.build-target }}-Validate' |
| 60 | + args: '-quit -nographics -batchmode -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.ValidateProject -importTMProEssentialsAsset' |
| 61 | + - uses: RageAgainstThePixel/unity-action@v1 |
| 62 | + name: '${{ matrix.build-target }}-Test' |
| 63 | + with: |
| 64 | + log-name: '${{ matrix.build-target }}-Test' |
| 65 | + build-target: ${{ matrix.build-target }} |
| 66 | + args: '-nographics -batchmode -runTests -testPlatform EditMode -testResults "${{ github.workspace }}/Logs/${{ matrix.build-target }}-results.xml"' |
| 67 | + - uses: actions/upload-artifact@v4 |
| 68 | + if: success() || failure() |
| 69 | + with: |
| 70 | + compression-level: 0 |
| 71 | + retention-days: 1 |
| 72 | + name: '${{ github.run_number }}.${{ github.run_attempt }}-${{ matrix.os }}-${{ matrix.unity-version }}-${{ matrix.build-target }}-Artifacts' |
| 73 | + path: | |
| 74 | + ${{ github.workspace }}/**/*.log |
| 75 | + - uses: ./ # RageAgainstThePixel/unity-test-summary |
| 76 | + if: success() || failure() |
| 77 | + with: |
| 78 | + test-results: ${{ github.workspace }}/Logs/*-results.xml |
0 commit comments