Initial commit
Some checks failed
Create tag, test, build and upload / BumpTag (push) Successful in 11s
Create tag, test, build and upload / Test (editmode) (push) Failing after 2m29s
Create tag, test, build and upload / Test (playmode) (push) Failing after 2m24s
Create tag, test, build and upload / Test (standalone) (push) Failing after 2m24s
Create tag, test, build and upload / Build (StandaloneLinux64) (push) Has been skipped
Create tag, test, build and upload / Build (StandaloneWindows) (push) Has been skipped
Create tag, test, build and upload / Build (WebGL) (push) Has been skipped
Some checks failed
Create tag, test, build and upload / BumpTag (push) Successful in 11s
Create tag, test, build and upload / Test (editmode) (push) Failing after 2m29s
Create tag, test, build and upload / Test (playmode) (push) Failing after 2m24s
Create tag, test, build and upload / Test (standalone) (push) Failing after 2m24s
Create tag, test, build and upload / Build (StandaloneLinux64) (push) Has been skipped
Create tag, test, build and upload / Build (StandaloneWindows) (push) Has been skipped
Create tag, test, build and upload / Build (WebGL) (push) Has been skipped
This commit is contained in:
132
.gitea/workflows/push-on-main.yaml
Normal file
132
.gitea/workflows/push-on-main.yaml
Normal file
@ -0,0 +1,132 @@
|
||||
name: Create tag, test, build and upload
|
||||
run-name: Create tag, test, build and upload
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
BumpTag:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tag_name: ${{ steps.bump-tag.outputs.new_tag }}
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: false
|
||||
- name: Remove buggy pre-push hook
|
||||
run: |
|
||||
rm -f .git/hooks/pre-push
|
||||
- name: Bump version and push tag
|
||||
id: bump-tag
|
||||
uses: anothrNick/github-tag-action@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||
GIT_API_TAGGING: false
|
||||
WITH_V: true
|
||||
PRERELEASE: false
|
||||
INITIAL_VERSION: 0.1.0
|
||||
|
||||
Test:
|
||||
name: Test
|
||||
runs-on: unity
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
testMode:
|
||||
- playmode
|
||||
- editmode
|
||||
- standalone
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
# Cache
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: Library
|
||||
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
|
||||
restore-keys: |
|
||||
Library-
|
||||
|
||||
# Test
|
||||
- name: Run tests
|
||||
uses: game-ci/unity-test-runner@v4
|
||||
id: tests
|
||||
env:
|
||||
UNITY_LICENSE: ${{ secrets.UNITYLICENSE }}
|
||||
UNITY_EMAIL: ${{ secrets.UNITYEMAIL }}
|
||||
UNITY_PASSWORD: ${{ secrets.UNITYPASSWORD }}
|
||||
with:
|
||||
useHostNetwork: true
|
||||
unityVersion: 2022.3.42f1
|
||||
customImage: 'unityci/editor:ubuntu-2022.3.42f1-linux-il2cpp-3'
|
||||
dockerCpuLimit: 4
|
||||
dockerMemoryLimit: 8g
|
||||
testMode: ${{ matrix.testMode }}
|
||||
artifactsPath: ${{ matrix.testMode }}-artifacts
|
||||
checkName: ${{ matrix.testMode }} Test Results
|
||||
customParameters: -testCategory "!AltTester"
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: Test results for ${{ matrix.testMode }}
|
||||
path: ${{ steps.tests.outputs.artifactsPath }}
|
||||
- name: Upload test coverage
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: Coverage results for ${{ matrix.testMode }}
|
||||
path: ${{ steps.tests.outputs.coveragePath }}
|
||||
|
||||
Build:
|
||||
name: Build
|
||||
needs: Test
|
||||
runs-on: unity
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
targetPlatform:
|
||||
- WebGL # WebGL.
|
||||
- StandaloneLinux64 # Build a Linux 64-bit standalone.
|
||||
- StandaloneWindows # Build a Windows 64-bit standalone.
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
# Cache
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: Library
|
||||
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
|
||||
restore-keys: |
|
||||
Library-
|
||||
|
||||
# Build
|
||||
- name: Build project
|
||||
uses: game-ci/unity-builder@v4
|
||||
env:
|
||||
UNITY_LICENSE: ${{ secrets.UNITYLICENSE }}
|
||||
UNITY_EMAIL: ${{ secrets.UNITYEMAIL }}
|
||||
UNITY_PASSWORD: ${{ secrets.UNITYPASSWORD }}
|
||||
with:
|
||||
unityVersion: 2022.3.42f1
|
||||
dockerCpuLimit: 4
|
||||
dockerMemoryLimit: 8g
|
||||
targetPlatform: ${{ matrix.targetPlatform }}
|
||||
allowDirtyBuild: true # necessary because the custom image doesn't fit the repo's version and it tries to change stuff accordingly ntm
|
||||
- name: Upload build
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Build-${{ matrix.targetPlatform }}
|
||||
path: build/${{ matrix.targetPlatform }}
|
Reference in New Issue
Block a user