xrefcheck/.buildkite/pipeline.yml
YuriRomanowski 997c43833e
[#227] Add .xrefcheck.yaml config to repo (#232)
Problem: Currently, there are some invalid links in the repository,
mostly for tests, so one has to add some CLI options
for `xrefcheck` to succeed.

Solution: Added a new minimal `.xrefcheck.yaml` config file
such that `xrefcheck` succeeded without any options.
2022-12-06 23:24:58 +05:00

60 lines
2.0 KiB
YAML

# SPDX-FileCopyrightText: 2019-2021 Serokell <https://serokell.io>
#
# SPDX-License-Identifier: MPL-2.0
steps:
- command: nix-build ci.nix -A trailing-whitespace-check
label: Check trailing whitespaces
- label: shellcheck
command: nix run -f ci.nix pkgs.shellcheck -c find . -name '*.sh' -exec shellcheck {} +
- label: stylish
command: nix run -f ci.nix pkgs.gnumake pkgs-stylish.stylish-haskell -c ./scripts/validate-stylish.sh
- command: nix-build ci.nix -A xrefcheck-lib-and-tests
label: Library and tests
- command: nix run -f ci.nix pkgs.bats pkgs.diffutils xrefcheck-static -c bash -c "cd tests/golden/ && bats ./**"
label: Golden tests (bats)
- command: nix-build ci.nix -A xrefcheck-static
label: Executable
artifact_paths:
- "result/bin/xrefcheck"
- command: nix-build ci.nix -A xrefcheck-windows
label: Windows executable
artifact_paths:
- "result/bin/*"
- command: nix run -f ci.nix xrefcheck-static -c xrefcheck
label: Xrefcheck itself
retry:
automatic:
limit: 2
- label: lint
command: nix run -f ci.nix pkgs.haskellPackages.hlint -c hlint .
- command: nix run -f ci.nix pkgs.reuse -c reuse lint
label: REUSE lint
- command:
- nix run -f ci.nix pkgs.curl pkgs.gitAndTools.hub -c bash -c "curl https://raw.githubusercontent.com/serokell/scratch/release-binary/scripts/release-binary.sh | bash"
label: Create a pre-release
branches: master
- command:
- nix-build docker
- nix run -f ci.nix pkgs.skopeo -c ./scripts/upload-docker-image.sh "docker-archive:$(readlink result)" "docker://docker.io/serokell/xrefcheck:latest"
label: Push to dockerhub
branches: master
- command:
- nix-build docker
- nix run -f ci.nix pkgs.skopeo -c ./scripts/upload-docker-image.sh "docker-archive:$(readlink result)" "docker://docker.io/serokell/xrefcheck:${BUILDKITE_BRANCH}"
label: Push release to dockerhub
if: |
build.tag =~ /^v[0-9]+.*/