More GitLab CI changes
* Revert 21a476200
("Add timestamp update step", which was ineffective)
* Use `needs` to declare job dependency graph
* Replace Docker image for Ubuntu w/ minimal Debian image
* Add `build_ext_tools` job (scheduled pipelines only)
* Rename `package` job to `package_windows` and add `package_linux` (runs the
same script but then makes a `.tar` which becomes `.tar.zip`)
* Misc. cleanup
This commit is contained in:
parent
21a476200e
commit
fa83861501
|
@ -1,4 +1,6 @@
|
||||||
image: mcr.microsoft.com/dotnet/core/sdk:3.1
|
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}"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
@ -8,32 +10,71 @@ stages:
|
||||||
build:
|
build:
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: "30 minutes"
|
expire_in: "30 minutes"
|
||||||
name: "BizHawk_tempbuild_${CI_COMMIT_REF_SLUG}_$CI_COMMIT_SHORT_SHA"
|
name: "$CI_HAWK_TMPARTIFACT_NAME"
|
||||||
paths:
|
paths:
|
||||||
- output
|
- output
|
||||||
- test_output
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1
|
||||||
script:
|
script:
|
||||||
- if [ "$CI_COMMIT_REF_SLUG" == "release" ]; then Dist/UpdateVersionInfoForRelease.sh; fi
|
- if [ "$CI_COMMIT_REF_SLUG" == "release" ]; then Dist/UpdateVersionInfoForRelease.sh; fi
|
||||||
- Dist/BuildRelease.sh
|
- Dist/BuildRelease.sh
|
||||||
stage: build
|
stage: build
|
||||||
|
|
||||||
check_style:
|
build_ext_tools:
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
dependencies: []
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
rules:
|
rules:
|
||||||
- if: '$BIZHAWKBUILD_USE_ANALYZERS != null'
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||||
when: always
|
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:
|
||||||
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1
|
||||||
|
needs:
|
||||||
|
- job: build
|
||||||
|
artifacts: false
|
||||||
|
rules:
|
||||||
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||||
|
when: always
|
||||||
|
allow_failure: true
|
||||||
|
- if: $BIZHAWKBUILD_USE_ANALYZERS != null
|
||||||
|
when: always
|
||||||
|
allow_failure: false
|
||||||
script:
|
script:
|
||||||
- Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true || Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true
|
- Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true || Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true
|
||||||
stage: test
|
stage: test
|
||||||
|
|
||||||
package:
|
package_linux:
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: "1 month"
|
expire_in: "1 month"
|
||||||
name: "BizHawk_devbuild_${CI_COMMIT_REF_SLUG}_$CI_COMMIT_SHORT_SHA"
|
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:
|
||||||
|
artifacts:
|
||||||
|
expire_in: "1 month"
|
||||||
|
name: "$CI_HAWK_ARTIFACT_NAME"
|
||||||
paths:
|
paths:
|
||||||
- ./*
|
- ./*
|
||||||
image: ubuntu:focal
|
image: debian:buster-slim
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_REF_SLUG == "master" || $CI_COMMIT_REF_SLUG == "release"'
|
- if: '$CI_COMMIT_REF_SLUG == "master" || $CI_COMMIT_REF_SLUG == "release"'
|
||||||
when: always
|
when: always
|
||||||
|
@ -54,8 +95,10 @@ run_tests:
|
||||||
reports:
|
reports:
|
||||||
junit:
|
junit:
|
||||||
- test_output/*.coverage.xml
|
- test_output/*.coverage.xml
|
||||||
dependencies: []
|
|
||||||
image: mcr.microsoft.com/dotnet/core/sdk:3.1
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1
|
||||||
|
needs:
|
||||||
|
- job: build
|
||||||
|
artifacts: false
|
||||||
script:
|
script:
|
||||||
- Dist/BuildTestRelease.sh || Dist/BuildTestRelease.sh
|
- Dist/BuildTestRelease.sh || Dist/BuildTestRelease.sh
|
||||||
stage: test
|
stage: test
|
||||||
|
|
|
@ -6,5 +6,4 @@ find "output" -type f \( -wholename "output/EmuHawk.exe" -o -wholename "output/D
|
||||||
find "packaged_output/dll" -type f -name "*.xml" -exec rm "{}" \;
|
find "packaged_output/dll" -type f -name "*.xml" -exec rm "{}" \;
|
||||||
mkdir "packaged_output/Firmware"
|
mkdir "packaged_output/Firmware"
|
||||||
cd "packaged_output/gamedb" && 7za a -t7z -mx9 "NesCarts.7z" "NesCarts.xml" && rm "NesCarts.xml" && cd "../.."
|
cd "packaged_output/gamedb" && 7za a -t7z -mx9 "NesCarts.7z" "NesCarts.xml" && rm "NesCarts.xml" && cd "../.."
|
||||||
find "packaged_output" -type d -exec touch {} \; # no idea why, but some of the access timestamps are in the far future, and Mono crashes when enumerating the exe dir
|
|
||||||
find "packaged_output" -type f -name "*.sh" -exec chmod +x {} \; # installed with -m644 but needs to be 755
|
find "packaged_output" -type f -name "*.sh" -exec chmod +x {} \; # installed with -m644 but needs to be 755
|
||||||
|
|
Loading…
Reference in New Issue