Skip to content

Commit

Permalink
Final changes in E2E yaml
Browse files Browse the repository at this point in the history
Signed-off-by: noopur <[email protected]>
  • Loading branch information
noopurintel committed Jan 23, 2025
1 parent 94da0df commit 04ac6c7
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/task_runner_basic_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
model_name:
description: "Model name"
required: false
default: 'all'
default: "all"
type: choice
options:
- all
Expand All @@ -30,17 +30,17 @@ on:
python_version:
description: "Python version"
required: false
default: 'all'
default: "all"
type: choice
options:
- all
- '3.10'
- "3.10"
- "3.11"
- "3.12"
jobs_to_run:
description: "Jobs to run"
type: choice
default: 'all'
default: "all"
options:
- all
- test_with_tls
Expand All @@ -54,20 +54,22 @@ permissions:

# Environment variables common for all the jobs
env:
NUM_ROUNDS: ${{ inputs.num_rounds || '5' }}
NUM_COLLABORATORS: ${{ inputs.num_collaborators || '2' }}
MODEL_NAME: ${{ inputs.model_name || 'all' }}
PYTHON_VERSION: ${{ inputs.python_version || 'all' }}
JOBS_TO_RUN: ${{ inputs.jobs_to_run || 'all' }}
NUM_ROUNDS: ${{ inputs.num_rounds || "5" }}
NUM_COLLABORATORS: ${{ inputs.num_collaborators || "2" }}
MODEL_NAME: ${{ inputs.model_name || "all" }}
PYTHON_VERSION: ${{ inputs.python_version || "all" }}
JOBS_TO_RUN: ${{ inputs.jobs_to_run || "all" }}

jobs:
input_selection:
if: |
(github.event_name == 'schedule' && github.repository_owner == 'securefederatedai') ||
(github.event_name == 'workflow_dispatch')
(github.event_name == "schedule" && github.repository_owner == "securefederatedai") ||
(github.event_name == "workflow_dispatch")
name: Input value selection
runs-on: ubuntu-22.04
outputs:
# Output all the variables related to models and python versions to be used in the matrix strategy
# for different jobs, however their usage depends on the selected job.
selected_jobs: ${{ steps.input_selection.outputs.jobs_to_run }}
selected_models_for_tls: ${{ steps.input_selection.outputs.models_for_tls }}
selected_python_for_tls: ${{ steps.input_selection.outputs.python_for_tls }}
Expand All @@ -84,15 +86,15 @@ jobs:
# ---------------------------------------------------------------
# Models like XGBoost (xgb_higgs) and torch_cnn_histology require runners with higher memory and CPU to run.
# Thus these models are excluded from the matrix for now.
# Default combination if no input is provided.
# Default combination if no input is provided (i.e. "all" is selected).
# * TLS - models [torch_cnn_mnist, keras_cnn_mnist] and python versions [3.10, 3.11, 3.12]
# * Non-TLS - models [torch_cnn_mnist] and python version [3.10]
# * No client auth - models [keras_cnn_mnist] and python version [3.10]
# * Memory logs - models [torch_cnn_mnist] and python version [3.10]
# ---------------------------------------------------------------
echo "jobs_to_run=${{ env.JOBS_TO_RUN }}" >> "$GITHUB_OUTPUT"
if [ "${{ env.MODEL_NAME }}" == 'all' ]; then
if [ "${{ env.MODEL_NAME }}" == "all" ]; then
echo "models_for_tls=[\"torch_cnn_mnist\", \"keras_cnn_mnist\"]" >> "$GITHUB_OUTPUT"
echo "models_for_non_tls=[\"torch_cnn_mnist\"]" >> "$GITHUB_OUTPUT"
echo "models_for_no_client_auth=[\"keras_cnn_mnist\"]" >> "$GITHUB_OUTPUT"
Expand All @@ -103,7 +105,7 @@ jobs:
echo "models_for_no_client_auth=[\"${{env.MODEL_NAME}}\"]" >> "$GITHUB_OUTPUT"
echo "models_for_memory_logs=[\"${{env.MODEL_NAME}}\"]" >> "$GITHUB_OUTPUT"
fi
if [ "${{ env.PYTHON_VERSION }}" == 'all' ]; then
if [ "${{ env.PYTHON_VERSION }}" == "all" ]; then
echo "python_for_tls=[\"3.10\", \"3.11\", \"3.12\"]" >> "$GITHUB_OUTPUT"
echo "python_for_non_tls=[\"3.10\"]" >> "$GITHUB_OUTPUT"
echo "python_for_no_client_auth=[\"3.10\"]" >> "$GITHUB_OUTPUT"
Expand All @@ -118,7 +120,7 @@ jobs:
test_with_tls:
name: Test with TLS
needs: input_selection
if: needs.input_selection.outputs.selected_jobs == 'all' || needs.input_selection.outputs.selected_jobs == 'test_with_tls'
if: needs.input_selection.outputs.selected_jobs == "all" || needs.input_selection.outputs.selected_jobs == "test_with_tls"
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
Expand Down Expand Up @@ -161,7 +163,7 @@ jobs:
test_with_non_tls:
name: Test without TLS
needs: input_selection
if: needs.input_selection.outputs.selected_jobs == 'all' || needs.input_selection.outputs.selected_jobs == 'test_with_non_tls'
if: needs.input_selection.outputs.selected_jobs == "all" || needs.input_selection.outputs.selected_jobs == "test_with_non_tls"
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
Expand Down Expand Up @@ -204,7 +206,7 @@ jobs:
test_with_no_client_auth:
name: Test without client auth
needs: input_selection
if: needs.input_selection.outputs.selected_jobs == 'all' || needs.input_selection.outputs.selected_jobs == 'test_with_no_client_auth'
if: needs.input_selection.outputs.selected_jobs == "all" || needs.input_selection.outputs.selected_jobs == "test_with_no_client_auth"
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
Expand Down Expand Up @@ -247,7 +249,7 @@ jobs:
test_memory_logs:
name: Test memory usage
needs: input_selection
if: needs.input_selection.outputs.selected_jobs == 'all' || needs.input_selection.outputs.selected_jobs == 'test_memory_logs'
if: needs.input_selection.outputs.selected_jobs == "all" || needs.input_selection.outputs.selected_jobs == "test_memory_logs"
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
Expand Down

0 comments on commit 04ac6c7

Please sign in to comment.