From f65cc04bdc63626e9de5d34c2f221cc3e826e709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Test=C3=A9?= Date: Wed, 15 May 2024 14:33:25 +0200 Subject: [PATCH] WIP: make simple changes to test the behavior --- .github/workflows/aws_tfhe_tests.yml | 25 +++++++++++++++++++------ tfhe/src/boolean/mod.rs | 1 + tfhe/src/c_api/mod.rs | 2 ++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/aws_tfhe_tests.yml b/.github/workflows/aws_tfhe_tests.yml index 353f396561..44fcc4a937 100644 --- a/.github/workflows/aws_tfhe_tests.yml +++ b/.github/workflows/aws_tfhe_tests.yml @@ -21,7 +21,7 @@ on: jobs: file-change: - if: ${{ github.event_name == 'pull_request' }} # FIXME tester le cas où on est en schedule pour le `needs.` + if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest permissions: pull-requests: write @@ -36,7 +36,7 @@ jobs: csprng_test: ${{ steps.changed-files.outputs.csprng_any_changed }} apps_test: ${{ steps.changed-files.outputs.apps_any_changed }} user_docs_test: ${{ steps.changed-files.outputs.user_docs_any_changed }} - any_file_changed: ${{ steps.changed-files.outputs.any_changed }} + any_file_changed: ${{ steps.aggregated-changes.outputs.any_changed }} steps: - name: Checkout tfhe-rs uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b @@ -71,12 +71,25 @@ jobs: - tfhe/docs/** - README.md - # TODO Ajouter une étape qui aggrège tous les résultats de "any_changed" en utilisant un any() + - name: Aggregate file changes + id: aggregated-changes + if: ( steps.changed-files.outputs.core_crypto_any_changed == 'true' || + steps.changed-files.outputs.boolean_any_changed == 'true' || + steps.changed-files.outputs.shortint_any_changed == 'true' || + steps.changed-files.outputs.c_api_any_changed == 'true' || + steps.changed-files.outputs.high_level_api_any_changed == 'true' || + steps.changed-files.outputs.examples_any_changed == 'true' || + steps.changed-files.outputs.zk_pok_any_changed == 'true' || + steps.changed-files.outputs.csprng_any_changed == 'true' || + steps.changed-files.outputs.apps_any_changed == 'true' || + steps.changed-files.outputs.user_docs_any_changed == 'true') + run: | + echo "any_changed=true" >> "$GITHUB_OUTPUT" setup-instance: name: Setup instance (cpu-tests) - #if: ${{ github.event_name == 'pull_request' && needs.file-change.outputs.any_file_changed == 'true' }} - ###############if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.label.name, 'approved') }} + if: ${{ github.event_name != 'pull_request' || + (github.event_name == 'pull_request' && needs.file-change.outputs.any_file_changed == 'true') }} needs: file-change runs-on: ubuntu-latest outputs: @@ -95,7 +108,7 @@ jobs: cpu-tests: name: CPU tests - needs: setup-instance + needs: [ file-change, setup-instance ] concurrency: group: ${{ github.workflow }}_${{ github.ref }} cancel-in-progress: true diff --git a/tfhe/src/boolean/mod.rs b/tfhe/src/boolean/mod.rs index 69812fe88b..829589e8f9 100644 --- a/tfhe/src/boolean/mod.rs +++ b/tfhe/src/boolean/mod.rs @@ -98,6 +98,7 @@ pub(crate) fn random_integer() -> u32 { // generate a random u32 rng.gen::() } + // A simple change /// Generate a couple of client and server keys with the default cryptographic parameters: /// `DEFAULT_PARAMETERS`. diff --git a/tfhe/src/c_api/mod.rs b/tfhe/src/c_api/mod.rs index fc1bd5dc42..2bbd039464 100644 --- a/tfhe/src/c_api/mod.rs +++ b/tfhe/src/c_api/mod.rs @@ -8,3 +8,5 @@ pub mod high_level_api; #[cfg(feature = "shortint-c-api")] pub mod shortint; pub(crate) mod utils; + +// A simple change