ci: Make indentation close to original again

This commit is contained in:
Dorota Czaplejewicz
2021-12-17 11:17:03 +00:00
parent 7b8cecbf90
commit c54b6e2d3b
2 changed files with 60 additions and 59 deletions

View File

@ -1,124 +1,124 @@
image: debian:bullseye image: debian:bullseye
stages: stages:
- build - build
- test - test
before_script: before_script:
- apt-get -y update - apt-get -y update
- apt-get -y install wget ca-certificates gnupg - apt-get -y install wget ca-certificates gnupg
- echo "deb [trusted=yes] http://ci.puri.sm/ bullseyeci main" > /etc/apt/sources.list.d/ci.list - echo "deb [trusted=yes] http://ci.puri.sm/ bullseyeci main" > /etc/apt/sources.list.d/ci.list
- wget -O- https://ci.puri.sm/ci-repo.key | apt-key add - - wget -O- https://ci.puri.sm/ci-repo.key | apt-key add -
- apt-get -y update - apt-get -y update
build_docs: build_docs:
stage: build stage: build
artifacts: artifacts:
paths: paths:
- _build - _build
script: script:
- apt-get -y install python3-pip python3-sphinx - apt-get -y install python3-pip python3-sphinx
- pip3 install recommonmark - pip3 install recommonmark
- ./doc/build.sh _build - ./doc/build.sh _build
except: except:
variables: variables:
- $PKG_ONLY == "1" - $PKG_ONLY == "1"
build_meson: build_meson:
stage: build stage: build
artifacts: artifacts:
paths: paths:
- _build - _build
expire_in: 3h expire_in: 3h
script: script:
- apt-get -y build-dep . - apt-get -y build-dep .
- meson . _build/ -Ddepdatadir=/usr/share --werror - meson . _build/ -Ddepdatadir=/usr/share --werror
- ninja -C _build install - ninja -C _build install
except: except:
variables: variables:
- $PKG_ONLY == "1" - $PKG_ONLY == "1"
build_deb: build_deb:
stage: build stage: build
artifacts: artifacts:
paths: paths:
- '*.deb' - '*.deb'
script: script:
- rm -f ../*.deb - rm -f ../*.deb
- apt-get -y build-dep . - apt-get -y build-dep .
- apt-get -y install devscripts - apt-get -y install devscripts
- REV=$(git log -1 --format=%h) - REV=$(git log -1 --format=%h)
- VER=$(dpkg-parsechangelog -SVersion) - VER=$(dpkg-parsechangelog -SVersion)
- DEBFULLNAME="Librem5 CI" - DEBFULLNAME="Librem5 CI"
- EMAIL="librem5-builds@lists.community.puri.sm" - EMAIL="librem5-builds@lists.community.puri.sm"
- dch -v"$VER+librem5ci$CI_PIPELINE_ID.$REV" "$MSG" - dch -v"$VER+librem5ci$CI_PIPELINE_ID.$REV" "$MSG"
- debuild -i -us -uc -b - debuild -i -us -uc -b
- cp ../*.deb . - cp ../*.deb .
build_deb:arm64: build_deb:arm64:
tags: tags:
- aarch64 - aarch64
stage: build stage: build
artifacts: artifacts:
paths: paths:
- '*.deb' - '*.deb'
script: script:
- rm -f ../*.deb - rm -f ../*.deb
- apt-get -y build-dep . - apt-get -y build-dep .
- apt-get -y install devscripts - apt-get -y install devscripts
- REV=$(git log -1 --format=%h) - REV=$(git log -1 --format=%h)
- VER=$(dpkg-parsechangelog -SVersion) - VER=$(dpkg-parsechangelog -SVersion)
- DEBFULLNAME="Librem5 CI" - DEBFULLNAME="Librem5 CI"
- EMAIL="librem5-builds@lists.community.puri.sm" - EMAIL="librem5-builds@lists.community.puri.sm"
- dch -v"$VER+librem5ci$CI_PIPELINE_ID.$REV" "$MSG" - dch -v"$VER+librem5ci$CI_PIPELINE_ID.$REV" "$MSG"
- debuild -i -us -uc -b - debuild -i -us -uc -b
- cp ../*.deb . - cp ../*.deb .
test_lintian: test_lintian:
stage: test stage: test
needs: needs:
- job: build_deb - job: build_deb
artifacts: true artifacts: true
script: script:
- apt-get -y install lintian - apt-get -y install lintian
- lintian *.deb - lintian *.deb
except: except:
variables: variables:
- $PKG_ONLY == "1" - $PKG_ONLY == "1"
test: test:
stage: test stage: test
needs: needs:
- job: build_meson - job: build_meson
artifacts: true artifacts: true
script: script:
- apt-get -y build-dep . - apt-get -y build-dep .
- apt-get -y install clang-tidy - apt-get -y install clang-tidy
- ninja -C _build test - ninja -C _build test
- tools/style-check_build _build - tools/style-check_build _build
except: except:
variables: variables:
- $PKG_ONLY == "1" - $PKG_ONLY == "1"
test_style: test_style:
stage: test stage: test
needs: [] needs: []
script: script:
- apt-get -y build-dep . - apt-get -y build-dep .
- tools/style-check_source - tools/style-check_source
except: except:
variables: variables:
- $PKG_ONLY == "1" - $PKG_ONLY == "1"
check_release: check_release:
stage: test stage: test
needs: [] needs: []
only: only:
refs: refs:
- master - master
script: script:
- apt-get -y install git python3 - apt-get -y install git python3
- (head -n 1 ./debian/changelog && git tag) | ./debian/check_release.py - (head -n 1 ./debian/changelog && git tag) | ./debian/check_release.py
except: except:
variables: variables:
- $PKG_ONLY == "1" - $PKG_ONLY == "1"

View File

@ -25,6 +25,7 @@ def dump(yaml, yml):
with open(path) as f: with open(path) as f:
contents = f.read() contents = f.read()
yaml = YAML() yaml = YAML()
yaml.indent(offset=2, sequence=4)
yml = yaml.load(contents) yml = yaml.load(contents)
formatted = dump(yaml, yml) formatted = dump(yaml, yml)
well_formatted = formatted == contents well_formatted = formatted == contents