diff --git a/rust-bindings/rust/.gitlab-ci.yml b/rust-bindings/rust/.gitlab-ci.yml index af1cae59..29564aa9 100644 --- a/rust-bindings/rust/.gitlab-ci.yml +++ b/rust-bindings/rust/.gitlab-ci.yml @@ -17,30 +17,133 @@ cache: - sccache/ stages: +- check - build - publish # format and freshness checks -check: - stage: build +fmt: + stage: check script: - cargo fmt --package ostree -- --check + +gir: + stage: check + script: - rm -rf src/auto/ - make gir - git checkout -- sys/src/auto/versions.txt src/auto/versions.txt - git diff -R --exit-code -# build -build_all-features: - stage: build +clippy: + stage: check script: - - cargo clippy --all --features latest - - cargo test --verbose --all --features latest + - cargo clippy --all --all-features +# build build_default-features: stage: build script: - - cargo test --verbose --all + - cargo test --verbose --all + +# all feature levels +build_v2014_9: + stage: build + script: cargo test --verbose --all --features v2014_9 +build_v2015_7: + stage: build + script: cargo test --verbose --all --features v2015_7 +build_v2016_14: + stage: build + script: cargo test --verbose --all --features v2016_14 +build_v2016_4: + stage: build + script: cargo test --verbose --all --features v2016_4 +build_v2016_5: + stage: build + script: cargo test --verbose --all --features v2016_5 +build_v2016_6: + stage: build + script: cargo test --verbose --all --features v2016_6 +build_v2016_7: + stage: build + script: cargo test --verbose --all --features v2016_7 +build_v2016_8: + stage: build + script: cargo test --verbose --all --features v2016_8 +build_v2017_1: + stage: build + script: cargo test --verbose --all --features v2017_1 +build_v2017_10: + stage: build + script: cargo test --verbose --all --features v2017_10 +build_v2017_11: + stage: build + script: cargo test --verbose --all --features v2017_11 +build_v2017_12: + stage: build + script: cargo test --verbose --all --features v2017_12 +build_v2017_13: + stage: build + script: cargo test --verbose --all --features v2017_13 +build_v2017_15: + stage: build + script: cargo test --verbose --all --features v2017_15 +build_v2017_2: + stage: build + script: cargo test --verbose --all --features v2017_2 +build_v2017_3: + stage: build + script: cargo test --verbose --all --features v2017_3 +build_v2017_4: + stage: build + script: cargo test --verbose --all --features v2017_4 +build_v2017_6: + stage: build + script: cargo test --verbose --all --features v2017_6 +build_v2017_7: + stage: build + script: cargo test --verbose --all --features v2017_7 +build_v2017_8: + stage: build + script: cargo test --verbose --all --features v2017_8 +build_v2017_9: + stage: build + script: cargo test --verbose --all --features v2017_9 +build_v2018_2: + stage: build + script: cargo test --verbose --all --features v2018_2 +build_v2018_3: + stage: build + script: cargo test --verbose --all --features v2018_3 +build_v2018_5: + stage: build + script: cargo test --verbose --all --features v2018_5 +build_v2018_6: + stage: build + script: cargo test --verbose --all --features v2018_6 +build_v2018_7: + stage: build + script: cargo test --verbose --all --features v2018_7 +build_v2018_9: + stage: build + script: cargo test --verbose --all --features v2018_9 +build_v2019_2: + stage: build + script: cargo test --verbose --all --features v2019_2 +build_v2019_3: + stage: build + script: cargo test --verbose --all --features v2019_3 +build_v2019_4: + stage: build + script: cargo test --verbose --all --features v2019_4 +build_v2019_6: + stage: build + script: cargo test --verbose --all --features v2019_6 +build_v2020_1: + stage: build + script: cargo test --verbose --all --features v2020_1 +# all feature levels # docs docs: diff --git a/rust-bindings/rust/Cargo.toml b/rust-bindings/rust/Cargo.toml index 09ffcb66..d018f096 100644 --- a/rust-bindings/rust/Cargo.toml +++ b/rust-bindings/rust/Cargo.toml @@ -81,4 +81,3 @@ v2019_3 = ["v2019_2", "ostree-sys/v2019_3"] v2019_4 = ["v2019_3", "ostree-sys/v2019_4"] v2019_6 = ["v2019_4", "ostree-sys/v2019_6"] v2020_1 = ["v2019_6", "ostree-sys/v2020_1"] -latest = ["v2020_1"] diff --git a/rust-bindings/rust/Makefile b/rust-bindings/rust/Makefile index 822ad7ea..3b1380d8 100644 --- a/rust-bindings/rust/Makefile +++ b/rust-bindings/rust/Makefile @@ -3,7 +3,7 @@ RUSTDOC_STRIPPER_VERSION := 0.1.9 all: gir -.PHONY: gir gir-report update-gir-files remove-gir-files merge-lgpl-docs +.PHONY: gir gir-report update-gir-files remove-gir-files merge-lgpl-docs ci-build-stages # -- gir generation -- @@ -47,3 +47,12 @@ gir-files: gir-files/OSTree-1.0.gir: echo Best to build libostree with all features and use that exit 1 + + +# CI config generation +ci-build-stages: + @for tgt in `cargo read-manifest | jq -jr '.features | keys | map(select(. != "dox")) | map(. + " ") | .[]'`; do \ + echo "build_$$tgt:"; \ + echo " stage: build"; \ + echo " script: cargo test --verbose --all --features $$tgt"; \ + done