Change indentation and block comment style in GitLab CI config
This commit is contained in:
parent
82f8620292
commit
e24b3bbbf8
176
.gitlab-ci.yml
176
.gitlab-ci.yml
|
@ -1,5 +1,5 @@
|
||||||
#include:
|
.disabled_not_a_job_include:
|
||||||
#- template: Security/SAST.gitlab-ci.yml
|
- template: Security/SAST.gitlab-ci.yml
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CI_HAWK_ARTIFACT_NAME: "BizHawk_devbuild_${CI_COMMIT_SHORT_SHA}"
|
CI_HAWK_ARTIFACT_NAME: "BizHawk_devbuild_${CI_COMMIT_SHORT_SHA}"
|
||||||
|
@ -7,14 +7,14 @@ variables:
|
||||||
CI_HAWK_TMPARTIFACT_NAME: "BizHawk_tempbuild_${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
|
||||||
- test
|
- test
|
||||||
- package
|
- package
|
||||||
|
|
||||||
.with-cachix-mono:
|
.with_cachix_mono:
|
||||||
before_script:
|
before_script:
|
||||||
- nix-env -iA nixpkgs.cachix
|
- nix-env -iA nixpkgs.cachix
|
||||||
- cachix use $CACHIX_CACHE_NAME
|
- cachix use $CACHIX_CACHE_NAME
|
||||||
image: nixos/nix:latest
|
image: nixos/nix:latest
|
||||||
variables:
|
variables:
|
||||||
CACHIX_CACHE_NAME: mono-for-bizhawk
|
CACHIX_CACHE_NAME: mono-for-bizhawk
|
||||||
|
@ -24,96 +24,96 @@ build:
|
||||||
expire_in: "30 minutes"
|
expire_in: "30 minutes"
|
||||||
name: "$CI_HAWK_TMPARTIFACT_NAME"
|
name: "$CI_HAWK_TMPARTIFACT_NAME"
|
||||||
paths:
|
paths:
|
||||||
- output
|
- output
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||||
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
|
||||||
|
|
||||||
build_ext_tools:
|
build_ext_tools:
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||||
when: always
|
when: always
|
||||||
script:
|
script:
|
||||||
- for d in $CI_PROJECT_DIR/ExternalToolProjects/*; do if [ -d "$d" ]; then cd "$d" && ./build_release.sh; fi; done
|
- for d in $CI_PROJECT_DIR/ExternalToolProjects/*; do if [ -d "$d" ]; then cd "$d" && ./build_release.sh; fi; done
|
||||||
stage: test
|
stage: test
|
||||||
|
|
||||||
build_nix_master:
|
build_nix_master:
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
extends: .with-cachix-mono
|
extends: .with_cachix_mono
|
||||||
needs: []
|
needs: []
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||||
when: always
|
when: always
|
||||||
script:
|
script:
|
||||||
- nix-build --pure -A emuhawk --arg useCWDAsSource true
|
- nix-build --pure -A emuhawk --arg useCWDAsSource true
|
||||||
stage: test
|
stage: test
|
||||||
|
|
||||||
build_nix_prev_release:
|
build_nix_prev_release:
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
extends: .with-cachix-mono
|
extends: .with_cachix_mono
|
||||||
needs: []
|
needs: []
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||||
when: always
|
when: always
|
||||||
script:
|
script:
|
||||||
- nix-build --pure -A emuhawk
|
- nix-build --pure -A emuhawk
|
||||||
stage: test
|
stage: test
|
||||||
|
|
||||||
check_style:
|
check_style:
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||||
needs:
|
needs:
|
||||||
- job: build
|
- job: build
|
||||||
artifacts: false
|
artifacts: false
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||||
when: always
|
when: always
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
- if: $BIZHAWKBUILD_USE_ANALYZERS != null
|
- if: $BIZHAWKBUILD_USE_ANALYZERS != null
|
||||||
when: always
|
when: always
|
||||||
allow_failure: false
|
allow_failure: false
|
||||||
script:
|
script:
|
||||||
- cd src/BizHawk.Version
|
- cd src/BizHawk.Version
|
||||||
- dotnet build -c Release # configuration doesn't really matter as the assembly is empty
|
- dotnet build -c Release # configuration doesn't really matter as the assembly is empty
|
||||||
- ../../Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true
|
- ../../Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true
|
||||||
stage: test
|
stage: test
|
||||||
|
|
||||||
#infersharp:
|
.disabled_job_infersharp:
|
||||||
# artifacts:
|
artifacts:
|
||||||
# paths:
|
paths:
|
||||||
# - infer-out/*
|
- infer-out/*
|
||||||
# image: mcr.microsoft.com/infersharp:v1.0
|
image: mcr.microsoft.com/infersharp:v1.0
|
||||||
# needs:
|
needs:
|
||||||
# - job: build
|
- job: build
|
||||||
# rules:
|
rules:
|
||||||
# - if: '$CI_PIPELINE_SOURCE == "schedule"'
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||||
# when: always
|
when: always
|
||||||
# script:
|
script:
|
||||||
# - mkdir "infer-in"
|
- mkdir "infer-in"
|
||||||
# - find output -name "BizHawk.*.dll" -exec cp "{}" "infer-in" \;
|
- find output -name "BizHawk.*.dll" -exec cp "{}" "infer-in" \;
|
||||||
# - cp "output/EmuHawk.exe" "infer-in"
|
- cp "output/EmuHawk.exe" "infer-in"
|
||||||
# - /app/run_infersharp.sh "infer-in"
|
- /app/run_infersharp.sh "infer-in"
|
||||||
# stage: test
|
stage: test
|
||||||
|
|
||||||
.package_linux_x64:
|
.package_linux_x64:
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: "1 month"
|
expire_in: "1 month"
|
||||||
name: "$CI_HAWK_ARTIFACT_NAME"
|
name: "$CI_HAWK_ARTIFACT_NAME"
|
||||||
paths:
|
paths:
|
||||||
- "$CI_HAWK_ARTIFACT_NAME_TAR"
|
- "$CI_HAWK_ARTIFACT_NAME_TAR"
|
||||||
image: debian:buster-slim
|
image: debian:buster-slim
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build
|
||||||
script:
|
script:
|
||||||
- su -c "apt-get update && apt-get -y install p7zip-full"
|
- su -c "apt-get update && apt-get -y install p7zip-full"
|
||||||
- Dist/Package.sh "linux-x64"
|
- Dist/Package.sh "linux-x64"
|
||||||
- cd packaged_output
|
- cd packaged_output
|
||||||
- tar -cf "../$CI_HAWK_ARTIFACT_NAME_TAR" *
|
- tar -cf "../$CI_HAWK_ARTIFACT_NAME_TAR" *
|
||||||
stage: package
|
stage: package
|
||||||
|
|
||||||
.package_windows_x64:
|
.package_windows_x64:
|
||||||
|
@ -121,37 +121,37 @@ check_style:
|
||||||
expire_in: "1 month"
|
expire_in: "1 month"
|
||||||
name: "$CI_HAWK_ARTIFACT_NAME"
|
name: "$CI_HAWK_ARTIFACT_NAME"
|
||||||
paths:
|
paths:
|
||||||
- ./*
|
- ./*
|
||||||
image: debian:buster-slim
|
image: debian:buster-slim
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build
|
||||||
script:
|
script:
|
||||||
- su -c "apt-get update && apt-get -y install p7zip-full"
|
- su -c "apt-get update && apt-get -y install p7zip-full"
|
||||||
- Dist/Package.sh "windows-x64"
|
- Dist/Package.sh "windows-x64"
|
||||||
# now we replace $CI_PROJECT_DIR with $CI_PROJECT_DIR/packaged_output, so that the archival step will put everything at the top level
|
# 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 ..
|
- mv packaged_output ..
|
||||||
- cd ..
|
- cd ..
|
||||||
- rm -fr $CI_PROJECT_DIR
|
- rm -fr $CI_PROJECT_DIR
|
||||||
- mv packaged_output $CI_PROJECT_DIR
|
- mv packaged_output $CI_PROJECT_DIR
|
||||||
stage: package
|
stage: package
|
||||||
|
|
||||||
package_devbuild_linux:
|
package_devbuild_linux:
|
||||||
extends: .package_linux_x64
|
extends: .package_linux_x64
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_SLUG == "master"
|
- if: $CI_COMMIT_REF_SLUG == "master"
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
package_devbuild_windows:
|
package_devbuild_windows:
|
||||||
extends: .package_windows_x64
|
extends: .package_windows_x64
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_SLUG == "master"
|
- if: $CI_COMMIT_REF_SLUG == "master"
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
package_release_linux:
|
package_release_linux:
|
||||||
extends: .package_linux_x64
|
extends: .package_linux_x64
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_SLUG == "release"
|
- if: $CI_COMMIT_REF_SLUG == "release"
|
||||||
when: always
|
when: always
|
||||||
variables:
|
variables:
|
||||||
CI_HAWK_ARTIFACT_NAME: "BizHawk-VERSIONHERE-linux-x64.tar" # .zip is added automatically
|
CI_HAWK_ARTIFACT_NAME: "BizHawk-VERSIONHERE-linux-x64.tar" # .zip is added automatically
|
||||||
CI_HAWK_ARTIFACT_NAME_TAR: "BizHawk-linux-x64-$CI_COMMIT_SHORT_SHA.tar"
|
CI_HAWK_ARTIFACT_NAME_TAR: "BizHawk-linux-x64-$CI_COMMIT_SHORT_SHA.tar"
|
||||||
|
@ -159,34 +159,34 @@ package_release_linux:
|
||||||
package_release_windows:
|
package_release_windows:
|
||||||
extends: .package_windows_x64
|
extends: .package_windows_x64
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_SLUG == "release"
|
- if: $CI_COMMIT_REF_SLUG == "release"
|
||||||
when: always
|
when: always
|
||||||
variables:
|
variables:
|
||||||
CI_HAWK_ARTIFACT_NAME: "BizHawk-VERSIONHERE-win-x64"
|
CI_HAWK_ARTIFACT_NAME: "BizHawk-VERSIONHERE-win-x64"
|
||||||
|
|
||||||
run_tests:
|
run_tests:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- test_output/*.coverage.xml
|
- test_output/*.coverage.xml
|
||||||
reports:
|
reports:
|
||||||
junit:
|
junit:
|
||||||
- test_output/*.coverage.xml
|
- test_output/*.coverage.xml
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||||
needs:
|
needs:
|
||||||
- job: build
|
- job: build
|
||||||
artifacts: false
|
artifacts: false
|
||||||
script:
|
script:
|
||||||
- cd src/BizHawk.Version
|
- cd src/BizHawk.Version
|
||||||
- dotnet build -c Release # configuration doesn't really matter as the assembly is empty
|
- dotnet build -c Release # configuration doesn't really matter as the assembly is empty
|
||||||
- ../../Dist/BuildTestRelease.sh
|
- ../../Dist/BuildTestRelease.sh
|
||||||
stage: test
|
stage: test
|
||||||
|
|
||||||
#sast:
|
.disabled_job_sast:
|
||||||
# variables:
|
variables:
|
||||||
# SAST_EXCLUDED_ANALYZERS: bandit, brakeman, eslint, flawfinder, gosec, kubesec, nodejs-scan, phpcs-security-audit, pmd-apex, sobelow, spotbugs
|
SAST_EXCLUDED_ANALYZERS: bandit, brakeman, eslint, flawfinder, gosec, kubesec, nodejs-scan, phpcs-security-audit, pmd-apex, sobelow, spotbugs
|
||||||
# stage: test
|
stage: test
|
||||||
|
|
||||||
#cache:
|
.disabled_not_a_job_cache:
|
||||||
# key: "$CI_COMMIT_REF_SLUG"
|
key: "$CI_COMMIT_REF_SLUG"
|
||||||
# paths:
|
paths:
|
||||||
# - $HOME/.nuget/packages # probably won't work; set NUGET_PACKAGES to `BizHawk_master/.nuget_packages` and cache that
|
- $HOME/.nuget/packages # probably won't work; set NUGET_PACKAGES to `BizHawk_master/.nuget_packages` and cache that
|
||||||
|
|
Loading…
Reference in New Issue