.before_script_start: &before_script_start
- 'if test "x${RUSTFLAGS+SET}" = xSET; then echo "\$RUSTFLAGS is set ($RUSTFLAGS)"; exit 1; fi'
.before_script_end: &before_script_end
- 'if test "x${RUSTFLAGS+SET}" = xSET; then echo "WARNING: before_script set \$RUSTFLAGS ($RUSTFLAGS)"; fi'
- rustc --version --verbose
- cargo --version
- clang -v
- pkg-config --modversion nettle
- if [ -d $CARGO_TARGET_DIR ]; then find $CARGO_TARGET_DIR | wc --lines; du -sh $CARGO_TARGET_DIR; fi
- if [ -d $CARGO_HOME ]; then find $CARGO_HOME | wc --lines; du -sh $CARGO_HOME; fi
.after_script_end: &after_script_end
- if [ -d $CARGO_TARGET_DIR ]; then find $CARGO_TARGET_DIR -type f -atime +7 -delete; fi
- if [ -d $CARGO_TARGET_DIR ]; then du -sh $CARGO_TARGET_DIR; fi
- if [ -d $CARGO_HOME ]; then du -sh $CARGO_HOME; fi
before_script:
- *before_script_start
- *before_script_end
after_script:
- *after_script_end
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/trixie:latest
test:
script:
- cargo run --example supported-algorithms
- cargo test --all
test-bookworm:
image: rust:slim-bookworm
before_script:
- *before_script_start
- apt update -y -qq
- apt install -y -qq --no-install-recommends clang llvm pkg-config nettle-dev
- *before_script_end
script:
- cargo run --example supported-algorithms
- cargo test --all
test-bullseye:
image: rust:slim-bullseye
before_script:
- *before_script_start
- apt update -y -qq
- apt install -y -qq --no-install-recommends clang llvm pkg-config nettle-dev
- *before_script_end
script:
- cargo run --example supported-algorithms
- cargo test --all
test-buster:
image: rust:slim-buster
before_script:
- *before_script_start
- apt update -y -qq
- apt install -y -qq --no-install-recommends clang llvm pkg-config nettle-dev
- *before_script_end
script:
- cargo run --example supported-algorithms
- cargo test --all
test-windows-gnu:
tags:
- win
- win2019
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/windows-gnu
only:
variables:
- $CI_PROJECT_NAMESPACE == "sequoia-pgp"
script:
- rustup override set stable
- cargo run --example supported-algorithms
- cargo test --all
before_script: []
after_script: []
test-alpine-musl:
image: alpine
before_script:
- *before_script_start
- apk add coreutils findutils rust cargo nettle nettle-dev pkgconfig clang-dev
- *before_script_end
script:
- cargo run --example supported-algorithms
- cargo test --all
test-alpine-edge:
image: alpine:edge
before_script:
- *before_script_start
- apk add coreutils findutils rust cargo nettle nettle-dev pkgconfig clang-dev
- *before_script_end
script:
- cargo run --example supported-algorithms
- cargo test --all
sanitizer:
tags:
- linux
image: 192.168.122.1:5000/sequoia-pgp/build-docker-image/sanitizer-nightly:latest
stage: test
before_script:
- *before_script_start
- llvm-symbolizer --version
- *before_script_end
script:
- export RUSTFLAGS="-Z sanitizer=address"
- export RUSTDOCFLAGS="-Z sanitizer=address"
- export ASAN_OPTIONS=detect_stack_use_after_return=1
- cargo test --target x86_64-unknown-linux-gnu
pages:
stage: deploy
script:
- cargo doc --no-deps -p nettle -p nettle-sys
- mv target/doc public
- cp docs/index.html public/
artifacts:
paths:
- public
only:
- main
cache:
paths:
- cargo/
variables:
DEBIAN_FRONTEND: noninteractive
CARGO_HOME: $CI_PROJECT_DIR/cargo
CARGO_TARGET_DIR: $CI_PROJECT_DIR/target
CARGO_FLAGS: --color always
CARGO_INCREMENTAL: 0