meta: add Woodpecker CI
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline failed Details

This commit is contained in:
Branden J Brown 2023-07-16 23:49:06 -05:00
parent 038818ca70
commit bf25f26cd3
1 changed files with 19 additions and 7 deletions

View File

@ -10,13 +10,11 @@ matrix:
UNITY_ACTIVATION_FILE: ./unity3d.alf UNITY_ACTIVATION_FILE: ./unity3d.alf
IMAGE: unityci/editor IMAGE: unityci/editor
IMAGE_VERSION: 1 IMAGE_VERSION: 1
# The GitLab version pulls the Unity version from the project information, # The GitLab version pulls the Unity version from the project information,
# but I don't think Woodpecker will use that as a variable in image names. # but I don't think Woodpecker will use that as a variable in image names.
# We set the version as a variable instead and check that it's right. # We set the version as a variable instead and check that it's right.
UNITY_VERSION: 2022.3.4f1 UNITY_VERSION: 2022.3.4f1
UNITY_DIR: /studio/idle-survivors UNITY_DIR: /studio/idle-survivors
VERSION_NUMBER_VAR: ${CI_COMMIT_BRANCH}-${CI_BUILD_NUMBER}
VERSION_BUILD_VAR: ${CI_COMMIT_HASH}
pipeline: pipeline:
check-unity-version: check-unity-version:
@ -38,6 +36,11 @@ pipeline:
environment: environment:
- TEST_PLATFORM=playmode - TEST_PLATFORM=playmode
- TESTING_TYPE=NUNIT - TESTING_TYPE=NUNIT
- VERSION_NUMBER_VAR=${CI_COMMIT_BRANCH}-${CI_BUILD_NUMBER}
- VERSION_BUILD_VAR=${CI_COMMIT_HASH}
when:
branch:
exclude: [main]
test-editmode: test-editmode:
image: ${IMAGE}:${UNITY_VERSION}-base-${IMAGE_VERSION} image: ${IMAGE}:${UNITY_VERSION}-base-${IMAGE_VERSION}
group: test group: test
@ -47,6 +50,11 @@ pipeline:
environment: environment:
- TEST_PLATFORM=editmode - TEST_PLATFORM=editmode
- TESTING_TYPE=NUNIT - TESTING_TYPE=NUNIT
- VERSION_NUMBER_VAR=${CI_COMMIT_BRANCH}-${CI_BUILD_NUMBER}
- VERSION_BUILD_VAR=${CI_COMMIT_HASH}
when:
branch:
exclude: [main]
build-standalone-windows: build-standalone-windows:
image: ${IMAGE}:${UNITY_VERSION}-windows-mono-${IMAGE_VERSION} image: ${IMAGE}:${UNITY_VERSION}-windows-mono-${IMAGE_VERSION}
group: build group: build
@ -55,10 +63,14 @@ pipeline:
- ./ci/build.sh - ./ci/build.sh
environment: environment:
- BUILD_TARGET=StandaloneWindows64 - BUILD_TARGET=StandaloneWindows64
- VERSION_NUMBER_VAR=${CI_COMMIT_TAG}
- VERSION_BUILD_VAR=${CI_COMMIT_HASH}
when:
event: tag
package: package:
image: ${IMAGE}:${UNITY_VERSION}-windows-mono-${IMAGE_VERSION} image: ${IMAGE}:${UNITY_VERSION}-windows-mono-${IMAGE_VERSION}
commands: commands:
- tar -C ${UNITY_DIR}/Builds -cvzf ${VERSION_NUMBER_VAR}.tar.gz . - tar -C ${UNITY_DIR}/Builds -cvzf ${CI_COMMIT_TAG}.tar.gz .
when: when:
event: tag event: tag
publish: publish:
@ -67,7 +79,7 @@ pipeline:
api-key: api-key:
from_secret: gitea_api_key from_secret: gitea_api_key
files: files:
- ${VERSION_NUMBER_VAR}.tar.gz - ${CI_COMMIT_TAG}.tar.gz
target: main target: main
base_url: https://git.sunturtle.xyz base_url: https://git.sunturtle.xyz
when: when: