I’m trying to get a pipeline running to test and build a Unity game. This worked perfectly fine using gitlab-runner on windows, but on MacOS jobs seem to be interfering with each other?
On windows jobs would either run one after the other, or if I had configured it in parallel by cloning multiple copies of the repo. On MacOS, however, all the jobs start at the same time and in the same folder. This means that only one of the jobs will succeed as the other jobs fail when their folders are deleted by other jobs.
- GitLab Ver: gitlab.com
- Runner Ver: 12.8.0
.gitlab-ci.yml:
stages:
- test
variables:
GIT_DEPTH: 10
GIT_STRATEGY: clone
UNITY_VERSION: 2019.1.5f1
BUILD_OUTPUT_NAME: Shotbun
TEST_LOG_PATH: ./Logs/test_results.xml
BUILD_LOG_PATH: ./Logs/build.log
BUILD_OUTPUT_PATH: ./Builds/$BUILD_OUTPUT_NAME-$BUILD_TARGET.zip
## Test ##
unit-test-editmode:
stage: test
tags:
- unity
script: ./run-tests.sh
variables:
TEST_MODE: editmode
artifacts:
paths:
- $TEST_LOG_PATH
unit-test-playmode:
stage: test
tags:
- unity
script: ./run-tests.sh
variables:
TEST_MODE: playmode
artifacts:
paths:
- $TEST_LOG_PATH
run-test.sh:
#!/bin/sh
"/Applications/Unity-2019.1.5f1/Unity.app/Contents/MacOS/Unity" -batchmode -projectPath . -runTests -testPlatform $TEST_MODE -logFile -testResults "Logs/test_results.xml"
This script runs file when run manually - the issue seems to be with gitlab-runner itself since the jobs fail in the setup stages.
I tried GIT_STRATEGY: clone & fetch but both seems to be having the same issue. This pipeline runs fine on windows. I couldn’t find anyone else having this problem.