From a27c70226c138cf023d2d70a79f6dcdedc410a15 Mon Sep 17 00:00:00 2001 From: AkhilTThomas Date: Fri, 13 Dec 2024 19:02:17 +0100 Subject: [PATCH 1/3] add cargo-hack * Run cargo check on each feature for all bins --- .github/workflows/kuksa_databroker_build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/kuksa_databroker_build.yml b/.github/workflows/kuksa_databroker_build.yml index 7765acab..a4b2fb6e 100644 --- a/.github/workflows/kuksa_databroker_build.yml +++ b/.github/workflows/kuksa_databroker_build.yml @@ -160,6 +160,9 @@ jobs: # Needed for pip with: python-version: '3.12' + - uses: taiki-e/install-action@v2.9.4 + with: + tool: cargo-hack@0.6 - name: Install build prerequisites working-directory: ${{github.workspace}}/ run: | @@ -173,6 +176,10 @@ jobs: run: | ./scripts/build-databroker.sh ${{ matrix.platform.name }} + - name: "Check each feature" + working-directory: ${{github.workspace}} + run: cargo hack check --each-feature + - name: "Archiving artifacts" shell: bash working-directory: ${{github.workspace}}/dist/${{ matrix.platform.name }} From 6c1eab661b4f70c568e516d7c64206470352a625 Mon Sep 17 00:00:00 2001 From: AkhilTThomas Date: Fri, 13 Dec 2024 19:38:41 +0100 Subject: [PATCH 2/3] fix missing feature gate in databroker-cli --- databroker-cli/src/cli.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/databroker-cli/src/cli.rs b/databroker-cli/src/cli.rs index 812656f5..71938d73 100644 --- a/databroker-cli/src/cli.rs +++ b/databroker-cli/src/cli.rs @@ -61,6 +61,7 @@ pub struct Cli { } impl Cli { + #[cfg(feature = "tls")] pub fn get_ca_cert(&mut self) -> Option { self.ca_cert.clone() } From c344974af20b8b1830fd2e74272cd014edd0cf2f Mon Sep 17 00:00:00 2001 From: AkhilTThomas Date: Thu, 2 Jan 2025 11:44:53 +0100 Subject: [PATCH 3/3] move cargo check each feat to unit test action --- .github/workflows/kuksa_databroker_build.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/kuksa_databroker_build.yml b/.github/workflows/kuksa_databroker_build.yml index a4b2fb6e..d5c6ff65 100644 --- a/.github/workflows/kuksa_databroker_build.yml +++ b/.github/workflows/kuksa_databroker_build.yml @@ -130,6 +130,12 @@ jobs: with: files: lcov.info token: ${{ secrets.CODECOV_TOKEN }} + - uses: taiki-e/install-action@v2.9.4 + with: + tool: cargo-hack@0.6 + - name: "Check each feature" + working-directory: ${{github.workspace}} + run: cargo hack check --each-feature build: name: Build @@ -160,9 +166,6 @@ jobs: # Needed for pip with: python-version: '3.12' - - uses: taiki-e/install-action@v2.9.4 - with: - tool: cargo-hack@0.6 - name: Install build prerequisites working-directory: ${{github.workspace}}/ run: | @@ -176,10 +179,6 @@ jobs: run: | ./scripts/build-databroker.sh ${{ matrix.platform.name }} - - name: "Check each feature" - working-directory: ${{github.workspace}} - run: cargo hack check --each-feature - - name: "Archiving artifacts" shell: bash working-directory: ${{github.workspace}}/dist/${{ matrix.platform.name }}