From 2761156fc3f504420eb7e64f5df53249d992e401 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Mon, 3 Aug 2020 00:04:44 +1000 Subject: [PATCH] Update GitLab CI I was using artifacts wrong I was using caches correctly but there weren't files to cache should now be resistant to missing codegen'd files --- .gitlab-ci.yml | 51 +++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a84ceda4d4..1055616483 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,26 +3,43 @@ image: mcr.microsoft.com/dotnet/core/sdk:3.1 stages: - build - test - - archive -build: +build_master: artifacts: - expire_in: "30 minutes" - name: "BizHawk_tempbuild_$CI_COMMIT_REF_SLUG" + expire_in: "1 month" + name: "BizHawk_devbuild_$CI_COMMIT_REF_SLUG" paths: - output - test_output + rules: + - if: '$CI_COMMIT_REF_SLUG == "master"' + when: always + script: + - Dist/BuildRelease.sh + stage: build + +build_not_master: + artifacts: + expire_in: "30 minutes" + name: "BizHawk_devbuild_$CI_COMMIT_REF_SLUG" + paths: + - output + - test_output + rules: + - if: '$CI_COMMIT_REF_SLUG != "master"' + when: always script: - Dist/BuildRelease.sh stage: build check_style: allow_failure: true + dependencies: [] rules: - if: '$BIZHAWKBUILD_USE_ANALYZERS != null' when: always script: - - Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true + - Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true || Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true stage: test run_tests: @@ -32,25 +49,13 @@ run_tests: reports: junit: - test_output/*.coverage.xml + dependencies: [] image: mcr.microsoft.com/dotnet/core/sdk:3.1 script: - - Dist/BuildTestRelease.sh + - Dist/BuildTestRelease.sh || Dist/BuildTestRelease.sh stage: test -create_archive: - artifacts: - expire_in: "1 month" - name: "BizHawk_devbuild_$CI_COMMIT_REF_SLUG" - paths: - - output - rules: - - if: '$CI_COMMIT_REF_SLUG == "master"' - when: always - script: - - '' - stage: archive - -cache: - key: "$CI_COMMIT_REF_SLUG" - paths: - - packages +#cache: +# key: "$CI_COMMIT_REF_SLUG" +# paths: +# - $HOME/.nuget/packages # probably won't work; set NUGET_PACKAGES to `BizHawk_master/.nuget_packages` and cache that