Loading .gitlab-ci.yml +63 −7 Original line number Diff line number Diff line Loading @@ -7,28 +7,84 @@ test:cargo: matrix: - TARGET: freebsd - TARGET: openbsd coverage: '/TOTAL\s+(\d+\s+)+(\d+\.\d+\%)/' script: - rustc --version && cargo --version # Print version info for debugging - cargo fmt -- --check - cargo clippy - cargo test --workspace --verbose - echo -e "\e[0Ksection_start:`date +%s`:lint\r\e[0KLinting" - cargo clippy --message-format=json --all-targets --all-features -- -D warnings > clippy.json - echo -e "\e[0Ksection_end:`date +%s`:lint\r\e[0K" # Coverage testing would go here. However, OpenBSD rust is not built # with the required tooling for profiling builds. - echo -e "\e[0Ksection_start:`date +%s`:test\r\e[0KRunning cargo nextest" - if [[ "$(uname -s)" = "OpenBSD" ]]; then cargo nextest run --workspace --cargo-verbose --tests; else cargo llvm-cov nextest --workspace --cargo-verbose --tests; fi - echo -e "\e[0Ksection_end:`date +%s`:test\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:deps\r\e[0KRunning cargo audit" - gitlab-cargo-audit --output-path gl-dep-report.json - echo -e "\e[0Ksection_end:`date +%s`:deps\r\e[0K" after_script: - cargo codeclimate --clippy --codeclimate-path gl-code-quality-report.json - if [[ "$(uname -s)" = "Darwin" || "$(uname -s)" = "FreeBSD" ]]; then cargo llvm-cov report --cobertura --output-path target/llvm-cov-target/cobertura.xml; fi variables: RUST_BACKTRACE: full CARGO_INCREMENTAL: 0 artifacts: name: dhat-report paths: - dhat-heap.json reports: junit: target/nextest/default/junit.xml codequality: gl-code-quality-report.json dependency_scanning: gl-dep-report.json coverage_report: coverage_format: cobertura path: target/llvm-cov-target/cobertura.xml expire_in: 1 month cache: key: deps paths: - target/ cross:cargo: image: rust:1.86 image: rust:1.91 stage: build tags: - gitlab-org-docker parallel: matrix: - TARGET: x86_64-unknown-netbsd - TARGET: i686-unknown-freebsd - TARGET: x86_64-unknown-freebsd - TARGET: x86_64-apple-darwin - TARGET: i686-unknown-freebsd - TARGET: aarch64-apple-darwin - TARGET: x86_64-apple-ios - TARGET: x86_64-apple-darwin - TARGET: aarch64-apple-ios - TARGET: x86_64-apple-ios before_script: - rustup component add clippy rustfmt - rustup target add $TARGET - curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash - cargo binstall cargo-sonar cargo-semver-checks script: - rustc --version && cargo --version # Print version info for debugging - cargo fmt --check - cargo build --target $TARGET - cargo clippy --target $TARGET --message-format=json --all-targets --all-features -- -D warnings > clippy.json - cargo semver-checks --target $TARGET after_script: - cargo codeclimate --clippy --codeclimate-path gl-code-quality-report.json artifacts: reports: codequality: gl-code-quality-report.json cache: key: deps-$TARGET-cross paths: - target/ Loading
.gitlab-ci.yml +63 −7 Original line number Diff line number Diff line Loading @@ -7,28 +7,84 @@ test:cargo: matrix: - TARGET: freebsd - TARGET: openbsd coverage: '/TOTAL\s+(\d+\s+)+(\d+\.\d+\%)/' script: - rustc --version && cargo --version # Print version info for debugging - cargo fmt -- --check - cargo clippy - cargo test --workspace --verbose - echo -e "\e[0Ksection_start:`date +%s`:lint\r\e[0KLinting" - cargo clippy --message-format=json --all-targets --all-features -- -D warnings > clippy.json - echo -e "\e[0Ksection_end:`date +%s`:lint\r\e[0K" # Coverage testing would go here. However, OpenBSD rust is not built # with the required tooling for profiling builds. - echo -e "\e[0Ksection_start:`date +%s`:test\r\e[0KRunning cargo nextest" - if [[ "$(uname -s)" = "OpenBSD" ]]; then cargo nextest run --workspace --cargo-verbose --tests; else cargo llvm-cov nextest --workspace --cargo-verbose --tests; fi - echo -e "\e[0Ksection_end:`date +%s`:test\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:deps\r\e[0KRunning cargo audit" - gitlab-cargo-audit --output-path gl-dep-report.json - echo -e "\e[0Ksection_end:`date +%s`:deps\r\e[0K" after_script: - cargo codeclimate --clippy --codeclimate-path gl-code-quality-report.json - if [[ "$(uname -s)" = "Darwin" || "$(uname -s)" = "FreeBSD" ]]; then cargo llvm-cov report --cobertura --output-path target/llvm-cov-target/cobertura.xml; fi variables: RUST_BACKTRACE: full CARGO_INCREMENTAL: 0 artifacts: name: dhat-report paths: - dhat-heap.json reports: junit: target/nextest/default/junit.xml codequality: gl-code-quality-report.json dependency_scanning: gl-dep-report.json coverage_report: coverage_format: cobertura path: target/llvm-cov-target/cobertura.xml expire_in: 1 month cache: key: deps paths: - target/ cross:cargo: image: rust:1.86 image: rust:1.91 stage: build tags: - gitlab-org-docker parallel: matrix: - TARGET: x86_64-unknown-netbsd - TARGET: i686-unknown-freebsd - TARGET: x86_64-unknown-freebsd - TARGET: x86_64-apple-darwin - TARGET: i686-unknown-freebsd - TARGET: aarch64-apple-darwin - TARGET: x86_64-apple-ios - TARGET: x86_64-apple-darwin - TARGET: aarch64-apple-ios - TARGET: x86_64-apple-ios before_script: - rustup component add clippy rustfmt - rustup target add $TARGET - curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash - cargo binstall cargo-sonar cargo-semver-checks script: - rustc --version && cargo --version # Print version info for debugging - cargo fmt --check - cargo build --target $TARGET - cargo clippy --target $TARGET --message-format=json --all-targets --all-features -- -D warnings > clippy.json - cargo semver-checks --target $TARGET after_script: - cargo codeclimate --clippy --codeclimate-path gl-code-quality-report.json artifacts: reports: codequality: gl-code-quality-report.json cache: key: deps-$TARGET-cross paths: - target/