ci: use sequoia-pipeline component

This commit is contained in:
Devan Carpenter 2024-03-15 19:59:27 -04:00
parent 9483554e61
commit 2f97c2ab9e
No known key found for this signature in database
GPG Key ID: AC0ABA31866A7E76

View File

@ -4,120 +4,13 @@ stages:
- test
- deploy
include:
- component: gitlab.com/sequoia-pgp/common-ci/precheck@main
inputs:
codespell_ignore_words: "crate,ede,iff,mut,nd,te,uint,KeyServer,keyserver,Keyserver,keyservers,Keyservers,keypair,keypairs,KeyPair,fpr,dedup,deriver,certi,certp,certo"
codespell_skip_files: "*.bin,*.gpg,*.pgp,./.git,*/target,Cargo.lock,./tests/data,openpgp-policy.toml"
- component: gitlab.com/sequoia-pgp/common-ci/authenticate-commits@main
- component: gitlab.com/sequoia-pgp/common-ci/rust-basic@main
inputs:
job_name: trixie
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/trixie-prebuild
cargo_args: '--features=subplot'
- component: gitlab.com/sequoia-pgp/common-ci/rust-basic@main
inputs:
job_name: trixie-crypto-openssl
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/trixie-prebuild
cargo_args: '--no-default-features --features crypto-openssl'
- component: gitlab.com/sequoia-pgp/common-ci/rust-basic@main
inputs:
job_name: rust-stable
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/rust-stable-prebuild
cargo_args: '--features=subplot'
- component: "gitlab.com/sequoia-pgp/common-ci/sequoia-pipeline@main"
trixie-build:
after_script:
- if ! git diff --quiet Cargo.lock ; then echo "Cargo.lock changed. Please add the change to the corresponding commit." ; git diff ; false ; fi
- if ! git diff --quiet ; then echo "The build changed the source. Please investigate." ; git diff ; fi
variables:
SEQUOIA_CRYPTO_POLICY: ""
sq-features:
tags:
- linux
stage: build
interruptible: true
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/trixie:latest
only:
refs:
- tags
- web
- schedules
parallel:
matrix:
- FEATURES:
- ""
script:
- cargo test --no-default-features --features crypto-nettle$FEATURES
all_commits:
# Test each commit up to main, to facilitate bisecting.
stage: test
interruptible: true
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/trixie-prebuild:latest
needs: ["rust-stable-build"]
script:
- .ci/all_commits.sh
rules:
- !reference [.default_rules, rules]
variables:
GIT_STRATEGY: clone
deny:
tags:
- linux
stage: test
interruptible: true
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/rust-stable:latest
before_script:
- !reference [.before_script, start]
- cargo install --locked cargo-deny
- !reference [.before_script, end]
script:
- cargo deny check
clippy:
tags:
- linux
stage: build
interruptible: true
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/rust-stable-prebuild:latest
before_script:
- !reference [.before_script, start]
- rustup default 1.70.0 # Pin clippy.
- rustup component add clippy
- cargo clippy --version
- !reference [.before_script, end]
script:
- cargo clippy
rules:
- !reference [.default_rules, rules]
windows-gnu-cng:
tags:
- win
- win2019
stage: build
interruptible: true
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/windows-gnu
only:
variables:
# Forks of this project most likely use gitlab's shared windows runners, which
# do not use the docker executor, so disable the windows jobs for forks.
- $CI_PROJECT_NAMESPACE == "sequoia-pgp"
before_script:
# We don't call *before_script_start or *before_script_end as we
# don't have bash, clang, etc.
- rustup default "1.70.0"
- rustc --version --verbose
- cargo --version
script:
# https://github.com/rust-lang/cargo/issues/5015
- pacman --noconfirm --needed -S mingw-w64-x86_64-openssl
- cargo test --tests --no-default-features --features crypto-cng,subplot
after_script: [] # scriptlet doesn't work on Powershell
variables:
CFLAGS: "" # Silence some C warnings when compiling under Windows
docker-build-push:
# Official docker image.