2020-10-10 19:24:46 +00:00
|
|
|
variables:
|
|
|
|
CI_HAWK_ARTIFACT_NAME: "BizHawk_devbuild_${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHORT_SHA}"
|
|
|
|
CI_HAWK_TMPARTIFACT_NAME: "BizHawk_tempbuild_${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHORT_SHA}"
|
2019-12-26 06:57:40 +00:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
2020-05-05 05:46:55 +00:00
|
|
|
- test
|
2020-09-19 01:08:34 +00:00
|
|
|
- package
|
2019-12-26 06:57:40 +00:00
|
|
|
|
2020-09-19 01:08:34 +00:00
|
|
|
build:
|
2019-12-26 06:57:40 +00:00
|
|
|
artifacts:
|
|
|
|
expire_in: "30 minutes"
|
2020-10-10 19:24:46 +00:00
|
|
|
name: "$CI_HAWK_TMPARTIFACT_NAME"
|
2019-12-26 06:57:40 +00:00
|
|
|
paths:
|
|
|
|
- output
|
2020-11-23 11:32:17 +00:00
|
|
|
image: mcr.microsoft.com/dotnet/sdk:5.0
|
2019-12-26 06:57:40 +00:00
|
|
|
script:
|
2020-10-07 21:23:10 +00:00
|
|
|
- if [ "$CI_COMMIT_REF_SLUG" == "release" ]; then Dist/UpdateVersionInfoForRelease.sh; fi
|
2020-05-05 05:46:55 +00:00
|
|
|
- Dist/BuildRelease.sh
|
2019-12-26 06:57:40 +00:00
|
|
|
stage: build
|
|
|
|
|
2020-10-10 19:24:46 +00:00
|
|
|
build_ext_tools:
|
2020-06-06 16:19:01 +00:00
|
|
|
allow_failure: true
|
2020-11-23 11:32:17 +00:00
|
|
|
image: mcr.microsoft.com/dotnet/sdk:5.0
|
2020-10-10 19:24:46 +00:00
|
|
|
needs:
|
|
|
|
- build
|
2020-06-06 16:19:01 +00:00
|
|
|
rules:
|
2020-10-10 19:24:46 +00:00
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
|
|
when: always
|
|
|
|
script:
|
|
|
|
- for d in $CI_PROJECT_DIR/ExternalToolProjects/*; do if [ -d "$d" ]; then cd "$d" && ./build_release.sh; fi; done
|
|
|
|
stage: test
|
|
|
|
|
|
|
|
check_style:
|
2020-11-23 11:32:17 +00:00
|
|
|
image: mcr.microsoft.com/dotnet/sdk:5.0
|
2020-10-10 19:24:46 +00:00
|
|
|
needs:
|
|
|
|
- job: build
|
|
|
|
artifacts: false
|
|
|
|
rules:
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
|
|
when: always
|
|
|
|
allow_failure: true
|
|
|
|
- if: $BIZHAWKBUILD_USE_ANALYZERS != null
|
2020-06-06 16:19:01 +00:00
|
|
|
when: always
|
2020-10-10 19:24:46 +00:00
|
|
|
allow_failure: false
|
2020-05-05 05:46:55 +00:00
|
|
|
script:
|
2020-08-02 14:04:44 +00:00
|
|
|
- Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true || Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true
|
2020-05-05 05:46:55 +00:00
|
|
|
stage: test
|
|
|
|
|
2020-10-10 19:24:46 +00:00
|
|
|
package_linux:
|
|
|
|
artifacts:
|
|
|
|
expire_in: "1 month"
|
|
|
|
name: "$CI_HAWK_ARTIFACT_NAME.tar"
|
|
|
|
paths:
|
|
|
|
- "$CI_HAWK_ARTIFACT_NAME.tar"
|
|
|
|
image: debian:buster-slim
|
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
rules:
|
|
|
|
- if: '$CI_COMMIT_REF_SLUG == "master" || $CI_COMMIT_REF_SLUG == "release"'
|
|
|
|
when: always
|
|
|
|
script:
|
|
|
|
- su -c "apt-get update && apt-get -y install p7zip-full"
|
|
|
|
- Dist/Package.sh
|
|
|
|
- cd packaged_output
|
|
|
|
- tar -cf "../$CI_HAWK_ARTIFACT_NAME.tar" *
|
|
|
|
stage: package
|
|
|
|
|
|
|
|
package_windows:
|
2020-09-19 01:08:34 +00:00
|
|
|
artifacts:
|
|
|
|
expire_in: "1 month"
|
2020-10-10 19:24:46 +00:00
|
|
|
name: "$CI_HAWK_ARTIFACT_NAME"
|
2020-09-19 01:08:34 +00:00
|
|
|
paths:
|
2020-10-01 14:10:45 +00:00
|
|
|
- ./*
|
2020-10-10 19:24:46 +00:00
|
|
|
image: debian:buster-slim
|
|
|
|
needs:
|
|
|
|
- build
|
2020-09-19 01:08:34 +00:00
|
|
|
rules:
|
2020-10-07 21:23:10 +00:00
|
|
|
- if: '$CI_COMMIT_REF_SLUG == "master" || $CI_COMMIT_REF_SLUG == "release"'
|
2020-09-19 01:08:34 +00:00
|
|
|
when: always
|
|
|
|
script:
|
2020-10-01 13:19:51 +00:00
|
|
|
- su -c "apt-get update && apt-get -y install p7zip-full"
|
2020-09-19 01:08:34 +00:00
|
|
|
- Dist/Package.sh
|
2020-10-01 14:10:45 +00:00
|
|
|
# now we replace $CI_PROJECT_DIR with $CI_PROJECT_DIR/packaged_output, so that the archival step will put everything at the top level
|
|
|
|
- mv packaged_output ..
|
|
|
|
- cd ..
|
|
|
|
- rm -fr $CI_PROJECT_DIR
|
|
|
|
- mv packaged_output $CI_PROJECT_DIR
|
2020-09-19 01:08:34 +00:00
|
|
|
stage: package
|
|
|
|
|
2020-05-05 05:46:55 +00:00
|
|
|
run_tests:
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- test_output/*.coverage.xml
|
|
|
|
reports:
|
|
|
|
junit:
|
|
|
|
- test_output/*.coverage.xml
|
2020-11-23 11:32:17 +00:00
|
|
|
image: mcr.microsoft.com/dotnet/sdk:5.0
|
2020-10-10 19:24:46 +00:00
|
|
|
needs:
|
|
|
|
- job: build
|
|
|
|
artifacts: false
|
2020-05-05 05:46:55 +00:00
|
|
|
script:
|
2020-08-02 14:04:44 +00:00
|
|
|
- Dist/BuildTestRelease.sh || Dist/BuildTestRelease.sh
|
2020-05-05 05:46:55 +00:00
|
|
|
stage: test
|
|
|
|
|
2020-08-02 14:04:44 +00:00
|
|
|
#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
|