From a04d0e85472f934ee506ffa1a050aa247e345dbc Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Tue, 30 Jul 2019 14:04:52 +0100 Subject: [PATCH] Attempt to make submodules work with cirrus. --- .cirrus.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9bb55f9..fd9ee1e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,7 +2,18 @@ freebsd_instance: image: freebsd-12-0-release-amd64 task: - install_script: pkg install -y cmake ninja llvm80 + install_script: pkg install -y cmake ninja llvm80 git + + clone_script: | + if [ -z "$CIRRUS_PR" ]; then + git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR + git reset --hard $CIRRUS_CHANGE_IN_REPO + else + git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR + git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR + git reset --hard $CIRRUS_CHANGE_IN_REPO + fi + script: | mkdir Build cd Build