From df37d4d0d6075ec7e60f0a1ce932ee7753972a24 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 22:55:15 +0000 Subject: [PATCH 001/147] trying tj-actions for github workflows --- .github/workflows/temp_ci_test.yml | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/temp_ci_test.yml diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml new file mode 100644 index 00000000..7a24630a --- /dev/null +++ b/.github/workflows/temp_ci_test.yml @@ -0,0 +1,53 @@ +name: Track changes between main and new commit + +on: + workflow_dispatch: +- +jobs: + changed_files: + # ------------------------------------------------------------------------ + # Event `pull_request`: Compare the last commit of the main branch or last + # remote commit of the PR branch -> to the current commit of a PR branch. + # ------------------------------------------------------------------------ + changed_files: + runs-on: ubuntu-latest # windows-latest || macos-latest + name: Test changed-files + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v42 + # To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g + # with: + # since_last_remote_commit: true + + - name: List all changed files + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file was changed" + done + + # setup-environment: + # name: Setup environment + # runs-on: ubuntu-latest + + # outputs: + # registry: ${{ steps.docker-environment.outputs.registry }} + # repository: ${{ steps.docker-environment.outputs.repository }} + + # steps: + # - name: Checkout Repository + # uses: actions/checkout@v3 + + # - name: Setup Watod Environment + # run: ./watod_scripts/watod-setup-env.sh + # shell: bash + + # - name: Generate Docker Environment + # id: docker-environment + # uses: "./.github/templates/docker_context" \ No newline at end of file From b586fabfbb4d46e85341be84f4d830d2266dddb8 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 22:56:19 +0000 Subject: [PATCH 002/147] fixed syntax error line 4 --- .github/workflows/temp_ci_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 7a24630a..50f1f013 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -2,7 +2,7 @@ name: Track changes between main and new commit on: workflow_dispatch: -- + jobs: changed_files: # ------------------------------------------------------------------------ From a817dc337a12dea1b80ffab9c619861a5b14a0e1 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 22:57:09 +0000 Subject: [PATCH 003/147] syntax error again --- .github/workflows/temp_ci_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 50f1f013..e5cba8c0 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -9,7 +9,6 @@ jobs: # Event `pull_request`: Compare the last commit of the main branch or last # remote commit of the PR branch -> to the current commit of a PR branch. # ------------------------------------------------------------------------ - changed_files: runs-on: ubuntu-latest # windows-latest || macos-latest name: Test changed-files steps: From 20f80cc90388617f4b2dd69976c41a5b3dd52d41 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 23:02:42 +0000 Subject: [PATCH 004/147] test tj-actions --- .github/workflows/temp_ci_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index e5cba8c0..fce95796 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -28,7 +28,7 @@ jobs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | for file in ${ALL_CHANGED_FILES}; do - echo "$file was changed" + echo "$file was changed!" done # setup-environment: From f300c91f6e2d9480071570b3b5f1b93181e9d3a5 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 23:06:23 +0000 Subject: [PATCH 005/147] on: changes --- .github/workflows/temp_ci_test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index fce95796..b9abdcfc 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -1,7 +1,12 @@ name: Track changes between main and new commit on: - workflow_dispatch: + releases: + types: [created] + workflow_dispatch: {} + push: + branches: + - 'ci-specific-modules' jobs: changed_files: From 64e9398fb0d3b932103d4c765576695b1833781f Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 23:06:51 +0000 Subject: [PATCH 006/147] on: changes 2 --- .github/workflows/temp_ci_test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index b9abdcfc..3f0d3ae4 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -1,8 +1,6 @@ name: Track changes between main and new commit on: - releases: - types: [created] workflow_dispatch: {} push: branches: From 8c6c4ed1a35a26bb406af8cdd5894274c58dc88c Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 23:47:46 +0000 Subject: [PATCH 007/147] test glob patterning to check src files --- .github/workflows/temp_ci_test.yml | 4 ++++ src/samples/cpp/aggregator/src/aggregator_core.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 3f0d3ae4..952875db 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -25,6 +25,10 @@ jobs: # To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g # with: # since_last_remote_commit: true + with: + files: | + src: + - src/** - name: List all changed files env: diff --git a/src/samples/cpp/aggregator/src/aggregator_core.cpp b/src/samples/cpp/aggregator/src/aggregator_core.cpp index 4cfb8ea1..a72c548f 100644 --- a/src/samples/cpp/aggregator/src/aggregator_core.cpp +++ b/src/samples/cpp/aggregator/src/aggregator_core.cpp @@ -20,6 +20,7 @@ double AggregatorCore::raw_frequency() const double AggregatorCore::filtered_frequency() const { + if (latest_filtered_time_ <= start_) { return 0.0; } From 985c420fbc2ea502b96e54b8b868a39e4e689397 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 23:51:33 +0000 Subject: [PATCH 008/147] test glob patterning to check src files 2 --- src/samples/cpp/aggregator/src/aggregator_core.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/samples/cpp/aggregator/src/aggregator_core.cpp b/src/samples/cpp/aggregator/src/aggregator_core.cpp index a72c548f..288aee98 100644 --- a/src/samples/cpp/aggregator/src/aggregator_core.cpp +++ b/src/samples/cpp/aggregator/src/aggregator_core.cpp @@ -20,9 +20,8 @@ double AggregatorCore::raw_frequency() const double AggregatorCore::filtered_frequency() const { - if (latest_filtered_time_ <= start_) { - return 0.0; + return 1.0; } return static_cast(filtered_msg_count_) / (latest_filtered_time_ - start_); } From d0abc65aba3dee5169d0dc202601d5c033f8a1f2 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 23:54:03 +0000 Subject: [PATCH 009/147] test glob patterning to check src files 3 --- .github/workflows/temp_ci_test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 952875db..165113f5 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -26,9 +26,8 @@ jobs: # with: # since_last_remote_commit: true with: - files: | - src: - - src/** + files: | + src/** - name: List all changed files env: From e95b008b3ef0aaae0c6dff2790558f320993fe22 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 6 Feb 2024 23:56:34 +0000 Subject: [PATCH 010/147] test glob patterning to check src files 4 --- .github/workflows/temp_ci_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 165113f5..7120f64b 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -26,8 +26,7 @@ jobs: # with: # since_last_remote_commit: true with: - files: | - src/** + files: .github/** - name: List all changed files env: From 16138ab1f0994a5a08f5e5011845141df078040d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:09:14 +0000 Subject: [PATCH 011/147] testing tj actions to store directory changes in env var --- .../docker_context/docker_context.sh | 8 ++++--- .github/workflows/temp_ci_test.yml | 23 +++++++++++++++---- src/action/test.txt | 0 src/interfacing/test2.txt | 0 4 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 src/action/test.txt create mode 100644 src/interfacing/test2.txt diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 0d43e0c3..53fdefc7 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -7,6 +7,8 @@ set -e # Find docker compose files in 'modules' directory modules=$(find modules -maxdepth 1 -name "docker-compose*") +echo $modules +echo ================================ # Initialize an empty array for JSON objects json_objects=() @@ -29,7 +31,7 @@ done <<< "$modules" # Convert the array of JSON objects to a single JSON array json_services=$(jq -nc '[( $ARGS.positional[] | fromjson )]' --args -- ${json_objects[*]}) -echo "docker_matrix=$(echo $json_services | jq -c '{include: .}')" >> $GITHUB_OUTPUT +echo "docker_matrix=$(echo $json_services | jq -c '{include: .}')" #>> #$GITHUB_OUTPUT ################# Setup Docker Registry and Repository Name ################# # Docker Registry to pull/push images @@ -38,5 +40,5 @@ REGISTRY_URL="ghcr.io/watonomous/wato_monorepo" REGISTRY=$(echo "$REGISTRY_URL" | sed 's|^\(.*\)/.*$|\1|') REPOSITORY=$(echo "$REGISTRY_URL" | sed 's|^.*/\(.*\)$|\1|') -echo "registry=$REGISTRY" >> $GITHUB_OUTPUT -echo "repository=$REPOSITORY" >> $GITHUB_OUTPUT +echo "registry=$REGISTRY" #>> $GITHUB_OUTPUT +echo "repository=$REPOSITORY" #>> $GITHUB_OUTPUT diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 7120f64b..bd4b91af 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -14,19 +14,30 @@ jobs: # ------------------------------------------------------------------------ runs-on: ubuntu-latest # windows-latest || macos-latest name: Test changed-files + env: + CHANGED_MODULES: "" steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - - name: Get changed files + - name: Get changed files inside action folder id: changed-files uses: tj-actions/changed-files@v42 - # To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g - # with: - # since_last_remote_commit: true with: - files: .github/** + files: .src/action/** + if: steps.changed-files-specific.outputs.any_changed == 'true' + env: + CHANGED_MODULES: action + + - name: Get changed files inside interfacing folder + id: changed-files + uses: tj-actions/changed-files@v42 + with: + files: .src/interfacing/** + if: steps.changed-files-specific.outputs.any_changed == 'true' + env: + CHANGED_MODULES: "$CHANGED_MODULES interfacing" - name: List all changed files env: @@ -35,6 +46,8 @@ jobs: for file in ${ALL_CHANGED_FILES}; do echo "$file was changed!" done + echo ======================= + echo "CHANGED_MODULES: $CHANGED_MODULES" # setup-environment: # name: Setup environment diff --git a/src/action/test.txt b/src/action/test.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt new file mode 100644 index 00000000..e69de29b From 23cb1bfff97eb6250d2172efe25f048ec442be2d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:10:10 +0000 Subject: [PATCH 012/147] changed id --- .github/workflows/temp_ci_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index bd4b91af..5fc4519b 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - name: Get changed files inside action folder - id: changed-files + id: changed-files-action uses: tj-actions/changed-files@v42 with: files: .src/action/** @@ -31,7 +31,7 @@ jobs: CHANGED_MODULES: action - name: Get changed files inside interfacing folder - id: changed-files + id: changed-files-interfacing uses: tj-actions/changed-files@v42 with: files: .src/interfacing/** From 789646811456c382a826521f7cd2d331bee24d0b Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:16:20 +0000 Subject: [PATCH 013/147] typo in src --- .github/workflows/temp_ci_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 5fc4519b..1d7b4b5b 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -25,7 +25,7 @@ jobs: id: changed-files-action uses: tj-actions/changed-files@v42 with: - files: .src/action/** + files: src/action/** if: steps.changed-files-specific.outputs.any_changed == 'true' env: CHANGED_MODULES: action @@ -34,7 +34,7 @@ jobs: id: changed-files-interfacing uses: tj-actions/changed-files@v42 with: - files: .src/interfacing/** + files: src/interfacing/** if: steps.changed-files-specific.outputs.any_changed == 'true' env: CHANGED_MODULES: "$CHANGED_MODULES interfacing" From ea5ede890bb69733a8630f1e976dd8107e9480c2 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:19:36 +0000 Subject: [PATCH 014/147] workflow changes --- .github/workflows/temp_ci_test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 1d7b4b5b..5f3e527f 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -21,11 +21,13 @@ jobs: with: fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - - name: Get changed files inside action folder + - name: Find changed files inside action folder id: changed-files-action uses: tj-actions/changed-files@v42 with: files: src/action/** + + - name: Update CHANGED_MODULES for action if: steps.changed-files-specific.outputs.any_changed == 'true' env: CHANGED_MODULES: action @@ -35,6 +37,8 @@ jobs: uses: tj-actions/changed-files@v42 with: files: src/interfacing/** + + - name: Update CHANGED_MODULES for action if: steps.changed-files-specific.outputs.any_changed == 'true' env: CHANGED_MODULES: "$CHANGED_MODULES interfacing" From 9720a9ce18f702733ec07b73dd0be5d2caa7a32e Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:20:56 +0000 Subject: [PATCH 015/147] workflow changes --- .github/workflows/temp_ci_test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 5f3e527f..258fae40 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -31,6 +31,8 @@ jobs: if: steps.changed-files-specific.outputs.any_changed == 'true' env: CHANGED_MODULES: action + run: + echo "Detected action changes" - name: Get changed files inside interfacing folder id: changed-files-interfacing @@ -42,6 +44,8 @@ jobs: if: steps.changed-files-specific.outputs.any_changed == 'true' env: CHANGED_MODULES: "$CHANGED_MODULES interfacing" + run: + echo "Detected interfacing changes" - name: List all changed files env: From b9de52df26c074cb50c08c8fe385f617052a32a9 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:23:14 +0000 Subject: [PATCH 016/147] workflow changes --- .github/workflows/temp_ci_test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 258fae40..b28931be 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -21,6 +21,10 @@ jobs: with: fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + - name: sanity check + id: changed-files + uses: tj-actions/changed-files@v42 + - name: Find changed files inside action folder id: changed-files-action uses: tj-actions/changed-files@v42 From 152f7cea45e81d20c244f47f5c21b947922a26ad Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:25:40 +0000 Subject: [PATCH 017/147] checkign --- src/action/test.txt | 1 + src/interfacing/test2.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/action/test.txt b/src/action/test.txt index e69de29b..56a6051c 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index e69de29b..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -0,0 +1 @@ +1 \ No newline at end of file From 904b49148c0ad8f480d42eb7afb2499b398ac036 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:27:46 +0000 Subject: [PATCH 018/147] im going insane --- .github/workflows/temp_ci_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index b28931be..1805f392 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -32,7 +32,7 @@ jobs: files: src/action/** - name: Update CHANGED_MODULES for action - if: steps.changed-files-specific.outputs.any_changed == 'true' + if: steps.changed-files-action.outputs.any_changed == 'true' env: CHANGED_MODULES: action run: @@ -45,7 +45,7 @@ jobs: files: src/interfacing/** - name: Update CHANGED_MODULES for action - if: steps.changed-files-specific.outputs.any_changed == 'true' + if: steps.changed-files-interfacing.outputs.any_changed == 'true' env: CHANGED_MODULES: "$CHANGED_MODULES interfacing" run: From d2b285031f8d876293babbe2d26a1bdaae643447 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 00:28:42 +0000 Subject: [PATCH 019/147] im going insane --- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/action/test.txt b/src/action/test.txt index 56a6051c..d8263ee9 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -1 \ No newline at end of file +2 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index 56a6051c..d8263ee9 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -1 \ No newline at end of file +2 \ No newline at end of file From b67d2d6bf6b262b3114e26d1f0772b18ca75a397 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 17:23:48 +0000 Subject: [PATCH 020/147] ggs --- .github/workflows/temp_ci_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 1805f392..c7825129 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -35,8 +35,9 @@ jobs: if: steps.changed-files-action.outputs.any_changed == 'true' env: CHANGED_MODULES: action - run: + run: | echo "Detected action changes" + echo "CHANGED_MODULES: $CHANGED_MODULES" - name: Get changed files inside interfacing folder id: changed-files-interfacing @@ -48,8 +49,9 @@ jobs: if: steps.changed-files-interfacing.outputs.any_changed == 'true' env: CHANGED_MODULES: "$CHANGED_MODULES interfacing" - run: + run: | echo "Detected interfacing changes" + echo "CHANGED_MODULES: $CHANGED_MODULES" - name: List all changed files env: From 870af8df192a72d82c492a54c90bb1d352d01b93 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 17:28:32 +0000 Subject: [PATCH 021/147] added branches main to see if tj-actions can read main --- .github/workflows/temp_ci_test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index c7825129..0797561a 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -5,6 +5,7 @@ on: push: branches: - 'ci-specific-modules' + - 'main' jobs: changed_files: @@ -24,6 +25,8 @@ jobs: - name: sanity check id: changed-files uses: tj-actions/changed-files@v42 + with: + since_last_remote_commit: false - name: Find changed files inside action folder id: changed-files-action From 49631e7c81d49019935158cd83b2b7a99938c4d7 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 17:30:50 +0000 Subject: [PATCH 022/147] changed txt --- .github/workflows/temp_ci_test.yml | 1 - src/action/test.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 0797561a..3873ce41 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -5,7 +5,6 @@ on: push: branches: - 'ci-specific-modules' - - 'main' jobs: changed_files: diff --git a/src/action/test.txt b/src/action/test.txt index d8263ee9..56a6051c 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -2 \ No newline at end of file +1 \ No newline at end of file From 50f2bd20cde43a957153c0b46882cdbe918fc367 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 17:34:35 +0000 Subject: [PATCH 023/147] changed txt --- .github/workflows/temp_ci_test.yml | 6 +++--- src/action/test.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 3873ce41..d44707b2 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -39,7 +39,7 @@ jobs: CHANGED_MODULES: action run: | echo "Detected action changes" - echo "CHANGED_MODULES: $CHANGED_MODULES" + echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" - name: Get changed files inside interfacing folder id: changed-files-interfacing @@ -53,7 +53,7 @@ jobs: CHANGED_MODULES: "$CHANGED_MODULES interfacing" run: | echo "Detected interfacing changes" - echo "CHANGED_MODULES: $CHANGED_MODULES" + echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" - name: List all changed files env: @@ -63,7 +63,7 @@ jobs: echo "$file was changed!" done echo ======================= - echo "CHANGED_MODULES: $CHANGED_MODULES" + echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" # setup-environment: # name: Setup environment diff --git a/src/action/test.txt b/src/action/test.txt index 56a6051c..e440e5c8 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -1 \ No newline at end of file +3 \ No newline at end of file From 6378a5205dcb5aa4802c7ac65d71ec5fad7c509c Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 17:39:20 +0000 Subject: [PATCH 024/147] changed txt --- .github/workflows/temp_ci_test.yml | 4 ++-- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index d44707b2..df1e6cf4 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -39,7 +39,7 @@ jobs: CHANGED_MODULES: action run: | echo "Detected action changes" - echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" + echo "CHANGED_MODULES: $CHANGED_MODULES" - name: Get changed files inside interfacing folder id: changed-files-interfacing @@ -53,7 +53,7 @@ jobs: CHANGED_MODULES: "$CHANGED_MODULES interfacing" run: | echo "Detected interfacing changes" - echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" + echo "CHANGED_MODULES: $CHANGED_MODULES" - name: List all changed files env: diff --git a/src/action/test.txt b/src/action/test.txt index e440e5c8..bf0d87ab 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -3 \ No newline at end of file +4 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index d8263ee9..e440e5c8 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -2 \ No newline at end of file +3 \ No newline at end of file From 4fe43d9433f1aac4baa50239d4a9372ec54b82be Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 17:41:50 +0000 Subject: [PATCH 025/147] changed txt --- .github/workflows/temp_ci_test.yml | 4 ++-- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index df1e6cf4..0aa77260 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -50,7 +50,7 @@ jobs: - name: Update CHANGED_MODULES for action if: steps.changed-files-interfacing.outputs.any_changed == 'true' env: - CHANGED_MODULES: "$CHANGED_MODULES interfacing" + CHANGED_MODULES: "${{ env.CHANGED_MODULES }} interfacing" run: | echo "Detected interfacing changes" echo "CHANGED_MODULES: $CHANGED_MODULES" @@ -63,7 +63,7 @@ jobs: echo "$file was changed!" done echo ======================= - echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" + echo "CHANGED_MODULES: $CHANGED_MODULES" # setup-environment: # name: Setup environment diff --git a/src/action/test.txt b/src/action/test.txt index bf0d87ab..7813681f 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -4 \ No newline at end of file +5 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index e440e5c8..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -3 \ No newline at end of file +1 \ No newline at end of file From b44f89ea2007ad279dd7cbb49b71555fc029c0aa Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 17:44:53 +0000 Subject: [PATCH 026/147] changed txt --- .github/workflows/temp_ci_test.yml | 4 ++-- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 0aa77260..6cb0b3ae 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -36,7 +36,7 @@ jobs: - name: Update CHANGED_MODULES for action if: steps.changed-files-action.outputs.any_changed == 'true' env: - CHANGED_MODULES: action + CHANGED_MODULES: "${{ env.CHANGED_MODULES }} action" run: | echo "Detected action changes" echo "CHANGED_MODULES: $CHANGED_MODULES" @@ -47,7 +47,7 @@ jobs: with: files: src/interfacing/** - - name: Update CHANGED_MODULES for action + - name: Update CHANGED_MODULES for interfacing if: steps.changed-files-interfacing.outputs.any_changed == 'true' env: CHANGED_MODULES: "${{ env.CHANGED_MODULES }} interfacing" diff --git a/src/action/test.txt b/src/action/test.txt index 7813681f..d8263ee9 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -5 \ No newline at end of file +2 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index 56a6051c..e440e5c8 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -1 \ No newline at end of file +3 \ No newline at end of file From 58416b9444120148251ff6646d59dbbcbc16eb9a Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 17:54:41 +0000 Subject: [PATCH 027/147] changed txt --- .github/workflows/temp_ci_test.yml | 18 +++++++----------- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 6cb0b3ae..ba2e5685 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -33,27 +33,23 @@ jobs: with: files: src/action/** - - name: Update CHANGED_MODULES for action - if: steps.changed-files-action.outputs.any_changed == 'true' - env: - CHANGED_MODULES: "${{ env.CHANGED_MODULES }} action" - run: | - echo "Detected action changes" - echo "CHANGED_MODULES: $CHANGED_MODULES" - - name: Get changed files inside interfacing folder id: changed-files-interfacing uses: tj-actions/changed-files@v42 with: files: src/interfacing/** + - name: Update CHANGED_MODULES for action + if: steps.changed-files-action.outputs.any_changed == 'true' + run: | + echo "Detected action changes" + echo "CHANGED_MODULES=$CHANGED_MODULES action" >> "$GITHUB_OUTPUT" + - name: Update CHANGED_MODULES for interfacing if: steps.changed-files-interfacing.outputs.any_changed == 'true' - env: - CHANGED_MODULES: "${{ env.CHANGED_MODULES }} interfacing" run: | echo "Detected interfacing changes" - echo "CHANGED_MODULES: $CHANGED_MODULES" + echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> "$GITHUB_OUTPUT" - name: List all changed files env: diff --git a/src/action/test.txt b/src/action/test.txt index d8263ee9..7813681f 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -2 \ No newline at end of file +5 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index e440e5c8..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -3 \ No newline at end of file +1 \ No newline at end of file From 8ac46c43fbdbcc1e51a6e62af47a02b646648747 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 18:02:24 +0000 Subject: [PATCH 028/147] changed txt --- .github/workflows/temp_ci_test.yml | 17 ++++++++++++++--- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index ba2e5685..d462dc6b 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -21,11 +21,22 @@ jobs: with: fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - - name: sanity check + - name: sanity check 1 id: changed-files uses: tj-actions/changed-files@v42 + env: + CHANGED_MODULES: ${{ env.CHANGED_MODULES }} 1 with: since_last_remote_commit: false + run: + echo $CHANGED_MODULES + + - name: sanity check 2 + id: changed-files2 + env: + CHANGED_MODULES: ${{ env.CHANGED_MODULES }} 2 + run: + echo $CHANGED_MODULES - name: Find changed files inside action folder id: changed-files-action @@ -41,15 +52,15 @@ jobs: - name: Update CHANGED_MODULES for action if: steps.changed-files-action.outputs.any_changed == 'true' + env: + run: | echo "Detected action changes" - echo "CHANGED_MODULES=$CHANGED_MODULES action" >> "$GITHUB_OUTPUT" - name: Update CHANGED_MODULES for interfacing if: steps.changed-files-interfacing.outputs.any_changed == 'true' run: | echo "Detected interfacing changes" - echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> "$GITHUB_OUTPUT" - name: List all changed files env: diff --git a/src/action/test.txt b/src/action/test.txt index 7813681f..e440e5c8 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -5 \ No newline at end of file +3 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index 56a6051c..d8263ee9 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -1 \ No newline at end of file +2 \ No newline at end of file From f3a0727fa2c78401a90bef1fb9506ebdd45eb025 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 18:03:01 +0000 Subject: [PATCH 029/147] changed txt --- .github/workflows/temp_ci_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index d462dc6b..baa457b2 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -23,11 +23,11 @@ jobs: - name: sanity check 1 id: changed-files - uses: tj-actions/changed-files@v42 + # uses: tj-actions/changed-files@v42 env: CHANGED_MODULES: ${{ env.CHANGED_MODULES }} 1 - with: - since_last_remote_commit: false + # with: + # since_last_remote_commit: false run: echo $CHANGED_MODULES From 266310435ea13fd6d3d3ac59f50b1905be3b5b3f Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 18:03:23 +0000 Subject: [PATCH 030/147] changed txt --- .github/workflows/temp_ci_test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index baa457b2..77bf50e0 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -52,8 +52,6 @@ jobs: - name: Update CHANGED_MODULES for action if: steps.changed-files-action.outputs.any_changed == 'true' - env: - run: | echo "Detected action changes" From e0c8bd69b06087e5ec7f0b27f93d12562cf9e25c Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 18:08:48 +0000 Subject: [PATCH 031/147] modifying variables between steps --- .github/workflows/temp_ci_test.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 77bf50e0..6ffd8c95 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -23,20 +23,20 @@ jobs: - name: sanity check 1 id: changed-files - # uses: tj-actions/changed-files@v42 - env: - CHANGED_MODULES: ${{ env.CHANGED_MODULES }} 1 - # with: - # since_last_remote_commit: false - run: - echo $CHANGED_MODULES + run: echo "MY_VARIABLE=sus" >> $GITHUB_ENV - name: sanity check 2 id: changed-files2 - env: - CHANGED_MODULES: ${{ env.CHANGED_MODULES }} 2 + needs: changed-files + run: | + echo $MY_VARIABLE + echo "MY_VARIABLE=$MY_VARIABLE SUS" >> $GITHUB_ENV + + - name: sanity check 3 + id: changed-files3 + needs: changed-files2 run: - echo $CHANGED_MODULES + echo $MY_VARIABLE - name: Find changed files inside action folder id: changed-files-action From 31b783c32743b2cd900003a86df95b6c88708054 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 18:09:35 +0000 Subject: [PATCH 032/147] modifying variables between steps --- .github/workflows/temp_ci_test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 6ffd8c95..80ffa0a8 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -27,14 +27,12 @@ jobs: - name: sanity check 2 id: changed-files2 - needs: changed-files run: | echo $MY_VARIABLE echo "MY_VARIABLE=$MY_VARIABLE SUS" >> $GITHUB_ENV - name: sanity check 3 id: changed-files3 - needs: changed-files2 run: echo $MY_VARIABLE From 6ae470f4ccdd33818d0f373a90dc757e8c3aa650 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 18:12:39 +0000 Subject: [PATCH 033/147] modifying variables between steps --- .github/workflows/temp_ci_test.yml | 28 ++++++++++++++-------------- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 80ffa0a8..b6a4e415 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -14,27 +14,25 @@ jobs: # ------------------------------------------------------------------------ runs-on: ubuntu-latest # windows-latest || macos-latest name: Test changed-files - env: - CHANGED_MODULES: "" steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - - name: sanity check 1 - id: changed-files - run: echo "MY_VARIABLE=sus" >> $GITHUB_ENV + # - name: sanity check 1 + # id: changed-files + # run: echo "MY_VARIABLE=sus" >> $GITHUB_ENV - - name: sanity check 2 - id: changed-files2 - run: | - echo $MY_VARIABLE - echo "MY_VARIABLE=$MY_VARIABLE SUS" >> $GITHUB_ENV + # - name: sanity check 2 + # id: changed-files2 + # run: | + # echo $MY_VARIABLE + # echo "MY_VARIABLE=$MY_VARIABLE SUS" >> $GITHUB_ENV - - name: sanity check 3 - id: changed-files3 - run: - echo $MY_VARIABLE + # - name: sanity check 3 + # id: changed-files3 + # run: + # echo $MY_VARIABLE - name: Find changed files inside action folder id: changed-files-action @@ -52,11 +50,13 @@ jobs: if: steps.changed-files-action.outputs.any_changed == 'true' run: | echo "Detected action changes" + echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - name: Update CHANGED_MODULES for interfacing if: steps.changed-files-interfacing.outputs.any_changed == 'true' run: | echo "Detected interfacing changes" + echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV - name: List all changed files env: diff --git a/src/action/test.txt b/src/action/test.txt index e440e5c8..bf0d87ab 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -3 \ No newline at end of file +4 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index d8263ee9..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -2 \ No newline at end of file +1 \ No newline at end of file From b900bf155e5a21244809be45c63fe8fc6fa168d5 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 18:58:28 +0000 Subject: [PATCH 034/147] Added rest of modules to check --- .github/workflows/temp_ci_test.yml | 87 ++++++++++++++++-------------- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 3 files changed, 49 insertions(+), 42 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index b6a4e415..28103c7e 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -19,21 +19,6 @@ jobs: with: fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - # - name: sanity check 1 - # id: changed-files - # run: echo "MY_VARIABLE=sus" >> $GITHUB_ENV - - # - name: sanity check 2 - # id: changed-files2 - # run: | - # echo $MY_VARIABLE - # echo "MY_VARIABLE=$MY_VARIABLE SUS" >> $GITHUB_ENV - - # - name: sanity check 3 - # id: changed-files3 - # run: - # echo $MY_VARIABLE - - name: Find changed files inside action folder id: changed-files-action uses: tj-actions/changed-files@v42 @@ -45,6 +30,30 @@ jobs: uses: tj-actions/changed-files@v42 with: files: src/interfacing/** + + - name: Get changed files inside perception folder + id: changed-files-perception + uses: tj-actions/changed-files@v42 + with: + files: src/perception/** + + - name: Get changed files inside samples folder + id: changed-files-samples + uses: tj-actions/changed-files@v42 + with: + files: src/samples/** + + - name: Get changed files inside simulation folder + id: changed-files-simulation + uses: tj-actions/changed-files@v42 + with: + files: src/simulation/** + + - name: Get changed files inside world_modeling folder + id: changed-files-world_modeling + uses: tj-actions/changed-files@v42 + with: + files: src/world_modeling/** - name: Update CHANGED_MODULES for action if: steps.changed-files-action.outputs.any_changed == 'true' @@ -58,32 +67,30 @@ jobs: echo "Detected interfacing changes" echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV - - name: List all changed files - env: - ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + - name: Update CHANGED_MODULES for perception + if: steps.changed-files-perception.outputs.any_changed == 'true' run: | - for file in ${ALL_CHANGED_FILES}; do - echo "$file was changed!" - done - echo ======================= - echo "CHANGED_MODULES: $CHANGED_MODULES" - - # setup-environment: - # name: Setup environment - # runs-on: ubuntu-latest - - # outputs: - # registry: ${{ steps.docker-environment.outputs.registry }} - # repository: ${{ steps.docker-environment.outputs.repository }} + echo "Detected perception changes" + echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for samples + if: steps.changed-files-samples.outputs.any_changed == 'true' + run: | + echo "Detected samples changes" + echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV - # steps: - # - name: Checkout Repository - # uses: actions/checkout@v3 + - name: Update CHANGED_MODULES for simulations + if: steps.changed-files-simulations.outputs.any_changed == 'true' + run: | + echo "Detected simulations changes" + echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV - # - name: Setup Watod Environment - # run: ./watod_scripts/watod-setup-env.sh - # shell: bash + - name: Update CHANGED_MODULES for world_modeling + if: steps.changed-files-world_modeling.outputs.any_changed == 'true' + run: | + echo "Detected world_modeling changes" + echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV - # - name: Generate Docker Environment - # id: docker-environment - # uses: "./.github/templates/docker_context" \ No newline at end of file + - name: List all changed files + run: | + echo "CHANGED_MODULES: $CHANGED_MODULES" \ No newline at end of file diff --git a/src/action/test.txt b/src/action/test.txt index bf0d87ab..e440e5c8 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -4 \ No newline at end of file +3 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index 56a6051c..e440e5c8 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -1 \ No newline at end of file +3 \ No newline at end of file From 4b4a777913b16a31c3087d3976e2a14a5cb53001 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 19:02:10 +0000 Subject: [PATCH 035/147] sus --- src/world_modeling/test3.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/world_modeling/test3.txt diff --git a/src/world_modeling/test3.txt b/src/world_modeling/test3.txt new file mode 100644 index 00000000..bf0d87ab --- /dev/null +++ b/src/world_modeling/test3.txt @@ -0,0 +1 @@ +4 \ No newline at end of file From 7a7cb7c3df4405f0d14c97634f8aab0259cb7900 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:27:20 +0000 Subject: [PATCH 036/147] Added module logic to docker_context.sh --- .github/templates/docker_context/action.yml | 6 ++ .../docker_context/docker_context.sh | 17 +++- .github/workflows/build_and_unitest.yml | 91 +++++++++++++++++++ .github/workflows/temp_ci_test.yml | 46 ++++++++-- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- src/world_modeling/test3.txt | 2 +- 7 files changed, 150 insertions(+), 16 deletions(-) diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index 0395e2bc..da48f300 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -1,5 +1,11 @@ name: Generate Docker Environment +inputs: + modified-modules: + description: 'Space deliminated list of modified modules' + required: true + default: '' + outputs: docker_matrix: description: "list of docker compose services" diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 53fdefc7..aef164e0 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -7,18 +7,25 @@ set -e # Find docker compose files in 'modules' directory modules=$(find modules -maxdepth 1 -name "docker-compose*") -echo $modules -echo ================================ # Initialize an empty array for JSON objects json_objects=() # Loop through each module while read -r module; do + # Retrieve docker compose service names services=$(docker-compose -f "$module" config --services) module_out=$(echo "$module" | sed -n 's/modules\/docker-compose\.\(.*\)\.yaml/\1/p') + # Only work with modules that are modified + if [[ $1 = *$module_out* ]]; then + echo "$module_out modified" + else + echo "$module_out not changed" + continue + fi + # Loop through each service while read -r service_out; do # Construct JSON object for each service with module and service name @@ -31,7 +38,7 @@ done <<< "$modules" # Convert the array of JSON objects to a single JSON array json_services=$(jq -nc '[( $ARGS.positional[] | fromjson )]' --args -- ${json_objects[*]}) -echo "docker_matrix=$(echo $json_services | jq -c '{include: .}')" #>> #$GITHUB_OUTPUT +echo "docker_matrix=$(echo $json_services | jq -c '{include: .}')" >> #$GITHUB_OUTPUT ################# Setup Docker Registry and Repository Name ################# # Docker Registry to pull/push images @@ -40,5 +47,5 @@ REGISTRY_URL="ghcr.io/watonomous/wato_monorepo" REGISTRY=$(echo "$REGISTRY_URL" | sed 's|^\(.*\)/.*$|\1|') REPOSITORY=$(echo "$REGISTRY_URL" | sed 's|^.*/\(.*\)$|\1|') -echo "registry=$REGISTRY" #>> $GITHUB_OUTPUT -echo "repository=$REPOSITORY" #>> $GITHUB_OUTPUT +echo "registry=$REGISTRY" >> $GITHUB_OUTPUT +echo "repository=$REPOSITORY" >> $GITHUB_OUTPUT diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 8e741f65..0c3d72c1 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -9,9 +9,98 @@ on: - main jobs: + # ------------------------------------------------------------------------ + # Event `pull_request`: Compare the last commit of the main branch or last + # remote commit of the PR branch -> to the current commit of a PR branch. + # ------------------------------------------------------------------------ + get_modified_modules: + runs-on: ubuntu-latest + name: Get changed files + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + + - name: Find changed files inside action folder + id: changed-files-action + uses: tj-actions/changed-files@v42 + with: + files: src/action/** + + - name: Get changed files inside interfacing folder + id: changed-files-interfacing + uses: tj-actions/changed-files@v42 + with: + files: src/interfacing/** + + - name: Get changed files inside perception folder + id: changed-files-perception + uses: tj-actions/changed-files@v42 + with: + files: src/perception/** + + - name: Get changed files inside samples folder + id: changed-files-samples + uses: tj-actions/changed-files@v42 + with: + files: src/samples/** + + - name: Get changed files inside simulation folder + id: changed-files-simulation + uses: tj-actions/changed-files@v42 + with: + files: src/simulation/** + + - name: Get changed files inside world_modeling folder + id: changed-files-world_modeling + uses: tj-actions/changed-files@v42 + with: + files: src/world_modeling/** + + - name: Update CHANGED_MODULES for action + if: steps.changed-files-action.outputs.any_changed == 'true' + run: | + echo "Detected action changes" + echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for interfacing + if: steps.changed-files-interfacing.outputs.any_changed == 'true' + run: | + echo "Detected interfacing changes" + echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for perception + if: steps.changed-files-perception.outputs.any_changed == 'true' + run: | + echo "Detected perception changes" + echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for samples + if: steps.changed-files-samples.outputs.any_changed == 'true' + run: | + echo "Detected samples changes" + echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for simulations + if: steps.changed-files-simulations.outputs.any_changed == 'true' + run: | + echo "Detected simulations changes" + echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for world_modeling + if: steps.changed-files-world_modeling.outputs.any_changed == 'true' + run: | + echo "Detected world_modeling changes" + echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV + + - name: List all changed files + run: | + echo "CHANGED_MODULES: $CHANGED_MODULES" + setup-environment: name: Setup environment runs-on: ubuntu-latest + needs: get_modified_modules outputs: docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} @@ -31,6 +120,8 @@ jobs: - name: Generate Docker Environment id: docker-environment uses: "./.github/templates/docker_context" + with: + modified-modules: {{env.CHANGED_MODULES}} - name: Generate GitHub Environment id: github-environment diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 28103c7e..4defbc9d 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -7,13 +7,13 @@ on: - 'ci-specific-modules' jobs: - changed_files: - # ------------------------------------------------------------------------ - # Event `pull_request`: Compare the last commit of the main branch or last - # remote commit of the PR branch -> to the current commit of a PR branch. - # ------------------------------------------------------------------------ - runs-on: ubuntu-latest # windows-latest || macos-latest - name: Test changed-files + # ------------------------------------------------------------------------ + # Event `pull_request`: Compare the last commit of the main branch or last + # remote commit of the PR branch -> to the current commit of a PR branch. + # ------------------------------------------------------------------------ + get_modified_modules: + runs-on: ubuntu-latest + name: Get changed files steps: - uses: actions/checkout@v4 with: @@ -93,4 +93,34 @@ jobs: - name: List all changed files run: | - echo "CHANGED_MODULES: $CHANGED_MODULES" \ No newline at end of file + echo "CHANGED_MODULES: $CHANGED_MODULES" + +setup-environment: + name: Setup environment + runs-on: ubuntu-latest + needs: get_modified_modules + + outputs: + docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} + registry: ${{ steps.docker-environment.outputs.registry }} + repository: ${{ steps.docker-environment.outputs.repository }} + source_branch: ${{ steps.github-environment.outputs.source_branch }} + target_branch: ${{ steps.github-environment.outputs.target_branch }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Watod Environment + run: ./watod_scripts/watod-setup-env.sh + shell: bash + + - name: Generate Docker Environment + id: docker-environment + uses: "./.github/templates/docker_context" + with: + modified-modules: {{env.CHANGED_MODULES}} + + - name: Generate GitHub Environment + id: github-environment + uses: "./.github/templates/github_context" \ No newline at end of file diff --git a/src/action/test.txt b/src/action/test.txt index e440e5c8..bf0d87ab 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -3 \ No newline at end of file +4 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index e440e5c8..d8263ee9 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -3 \ No newline at end of file +2 \ No newline at end of file diff --git a/src/world_modeling/test3.txt b/src/world_modeling/test3.txt index bf0d87ab..56a6051c 100644 --- a/src/world_modeling/test3.txt +++ b/src/world_modeling/test3.txt @@ -1 +1 @@ -4 \ No newline at end of file +1 \ No newline at end of file From e3c47b092d6cf2bb4f8799562b271ff7cbaad577 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:32:28 +0000 Subject: [PATCH 037/147] fixed typo --- .github/workflows/temp_ci_test.yml | 50 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 4defbc9d..b1fb9e4c 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -95,32 +95,32 @@ jobs: run: | echo "CHANGED_MODULES: $CHANGED_MODULES" -setup-environment: - name: Setup environment - runs-on: ubuntu-latest - needs: get_modified_modules + setup-environment: + name: Setup environment + runs-on: ubuntu-latest + needs: get_modified_modules - outputs: - docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} - registry: ${{ steps.docker-environment.outputs.registry }} - repository: ${{ steps.docker-environment.outputs.repository }} - source_branch: ${{ steps.github-environment.outputs.source_branch }} - target_branch: ${{ steps.github-environment.outputs.target_branch }} + outputs: + docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} + registry: ${{ steps.docker-environment.outputs.registry }} + repository: ${{ steps.docker-environment.outputs.repository }} + source_branch: ${{ steps.github-environment.outputs.source_branch }} + target_branch: ${{ steps.github-environment.outputs.target_branch }} - steps: - - name: Checkout Repository - uses: actions/checkout@v3 + steps: + - name: Checkout Repository + uses: actions/checkout@v3 - - name: Setup Watod Environment - run: ./watod_scripts/watod-setup-env.sh - shell: bash + - name: Setup Watod Environment + run: ./watod_scripts/watod-setup-env.sh + shell: bash - - name: Generate Docker Environment - id: docker-environment - uses: "./.github/templates/docker_context" - with: - modified-modules: {{env.CHANGED_MODULES}} - - - name: Generate GitHub Environment - id: github-environment - uses: "./.github/templates/github_context" \ No newline at end of file + - name: Generate Docker Environment + id: docker-environment + uses: "./.github/templates/docker_context" + with: + modified-modules: {{env.CHANGED_MODULES}} + + - name: Generate GitHub Environment + id: github-environment + uses: "./.github/templates/github_context" \ No newline at end of file From cc6daa27fc6fdee482ce8cd5b33e0f9f91e35525 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:33:23 +0000 Subject: [PATCH 038/147] fixed typo --- .github/workflows/temp_ci_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index b1fb9e4c..4effbe99 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -119,7 +119,7 @@ jobs: id: docker-environment uses: "./.github/templates/docker_context" with: - modified-modules: {{env.CHANGED_MODULES}} + modified-modules: ${{env.CHANGED_MODULES}} - name: Generate GitHub Environment id: github-environment From dfe1255c831c0599883a7a702164132f8d879691 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:38:20 +0000 Subject: [PATCH 039/147] test ci --- .github/templates/docker_context/docker_context.sh | 2 ++ src/action/test.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index aef164e0..295eb3bb 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -7,6 +7,7 @@ set -e # Find docker compose files in 'modules' directory modules=$(find modules -maxdepth 1 -name "docker-compose*") +modules_modified=false # Initialize an empty array for JSON objects json_objects=() @@ -21,6 +22,7 @@ while read -r module; do # Only work with modules that are modified if [[ $1 = *$module_out* ]]; then echo "$module_out modified" + modules_modified=true else echo "$module_out not changed" continue diff --git a/src/action/test.txt b/src/action/test.txt index bf0d87ab..7813681f 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -4 \ No newline at end of file +5 \ No newline at end of file From 74d950ecf48faf29ce9b4d01debbcf665df3a0df Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:40:15 +0000 Subject: [PATCH 040/147] test ci --- .github/templates/docker_context/docker_context.sh | 2 ++ src/interfacing/test2.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 295eb3bb..bdb278a8 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -12,6 +12,8 @@ modules_modified=false # Initialize an empty array for JSON objects json_objects=() +echo "input is $1" + # Loop through each module while read -r module; do diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index d8263ee9..bf0d87ab 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -2 \ No newline at end of file +4 \ No newline at end of file From 7234eb016407ce70743b9a35a3033291c4416a8d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:47:07 +0000 Subject: [PATCH 041/147] test ci --- .github/workflows/build_and_unitest.yml | 89 ------------------------- .github/workflows/temp_ci_test.yml | 12 +++- 2 files changed, 9 insertions(+), 92 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 0c3d72c1..f2500846 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -9,98 +9,9 @@ on: - main jobs: - # ------------------------------------------------------------------------ - # Event `pull_request`: Compare the last commit of the main branch or last - # remote commit of the PR branch -> to the current commit of a PR branch. - # ------------------------------------------------------------------------ - get_modified_modules: - runs-on: ubuntu-latest - name: Get changed files - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - - - name: Find changed files inside action folder - id: changed-files-action - uses: tj-actions/changed-files@v42 - with: - files: src/action/** - - - name: Get changed files inside interfacing folder - id: changed-files-interfacing - uses: tj-actions/changed-files@v42 - with: - files: src/interfacing/** - - - name: Get changed files inside perception folder - id: changed-files-perception - uses: tj-actions/changed-files@v42 - with: - files: src/perception/** - - - name: Get changed files inside samples folder - id: changed-files-samples - uses: tj-actions/changed-files@v42 - with: - files: src/samples/** - - - name: Get changed files inside simulation folder - id: changed-files-simulation - uses: tj-actions/changed-files@v42 - with: - files: src/simulation/** - - - name: Get changed files inside world_modeling folder - id: changed-files-world_modeling - uses: tj-actions/changed-files@v42 - with: - files: src/world_modeling/** - - - name: Update CHANGED_MODULES for action - if: steps.changed-files-action.outputs.any_changed == 'true' - run: | - echo "Detected action changes" - echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for interfacing - if: steps.changed-files-interfacing.outputs.any_changed == 'true' - run: | - echo "Detected interfacing changes" - echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for perception - if: steps.changed-files-perception.outputs.any_changed == 'true' - run: | - echo "Detected perception changes" - echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for samples - if: steps.changed-files-samples.outputs.any_changed == 'true' - run: | - echo "Detected samples changes" - echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for simulations - if: steps.changed-files-simulations.outputs.any_changed == 'true' - run: | - echo "Detected simulations changes" - echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for world_modeling - if: steps.changed-files-world_modeling.outputs.any_changed == 'true' - run: | - echo "Detected world_modeling changes" - echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV - - - name: List all changed files - run: | - echo "CHANGED_MODULES: $CHANGED_MODULES" - setup-environment: name: Setup environment runs-on: ubuntu-latest - needs: get_modified_modules outputs: docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 4effbe99..10fd5e0b 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -11,9 +11,12 @@ jobs: # Event `pull_request`: Compare the last commit of the main branch or last # remote commit of the PR branch -> to the current commit of a PR branch. # ------------------------------------------------------------------------ - get_modified_modules: + get_changed_modules: runs-on: ubuntu-latest name: Get changed files + + outputs: ${{ CHANGED_MODULES }} + steps: - uses: actions/checkout@v4 with: @@ -98,7 +101,10 @@ jobs: setup-environment: name: Setup environment runs-on: ubuntu-latest - needs: get_modified_modules + needs: get_changed_modules + + env: + MODIFIED_MODULES: ${{ needs.get_changed_modules.outputs.CHANGED_MODULES }} outputs: docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} @@ -119,7 +125,7 @@ jobs: id: docker-environment uses: "./.github/templates/docker_context" with: - modified-modules: ${{env.CHANGED_MODULES}} + modified-modules: ${{env.MODIFIED_MODULES}} - name: Generate GitHub Environment id: github-environment From 405060637048f7b706959deae68d3960befc996f Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:47:29 +0000 Subject: [PATCH 042/147] changed txt --- src/interfacing/test2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index bf0d87ab..7813681f 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -4 \ No newline at end of file +5 \ No newline at end of file From c7a72dbf653a04648036fd79de35c4bc0e4cf47f Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:48:42 +0000 Subject: [PATCH 043/147] test ci --- .github/workflows/temp_ci_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 10fd5e0b..333dd72a 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest name: Get changed files - outputs: ${{ CHANGED_MODULES }} + outputs: ${{ env.CHANGD_MODULES }} steps: - uses: actions/checkout@v4 From 0faed3ca6c9f09e931bb17239be0ec6e3f160358 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:52:19 +0000 Subject: [PATCH 044/147] test ci --- .github/workflows/build_and_unitest.yml | 2 +- .github/workflows/temp_ci_test.yml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index f2500846..59fef501 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -32,7 +32,7 @@ jobs: id: docker-environment uses: "./.github/templates/docker_context" with: - modified-modules: {{env.CHANGED_MODULES}} + modified-modules: ${{env.CHANGED_MODULES}} - name: Generate GitHub Environment id: github-environment diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 333dd72a..508d7cd3 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest name: Get changed files - outputs: ${{ env.CHANGD_MODULES }} + outputs: ${{ steps.report_changes.outputs.modified_modules }} steps: - uses: actions/checkout@v4 @@ -95,6 +95,9 @@ jobs: echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV - name: List all changed files + id: report-changes + env: + modified_modules: ${{ env.CHANGED_MODULES }} run: | echo "CHANGED_MODULES: $CHANGED_MODULES" @@ -104,7 +107,7 @@ jobs: needs: get_changed_modules env: - MODIFIED_MODULES: ${{ needs.get_changed_modules.outputs.CHANGED_MODULES }} + modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} outputs: docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} @@ -125,7 +128,7 @@ jobs: id: docker-environment uses: "./.github/templates/docker_context" with: - modified-modules: ${{env.MODIFIED_MODULES}} + modified-modules: ${{ env.modified_modules }} - name: Generate GitHub Environment id: github-environment From 390ab99be123ac70aabc2bc921f0730899354b9d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:53:17 +0000 Subject: [PATCH 045/147] test ci --- .github/workflows/temp_ci_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 508d7cd3..2db54826 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -15,7 +15,8 @@ jobs: runs-on: ubuntu-latest name: Get changed files - outputs: ${{ steps.report_changes.outputs.modified_modules }} + outputs: + modified_modules: ${{ steps.report_changes.outputs.modified_modules }} steps: - uses: actions/checkout@v4 From ecb51e5132108f0488532f3c9cc85dca004e4b17 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:55:44 +0000 Subject: [PATCH 046/147] test ci --- .github/templates/docker_context/action.yml | 4 ++-- src/interfacing/test2.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index da48f300..528b3592 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -1,7 +1,7 @@ name: Generate Docker Environment inputs: - modified-modules: + modified_modules: description: 'Space deliminated list of modified modules' required: true default: '' @@ -21,5 +21,5 @@ runs: using: "composite" steps: - id: environment-generator - run: ${{ github.action_path }}/docker_context.sh + run: ${{ github.action_path }}/docker_context.sh ${{modified_modules}} shell: bash diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index 7813681f..e440e5c8 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -5 \ No newline at end of file +3 \ No newline at end of file From 459e979bd24b97ec357660fa21bf2266951ca9f8 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:00:15 +0000 Subject: [PATCH 047/147] test ci --- .github/templates/docker_context/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index 528b3592..f5ec33fc 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -21,5 +21,5 @@ runs: using: "composite" steps: - id: environment-generator - run: ${{ github.action_path }}/docker_context.sh ${{modified_modules}} + run: ${{ github.action_path }}/docker_context.sh ${{input.modified_modules}} shell: bash From 0fae80ffb3504bb63f321cf207fd4cdda2f0cb66 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:01:37 +0000 Subject: [PATCH 048/147] test ci --- .github/templates/docker_context/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index f5ec33fc..51b1b00b 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -21,5 +21,5 @@ runs: using: "composite" steps: - id: environment-generator - run: ${{ github.action_path }}/docker_context.sh ${{input.modified_modules}} + run: ${{ github.action_path }}/docker_context.sh ${{inputs.modified_modules}} shell: bash From 5c09f584c89a2f430ddac84a6d1bf5f9e3fb1bbe Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:05:43 +0000 Subject: [PATCH 049/147] test ci --- .github/workflows/temp_ci_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 2db54826..020ca767 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -54,7 +54,7 @@ jobs: files: src/simulation/** - name: Get changed files inside world_modeling folder - id: changed-files-world_modeling + id: changed-files-world-modeling uses: tj-actions/changed-files@v42 with: files: src/world_modeling/** @@ -90,7 +90,7 @@ jobs: echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV - name: Update CHANGED_MODULES for world_modeling - if: steps.changed-files-world_modeling.outputs.any_changed == 'true' + if: steps.changed-files-world-modeling.outputs.any_changed == 'true' run: | echo "Detected world_modeling changes" echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV @@ -129,7 +129,7 @@ jobs: id: docker-environment uses: "./.github/templates/docker_context" with: - modified-modules: ${{ env.modified_modules }} + modified_modules: ${{ env.modified_modules }} - name: Generate GitHub Environment id: github-environment From 3d968e618a91bd22f4efb0179f29bb3e388d3f6b Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:05:51 +0000 Subject: [PATCH 050/147] test ci --- src/action/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/action/test.txt b/src/action/test.txt index 7813681f..e440e5c8 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -5 \ No newline at end of file +3 \ No newline at end of file From 8e162c20bea282742d1d6663b2065be196c56bc7 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:08:44 +0000 Subject: [PATCH 051/147] test ci --- .github/workflows/temp_ci_test.yml | 3 +++ src/interfacing/test2.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 020ca767..7df2ae7c 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -125,6 +125,9 @@ jobs: run: ./watod_scripts/watod-setup-env.sh shell: bash + - name: Check module changes + run: echo "changed is ${{ env.modified_modules }}" + - name: Generate Docker Environment id: docker-environment uses: "./.github/templates/docker_context" diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index e440e5c8..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -3 \ No newline at end of file +1 \ No newline at end of file From 2de32fcf6486b2ba7044c4090b3c8ebd478bacc7 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:13:59 +0000 Subject: [PATCH 052/147] insanity? --- .github/workflows/temp_ci_test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 7df2ae7c..1dedba3a 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -16,7 +16,8 @@ jobs: name: Get changed files outputs: - modified_modules: ${{ steps.report_changes.outputs.modified_modules }} + modified_modules: + value: ${{ steps.report_changes.outputs.modified_modules }} steps: - uses: actions/checkout@v4 @@ -100,7 +101,10 @@ jobs: env: modified_modules: ${{ env.CHANGED_MODULES }} run: | - echo "CHANGED_MODULES: $CHANGED_MODULES" + echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" + + - name: Sanity check + run: echo ${{ steps.report_changes.outputs.modified_modules }} setup-environment: name: Setup environment From eae470d1b0a0cbec5c817b987b2829d2913f264a Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:14:07 +0000 Subject: [PATCH 053/147] insanity? --- src/action/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/action/test.txt b/src/action/test.txt index e440e5c8..d8263ee9 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -3 \ No newline at end of file +2 \ No newline at end of file From 4fd444cf04fc4babb2e4b813852b9714384aa63f Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:15:47 +0000 Subject: [PATCH 054/147] insanity? --- .github/workflows/temp_ci_test.yml | 1 + src/interfacing/test2.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 1dedba3a..0be365bf 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -17,6 +17,7 @@ jobs: outputs: modified_modules: + description: 'Space deliminated list of modified modules' value: ${{ steps.report_changes.outputs.modified_modules }} steps: diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index 56a6051c..e440e5c8 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -1 \ No newline at end of file +3 \ No newline at end of file From cf81f79baa3ecf3b2e14f50a48c86cf10cfe0b2e Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:16:39 +0000 Subject: [PATCH 055/147] insanity? --- .github/workflows/temp_ci_test.yml | 4 +--- src/action/test.txt | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 0be365bf..584e60c7 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -16,9 +16,7 @@ jobs: name: Get changed files outputs: - modified_modules: - description: 'Space deliminated list of modified modules' - value: ${{ steps.report_changes.outputs.modified_modules }} + modified_modules: ${{ steps.report_changes.outputs.modified_modules }} steps: - uses: actions/checkout@v4 diff --git a/src/action/test.txt b/src/action/test.txt index d8263ee9..bf0d87ab 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -2 \ No newline at end of file +4 \ No newline at end of file From e2ae061c540d33760f168ce45ee2e0bfa5c69738 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:27:39 +0000 Subject: [PATCH 056/147] insanity? --- .github/workflows/temp_ci_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 584e60c7..3a8269d5 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -103,7 +103,8 @@ jobs: echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" - name: Sanity check - run: echo ${{ steps.report_changes.outputs.modified_modules }} + run: | + echo 1 ${{ steps.report_changes.outputs.modified_modules }} setup-environment: name: Setup environment From 4ad430c5ea3138ca4d0ffd8134fb32a9966cf5b3 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:28:12 +0000 Subject: [PATCH 057/147] insanitys? --- src/interfacing/test2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index e440e5c8..f11c82a4 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -3 \ No newline at end of file +9 \ No newline at end of file From f048da3a2d047f496f3d1b1b3e221b20f87a68ae Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:49:13 +0000 Subject: [PATCH 058/147] fixed typo --- .github/workflows/temp_ci_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 3a8269d5..e608263e 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -16,7 +16,7 @@ jobs: name: Get changed files outputs: - modified_modules: ${{ steps.report_changes.outputs.modified_modules }} + modified_modules: ${{ steps.report-changes.outputs.modified_modules }} steps: - uses: actions/checkout@v4 @@ -104,7 +104,7 @@ jobs: - name: Sanity check run: | - echo 1 ${{ steps.report_changes.outputs.modified_modules }} + echo 1 ${{ steps.report-changes.outputs.modified_modules }} setup-environment: name: Setup environment From 764f3b05881686a4bb67411a661f4262c6b48d21 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 21:49:22 +0000 Subject: [PATCH 059/147] fixed typo --- src/action/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/action/test.txt b/src/action/test.txt index bf0d87ab..e440e5c8 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -4 \ No newline at end of file +3 \ No newline at end of file From ba1d2bdb2c693813c4cffdbbd9e2c56bfccffbd3 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 22:19:09 +0000 Subject: [PATCH 060/147] testing output variables --- .github/workflows/temp_ci_test.yml | 1 + src/action/test.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index e608263e..7064e737 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -105,6 +105,7 @@ jobs: - name: Sanity check run: | echo 1 ${{ steps.report-changes.outputs.modified_modules }} + echo 2 ${{ env.CHANGED_MODULES }} setup-environment: name: Setup environment diff --git a/src/action/test.txt b/src/action/test.txt index e440e5c8..56a6051c 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -3 \ No newline at end of file +1 \ No newline at end of file From 459db52a8143bb77458c2cf910397ead7876677d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 22:35:30 +0000 Subject: [PATCH 061/147] testing output variables --- .github/workflows/temp_ci_test.yml | 5 +++-- src/action/test.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 7064e737..01e32b03 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -16,7 +16,7 @@ jobs: name: Get changed files outputs: - modified_modules: ${{ steps.report-changes.outputs.modified_modules }} + modified_modules: ${{ steps.report-changes.outputs.CHANGED_MODULES }} steps: - uses: actions/checkout@v4 @@ -101,10 +101,11 @@ jobs: modified_modules: ${{ env.CHANGED_MODULES }} run: | echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" + echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV - name: Sanity check run: | - echo 1 ${{ steps.report-changes.outputs.modified_modules }} + echo 1 ${{ steps.report-changes.outputs.CHANGED_MODULES }} echo 2 ${{ env.CHANGED_MODULES }} setup-environment: diff --git a/src/action/test.txt b/src/action/test.txt index 56a6051c..e440e5c8 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -1 \ No newline at end of file +3 \ No newline at end of file From b801fd6bd34443cb8fc2055e48434656e0172b22 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 22:48:58 +0000 Subject: [PATCH 062/147] testing output variables --- .../docker_context/docker_context.sh | 2 +- .github/workflows/temp_ci_test.yml | 74 +++++++++---------- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index bdb278a8..d9a60f8f 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -42,7 +42,7 @@ done <<< "$modules" # Convert the array of JSON objects to a single JSON array json_services=$(jq -nc '[( $ARGS.positional[] | fromjson )]' --args -- ${json_objects[*]}) -echo "docker_matrix=$(echo $json_services | jq -c '{include: .}')" >> #$GITHUB_OUTPUT +echo "docker_matrix=$(echo $json_services | jq -c '{include: .}')" >> $GITHUB_OUTPUT ################# Setup Docker Registry and Repository Name ################# # Docker Registry to pull/push images diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 01e32b03..dede9d5b 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -16,7 +16,7 @@ jobs: name: Get changed files outputs: - modified_modules: ${{ steps.report-changes.outputs.CHANGED_MODULES }} + modified_modules: ${{ steps.report-changes.outputs.testvar }} steps: - uses: actions/checkout@v4 @@ -101,45 +101,45 @@ jobs: modified_modules: ${{ env.CHANGED_MODULES }} run: | echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" - echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV + echo "testvar=$CHANGED_MODULES" >> $GITHUB_ENV - name: Sanity check run: | - echo 1 ${{ steps.report-changes.outputs.CHANGED_MODULES }} + echo 1 ${{ steps.world_modeling.outputs.CHANGED_MODULES }} echo 2 ${{ env.CHANGED_MODULES }} setup-environment: - name: Setup environment - runs-on: ubuntu-latest - needs: get_changed_modules - - env: - modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} - - outputs: - docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} - registry: ${{ steps.docker-environment.outputs.registry }} - repository: ${{ steps.docker-environment.outputs.repository }} - source_branch: ${{ steps.github-environment.outputs.source_branch }} - target_branch: ${{ steps.github-environment.outputs.target_branch }} - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Setup Watod Environment - run: ./watod_scripts/watod-setup-env.sh - shell: bash - - - name: Check module changes - run: echo "changed is ${{ env.modified_modules }}" - - - name: Generate Docker Environment - id: docker-environment - uses: "./.github/templates/docker_context" - with: - modified_modules: ${{ env.modified_modules }} - - - name: Generate GitHub Environment - id: github-environment - uses: "./.github/templates/github_context" \ No newline at end of file + name: Setup environment + runs-on: ubuntu-latest + needs: get_changed_modules + + env: + modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} + + outputs: + docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} + registry: ${{ steps.docker-environment.outputs.registry }} + repository: ${{ steps.docker-environment.outputs.repository }} + source_branch: ${{ steps.github-environment.outputs.source_branch }} + target_branch: ${{ steps.github-environment.outputs.target_branch }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Watod Environment + run: ./watod_scripts/watod-setup-env.sh + shell: bash + + - name: Check module changes + run: echo "changed is ${{ env.modified_modules }}" + + - name: Generate Docker Environment + id: docker-environment + uses: "./.github/templates/docker_context" + with: + modified_modules: ${{ env.modified_modules }} + + - name: Generate GitHub Environment + id: github-environment + uses: "./.github/templates/github_context" \ No newline at end of file diff --git a/src/action/test.txt b/src/action/test.txt index e440e5c8..56a6051c 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -3 \ No newline at end of file +1 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index f11c82a4..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -9 \ No newline at end of file +1 \ No newline at end of file From ba46f3f475221f8f27d1d0054173a86ecf74e4e9 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 03:41:16 +0000 Subject: [PATCH 063/147] testing output variables --- .github/workflows/temp_ci_test.yml | 4 ++-- src/interfacing/test2.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index dede9d5b..67ec0b23 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -101,11 +101,11 @@ jobs: modified_modules: ${{ env.CHANGED_MODULES }} run: | echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" - echo "testvar=$CHANGED_MODULES" >> $GITHUB_ENV + echo "testvar=$CHANGED_MODULES" >> $GITHUB_OUTPUT - name: Sanity check run: | - echo 1 ${{ steps.world_modeling.outputs.CHANGED_MODULES }} + echo 1 ${{ steps.world_modeling.outputs.testvar }} echo 2 ${{ env.CHANGED_MODULES }} setup-environment: diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index 56a6051c..e440e5c8 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -1 \ No newline at end of file +3 \ No newline at end of file From 68705de87a68410899e56fb5da06139ee4fc3baf Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 03:52:05 +0000 Subject: [PATCH 064/147] testing output variables --- .github/workflows/temp_ci_test.yml | 13 +++++-------- src/world_modeling/test3.txt | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 67ec0b23..9eae8b32 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -16,7 +16,7 @@ jobs: name: Get changed files outputs: - modified_modules: ${{ steps.report-changes.outputs.testvar }} + modified_modules: ${{ steps.output-changes.outputs.modified_modules }} steps: - uses: actions/checkout@v4 @@ -96,17 +96,14 @@ jobs: echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV - name: List all changed files - id: report-changes - env: - modified_modules: ${{ env.CHANGED_MODULES }} + id: output-changes run: | - echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" - echo "testvar=$CHANGED_MODULES" >> $GITHUB_OUTPUT + echo "The changed modules are: $env.CHANGED_MODULES" + echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT - name: Sanity check run: | - echo 1 ${{ steps.world_modeling.outputs.testvar }} - echo 2 ${{ env.CHANGED_MODULES }} + echo Sanity, changes are in ${{ steps.output-changes.outputs.modified_modules }} setup-environment: name: Setup environment diff --git a/src/world_modeling/test3.txt b/src/world_modeling/test3.txt index 56a6051c..e440e5c8 100644 --- a/src/world_modeling/test3.txt +++ b/src/world_modeling/test3.txt @@ -1 +1 @@ -1 \ No newline at end of file +3 \ No newline at end of file From 66364d9093357d540b0fbcbe49d69093491df7b6 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 03:59:28 +0000 Subject: [PATCH 065/147] Testing entire unit test pipeline with specific module testing only --- .github/workflows/temp_ci_test.yml | 101 ++++++++++++++++++++++++++++- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 3 files changed, 102 insertions(+), 3 deletions(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 9eae8b32..d633cbae 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -139,4 +139,103 @@ jobs: - name: Generate GitHub Environment id: github-environment - uses: "./.github/templates/github_context" \ No newline at end of file + uses: "./.github/templates/github_context" + + build-and-unittest: + name: Build Image and Run Unit Testing Suite + runs-on: ubuntu-latest + needs: setup-environment + + env: + DOCKER_REGISTRY: ${{ needs.setup-environment.outputs.registry }} + DOCKER_REPOSITORY: ${{ needs.setup-environment.outputs.repository }} + SOURCE_BRANCH: ${{ needs.setup-environment.outputs.source_branch }} + TARGET_BRANCH: ${{ needs.setup-environment.outputs.target_branch }} + + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.setup-environment.outputs.docker_matrix) }} + + concurrency: + group: ${{ matrix.service }}-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Construct Registry URL + id: construct-registry-url + run: | + echo "url=${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ matrix.module }}/${{ matrix.service }}" \ + >> $GITHUB_OUTPUT + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + id: buildx + + - name: Docker Login + uses: docker/login-action@v3 + with: + registry: ${{ env.DOCKER_REGISTRY }} + username: ${{ secrets.GHCR_USER }} + password: ${{ secrets.GHCR_PWD }} + + - name: Prepare Image Dependencies + if: ${{ matrix.module != 'infrastructure' }} + uses: docker/build-push-action@v5 + with: + context: . + file: docker/${{ matrix.module }}/${{ matrix.service }}/${{ matrix.service }}.Dockerfile + push: true + tags: | + ${{ steps.construct-registry-url.outputs.url }}:source_${{ env.SOURCE_BRANCH }} + cache-from: | + ${{ steps.construct-registry-url.outputs.url }}:source_${{ env.SOURCE_BRANCH }} + ${{ steps.construct-registry-url.outputs.url }}:source_${{ env.TARGET_BRANCH }} + cache-to: type=inline + builder: ${{ steps.buildx.outputs.name }} + target: dependencies + + - name: Build Image from Source + uses: docker/build-push-action@v5 + with: + context: . + file: docker/${{ matrix.module }}/${{ matrix.service }}/${{ matrix.service }}.Dockerfile + push: true + tags: | + ${{ steps.construct-registry-url.outputs.url }}:build_${{ env.SOURCE_BRANCH }} + cache-from: | + ${{ steps.construct-registry-url.outputs.url }}:source_${{ env.SOURCE_BRANCH }} + ${{ steps.construct-registry-url.outputs.url }}:build_${{ env.SOURCE_BRANCH }} + ${{ steps.construct-registry-url.outputs.url }}:build_${{ env.TARGET_BRANCH }} + cache-to: type=inline + builder: ${{ steps.buildx.outputs.name }} + target: build + + - name: Security Sanitation for Deployment + uses: docker/build-push-action@v5 + with: + context: . + file: docker/${{ matrix.module }}/${{ matrix.service }}/${{ matrix.service }}.Dockerfile + push: true + tags: | + ${{ steps.construct-registry-url.outputs.url }}:${{ env.SOURCE_BRANCH }} + cache-from: | + ${{ steps.construct-registry-url.outputs.url }}:build_${{ env.SOURCE_BRANCH }} + ${{ steps.construct-registry-url.outputs.url }}:${{ env.SOURCE_BRANCH }} + ${{ steps.construct-registry-url.outputs.url }}:${{ env.TARGET_BRANCH }} + cache-to: type=inline + builder: ${{ steps.buildx.outputs.name }} + target: deploy + + - name: Run testing suite + uses: "./.github/templates/test" + env: + DOCKER_BUILDKIT: 1 + COMPOSE_DOCKER_CLI_BUILD: 1 + BUILDKIT_INLINE_CACHE: 1 + with: + module: ${{ matrix.module }} + service: ${{ matrix.service }} + source_branch: ${{ env.SOURCE_BRANCH }} diff --git a/src/action/test.txt b/src/action/test.txt index 56a6051c..d8263ee9 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -1 \ No newline at end of file +2 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index e440e5c8..bf0d87ab 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -3 \ No newline at end of file +4 \ No newline at end of file From f23357d60c6033138a7aa6ecf7846df56283df76 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 04:09:32 +0000 Subject: [PATCH 066/147] Testing entire unit test pipeline with specific module testing only --- .github/templates/docker_context/action.yml | 2 +- src/action/test.txt | 2 +- src/world_modeling/test3.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index 51b1b00b..954608ca 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -21,5 +21,5 @@ runs: using: "composite" steps: - id: environment-generator - run: ${{ github.action_path }}/docker_context.sh ${{inputs.modified_modules}} + run: ${{ github.action_path }}/docker_context.sh "${{inputs.modified_modules}}" shell: bash diff --git a/src/action/test.txt b/src/action/test.txt index d8263ee9..bf0d87ab 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -2 \ No newline at end of file +4 \ No newline at end of file diff --git a/src/world_modeling/test3.txt b/src/world_modeling/test3.txt index e440e5c8..d8263ee9 100644 --- a/src/world_modeling/test3.txt +++ b/src/world_modeling/test3.txt @@ -1 +1 @@ -3 \ No newline at end of file +2 \ No newline at end of file From 6bf4f1fdbbf4377f4d308394414730b374ba0fcd Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 04:51:21 +0000 Subject: [PATCH 067/147] Handle no src file changes --- .github/templates/docker_context/docker_context.sh | 8 +++++--- .github/workflows/temp_ci_test.yml | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index d9a60f8f..d853262b 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -7,7 +7,6 @@ set -e # Find docker compose files in 'modules' directory modules=$(find modules -maxdepth 1 -name "docker-compose*") -modules_modified=false # Initialize an empty array for JSON objects json_objects=() @@ -24,10 +23,13 @@ while read -r module; do # Only work with modules that are modified if [[ $1 = *$module_out* ]]; then echo "$module_out modified" - modules_modified=true else echo "$module_out not changed" - continue + if [[ "$1" = "" || $1 = " " ]]; then + echo "Nothing is modified, but probably an infra change so test all modules" + else + continue + fi fi # Loop through each service diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index d633cbae..8e1e6112 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -22,6 +22,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + since_last_remote_commit: false - name: Find changed files inside action folder id: changed-files-action From 546d3c4c3959800e93ccf91970c954554f1c104f Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 05:02:55 +0000 Subject: [PATCH 068/147] Compare changes to main branch --- .github/workflows/temp_ci_test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 8e1e6112..89315b1e 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -4,7 +4,10 @@ on: workflow_dispatch: {} push: branches: - - 'ci-specific-modules' + - main + pull_request: + branches: + - main jobs: # ------------------------------------------------------------------------ From 73d8b607fece02e1fc41718f01a03f24a789ab56 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 05:11:57 +0000 Subject: [PATCH 069/147] Compare changes to main branch --- .github/workflows/build_and_unitest.yml | 105 +++++++++- .github/workflows/temp_ci_test.yml | 245 ------------------------ 2 files changed, 103 insertions(+), 247 deletions(-) delete mode 100644 .github/workflows/temp_ci_test.yml diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 59fef501..ffcf0fa9 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -9,9 +9,107 @@ on: - main jobs: + get_changed_modules: + runs-on: ubuntu-latest + name: Get changed files + + outputs: + modified_modules: ${{ steps.output-changes.outputs.modified_modules }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + + - name: Find changed files inside action folder + id: changed-files-action + uses: tj-actions/changed-files@v42 + with: + files: src/action/** + + - name: Get changed files inside interfacing folder + id: changed-files-interfacing + uses: tj-actions/changed-files@v42 + with: + files: src/interfacing/** + + - name: Get changed files inside perception folder + id: changed-files-perception + uses: tj-actions/changed-files@v42 + with: + files: src/perception/** + + - name: Get changed files inside samples folder + id: changed-files-samples + uses: tj-actions/changed-files@v42 + with: + files: src/samples/** + + - name: Get changed files inside simulation folder + id: changed-files-simulation + uses: tj-actions/changed-files@v42 + with: + files: src/simulation/** + + - name: Get changed files inside world_modeling folder + id: changed-files-world-modeling + uses: tj-actions/changed-files@v42 + with: + files: src/world_modeling/** + + - name: Update CHANGED_MODULES for action + if: steps.changed-files-action.outputs.any_changed == 'true' + run: | + echo "Detected action changes" + echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for interfacing + if: steps.changed-files-interfacing.outputs.any_changed == 'true' + run: | + echo "Detected interfacing changes" + echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for perception + if: steps.changed-files-perception.outputs.any_changed == 'true' + run: | + echo "Detected perception changes" + echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for samples + if: steps.changed-files-samples.outputs.any_changed == 'true' + run: | + echo "Detected samples changes" + echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for simulations + if: steps.changed-files-simulations.outputs.any_changed == 'true' + run: | + echo "Detected simulations changes" + echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV + + - name: Update CHANGED_MODULES for world_modeling + if: steps.changed-files-world-modeling.outputs.any_changed == 'true' + run: | + echo "Detected world_modeling changes" + echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV + + - name: List all changed files + id: output-changes + run: | + echo "The changed modules are: $env.CHANGED_MODULES" + echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT + + - name: Sanity check + run: | + echo Sanity, changes are in ${{ steps.output-changes.outputs.modified_modules }} + setup-environment: name: Setup environment runs-on: ubuntu-latest + needs: get_changed_modules + + env: + modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} outputs: docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} @@ -28,12 +126,15 @@ jobs: run: ./watod_scripts/watod-setup-env.sh shell: bash + - name: Check module changes + run: echo "changed is ${{ env.modified_modules }}" + - name: Generate Docker Environment id: docker-environment uses: "./.github/templates/docker_context" with: - modified-modules: ${{env.CHANGED_MODULES}} - + modified_modules: ${{ env.modified_modules }} + - name: Generate GitHub Environment id: github-environment uses: "./.github/templates/github_context" diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml deleted file mode 100644 index 89315b1e..00000000 --- a/.github/workflows/temp_ci_test.yml +++ /dev/null @@ -1,245 +0,0 @@ -name: Track changes between main and new commit - -on: - workflow_dispatch: {} - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - # ------------------------------------------------------------------------ - # Event `pull_request`: Compare the last commit of the main branch or last - # remote commit of the PR branch -> to the current commit of a PR branch. - # ------------------------------------------------------------------------ - get_changed_modules: - runs-on: ubuntu-latest - name: Get changed files - - outputs: - modified_modules: ${{ steps.output-changes.outputs.modified_modules }} - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - since_last_remote_commit: false - - - name: Find changed files inside action folder - id: changed-files-action - uses: tj-actions/changed-files@v42 - with: - files: src/action/** - - - name: Get changed files inside interfacing folder - id: changed-files-interfacing - uses: tj-actions/changed-files@v42 - with: - files: src/interfacing/** - - - name: Get changed files inside perception folder - id: changed-files-perception - uses: tj-actions/changed-files@v42 - with: - files: src/perception/** - - - name: Get changed files inside samples folder - id: changed-files-samples - uses: tj-actions/changed-files@v42 - with: - files: src/samples/** - - - name: Get changed files inside simulation folder - id: changed-files-simulation - uses: tj-actions/changed-files@v42 - with: - files: src/simulation/** - - - name: Get changed files inside world_modeling folder - id: changed-files-world-modeling - uses: tj-actions/changed-files@v42 - with: - files: src/world_modeling/** - - - name: Update CHANGED_MODULES for action - if: steps.changed-files-action.outputs.any_changed == 'true' - run: | - echo "Detected action changes" - echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for interfacing - if: steps.changed-files-interfacing.outputs.any_changed == 'true' - run: | - echo "Detected interfacing changes" - echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for perception - if: steps.changed-files-perception.outputs.any_changed == 'true' - run: | - echo "Detected perception changes" - echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for samples - if: steps.changed-files-samples.outputs.any_changed == 'true' - run: | - echo "Detected samples changes" - echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for simulations - if: steps.changed-files-simulations.outputs.any_changed == 'true' - run: | - echo "Detected simulations changes" - echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for world_modeling - if: steps.changed-files-world-modeling.outputs.any_changed == 'true' - run: | - echo "Detected world_modeling changes" - echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV - - - name: List all changed files - id: output-changes - run: | - echo "The changed modules are: $env.CHANGED_MODULES" - echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT - - - name: Sanity check - run: | - echo Sanity, changes are in ${{ steps.output-changes.outputs.modified_modules }} - - setup-environment: - name: Setup environment - runs-on: ubuntu-latest - needs: get_changed_modules - - env: - modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} - - outputs: - docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} - registry: ${{ steps.docker-environment.outputs.registry }} - repository: ${{ steps.docker-environment.outputs.repository }} - source_branch: ${{ steps.github-environment.outputs.source_branch }} - target_branch: ${{ steps.github-environment.outputs.target_branch }} - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Setup Watod Environment - run: ./watod_scripts/watod-setup-env.sh - shell: bash - - - name: Check module changes - run: echo "changed is ${{ env.modified_modules }}" - - - name: Generate Docker Environment - id: docker-environment - uses: "./.github/templates/docker_context" - with: - modified_modules: ${{ env.modified_modules }} - - - name: Generate GitHub Environment - id: github-environment - uses: "./.github/templates/github_context" - - build-and-unittest: - name: Build Image and Run Unit Testing Suite - runs-on: ubuntu-latest - needs: setup-environment - - env: - DOCKER_REGISTRY: ${{ needs.setup-environment.outputs.registry }} - DOCKER_REPOSITORY: ${{ needs.setup-environment.outputs.repository }} - SOURCE_BRANCH: ${{ needs.setup-environment.outputs.source_branch }} - TARGET_BRANCH: ${{ needs.setup-environment.outputs.target_branch }} - - strategy: - fail-fast: false - matrix: ${{ fromJSON(needs.setup-environment.outputs.docker_matrix) }} - - concurrency: - group: ${{ matrix.service }}-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Construct Registry URL - id: construct-registry-url - run: | - echo "url=${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}/${{ matrix.module }}/${{ matrix.service }}" \ - >> $GITHUB_OUTPUT - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - id: buildx - - - name: Docker Login - uses: docker/login-action@v3 - with: - registry: ${{ env.DOCKER_REGISTRY }} - username: ${{ secrets.GHCR_USER }} - password: ${{ secrets.GHCR_PWD }} - - - name: Prepare Image Dependencies - if: ${{ matrix.module != 'infrastructure' }} - uses: docker/build-push-action@v5 - with: - context: . - file: docker/${{ matrix.module }}/${{ matrix.service }}/${{ matrix.service }}.Dockerfile - push: true - tags: | - ${{ steps.construct-registry-url.outputs.url }}:source_${{ env.SOURCE_BRANCH }} - cache-from: | - ${{ steps.construct-registry-url.outputs.url }}:source_${{ env.SOURCE_BRANCH }} - ${{ steps.construct-registry-url.outputs.url }}:source_${{ env.TARGET_BRANCH }} - cache-to: type=inline - builder: ${{ steps.buildx.outputs.name }} - target: dependencies - - - name: Build Image from Source - uses: docker/build-push-action@v5 - with: - context: . - file: docker/${{ matrix.module }}/${{ matrix.service }}/${{ matrix.service }}.Dockerfile - push: true - tags: | - ${{ steps.construct-registry-url.outputs.url }}:build_${{ env.SOURCE_BRANCH }} - cache-from: | - ${{ steps.construct-registry-url.outputs.url }}:source_${{ env.SOURCE_BRANCH }} - ${{ steps.construct-registry-url.outputs.url }}:build_${{ env.SOURCE_BRANCH }} - ${{ steps.construct-registry-url.outputs.url }}:build_${{ env.TARGET_BRANCH }} - cache-to: type=inline - builder: ${{ steps.buildx.outputs.name }} - target: build - - - name: Security Sanitation for Deployment - uses: docker/build-push-action@v5 - with: - context: . - file: docker/${{ matrix.module }}/${{ matrix.service }}/${{ matrix.service }}.Dockerfile - push: true - tags: | - ${{ steps.construct-registry-url.outputs.url }}:${{ env.SOURCE_BRANCH }} - cache-from: | - ${{ steps.construct-registry-url.outputs.url }}:build_${{ env.SOURCE_BRANCH }} - ${{ steps.construct-registry-url.outputs.url }}:${{ env.SOURCE_BRANCH }} - ${{ steps.construct-registry-url.outputs.url }}:${{ env.TARGET_BRANCH }} - cache-to: type=inline - builder: ${{ steps.buildx.outputs.name }} - target: deploy - - - name: Run testing suite - uses: "./.github/templates/test" - env: - DOCKER_BUILDKIT: 1 - COMPOSE_DOCKER_CLI_BUILD: 1 - BUILDKIT_INLINE_CACHE: 1 - with: - module: ${{ matrix.module }} - service: ${{ matrix.service }} - source_branch: ${{ env.SOURCE_BRANCH }} From fb02414f6b64e10bf784f6db9663a25bf3eb56eb Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 05:20:25 +0000 Subject: [PATCH 070/147] Environment variable naming changes --- .github/workflows/build_and_unitest.yml | 34 +++++++++++-------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index ffcf0fa9..d662c275 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -11,7 +11,7 @@ on: jobs: get_changed_modules: runs-on: ubuntu-latest - name: Get changed files + name: Get changed modules outputs: modified_modules: ${{ steps.output-changes.outputs.modified_modules }} @@ -57,52 +57,48 @@ jobs: with: files: src/world_modeling/** - - name: Update CHANGED_MODULES for action + - name: Update changed_modules for action if: steps.changed-files-action.outputs.any_changed == 'true' run: | echo "Detected action changes" - echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV + echo "changed_modules=$changed_modules action" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for interfacing + - name: Update changed_modules for interfacing if: steps.changed-files-interfacing.outputs.any_changed == 'true' run: | echo "Detected interfacing changes" - echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV + echo "changed_modules=$changed_modules interfacing" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for perception + - name: Update changed_modules for perception if: steps.changed-files-perception.outputs.any_changed == 'true' run: | echo "Detected perception changes" - echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV + echo "changed_modules=$changed_modules perception" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for samples + - name: Update changed_modules for samples if: steps.changed-files-samples.outputs.any_changed == 'true' run: | echo "Detected samples changes" - echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV + echo "changed_modules=$changed_modules samples" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for simulations + - name: Update changed_modules for simulations if: steps.changed-files-simulations.outputs.any_changed == 'true' run: | echo "Detected simulations changes" - echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV + echo "changed_modules=$changed_modules simulations" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for world_modeling + - name: Update changed_modules for world_modeling if: steps.changed-files-world-modeling.outputs.any_changed == 'true' run: | echo "Detected world_modeling changes" - echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV + echo "changed_modules=$changed_modules world_modeling" >> $GITHUB_ENV - name: List all changed files id: output-changes run: | - echo "The changed modules are: $env.CHANGED_MODULES" - echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT + echo "The changed modules are: ${{ steps.output-changes.outputs.modified_modules }} + echo "modified_modules=$changed_modules" >> $GITHUB_OUTPUT - - name: Sanity check - run: | - echo Sanity, changes are in ${{ steps.output-changes.outputs.modified_modules }} - setup-environment: name: Setup environment runs-on: ubuntu-latest From b459a550aa644b914377d884b2ade49dc4e8237b Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 05:22:46 +0000 Subject: [PATCH 071/147] Environment variable naming changes --- .github/workflows/build_and_unitest.yml | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index d662c275..b6ade7be 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -9,7 +9,7 @@ on: - main jobs: - get_changed_modules: + get_CHANGED_MODULES: runs-on: ubuntu-latest name: Get changed modules @@ -57,55 +57,55 @@ jobs: with: files: src/world_modeling/** - - name: Update changed_modules for action + - name: Update CHANGED_MODULES for action if: steps.changed-files-action.outputs.any_changed == 'true' run: | echo "Detected action changes" - echo "changed_modules=$changed_modules action" >> $GITHUB_ENV + echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - - name: Update changed_modules for interfacing + - name: Update CHANGED_MODULES for interfacing if: steps.changed-files-interfacing.outputs.any_changed == 'true' run: | echo "Detected interfacing changes" - echo "changed_modules=$changed_modules interfacing" >> $GITHUB_ENV + echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV - - name: Update changed_modules for perception + - name: Update CHANGED_MODULES for perception if: steps.changed-files-perception.outputs.any_changed == 'true' run: | echo "Detected perception changes" - echo "changed_modules=$changed_modules perception" >> $GITHUB_ENV + echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV - - name: Update changed_modules for samples + - name: Update CHANGED_MODULES for samples if: steps.changed-files-samples.outputs.any_changed == 'true' run: | echo "Detected samples changes" - echo "changed_modules=$changed_modules samples" >> $GITHUB_ENV + echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV - - name: Update changed_modules for simulations + - name: Update CHANGED_MODULES for simulations if: steps.changed-files-simulations.outputs.any_changed == 'true' run: | echo "Detected simulations changes" - echo "changed_modules=$changed_modules simulations" >> $GITHUB_ENV + echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV - - name: Update changed_modules for world_modeling + - name: Update CHANGED_MODULES for world_modeling if: steps.changed-files-world-modeling.outputs.any_changed == 'true' run: | echo "Detected world_modeling changes" - echo "changed_modules=$changed_modules world_modeling" >> $GITHUB_ENV + echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV - - name: List all changed files + - name: Output list of changed modules id: output-changes run: | - echo "The changed modules are: ${{ steps.output-changes.outputs.modified_modules }} - echo "modified_modules=$changed_modules" >> $GITHUB_OUTPUT + echo "The changed modules are: $CHANGED_MODULES" + echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT setup-environment: name: Setup environment runs-on: ubuntu-latest - needs: get_changed_modules + needs: get_CHANGED_MODULES env: - modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} + modified_modules: ${{ needs.get_CHANGED_MODULES.outputs.modified_modules }} outputs: docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} From f07412f0de432055fa68b6d05c0355b9197e4db6 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 05:28:40 +0000 Subject: [PATCH 072/147] Clean for PR --- .github/templates/docker_context/docker_context.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index d853262b..6f9cf92f 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -11,7 +11,7 @@ modules=$(find modules -maxdepth 1 -name "docker-compose*") # Initialize an empty array for JSON objects json_objects=() -echo "input is $1" +echo "Incoming modified modules are $1" # Loop through each module while read -r module; do From 05897f9b2e93b2b6d128bb2a49133c5f53e45b4a Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 05:29:12 +0000 Subject: [PATCH 073/147] Clean for PR --- .github/workflows/build_and_unitest.yml | 8 ++++---- src/samples/cpp/aggregator/src/aggregator_core.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index b6ade7be..9bc61be5 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -81,11 +81,11 @@ jobs: echo "Detected samples changes" echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for simulations - if: steps.changed-files-simulations.outputs.any_changed == 'true' + - name: Update CHANGED_MODULES for simulation + if: steps.changed-files-simulation.outputs.any_changed == 'true' run: | - echo "Detected simulations changes" - echo "CHANGED_MODULES=$CHANGED_MODULES simulations" >> $GITHUB_ENV + echo "Detected simulation changes" + echo "CHANGED_MODULES=$CHANGED_MODULES simulation" >> $GITHUB_ENV - name: Update CHANGED_MODULES for world_modeling if: steps.changed-files-world-modeling.outputs.any_changed == 'true' diff --git a/src/samples/cpp/aggregator/src/aggregator_core.cpp b/src/samples/cpp/aggregator/src/aggregator_core.cpp index 288aee98..4cfb8ea1 100644 --- a/src/samples/cpp/aggregator/src/aggregator_core.cpp +++ b/src/samples/cpp/aggregator/src/aggregator_core.cpp @@ -21,7 +21,7 @@ double AggregatorCore::raw_frequency() const double AggregatorCore::filtered_frequency() const { if (latest_filtered_time_ <= start_) { - return 1.0; + return 0.0; } return static_cast(filtered_msg_count_) / (latest_filtered_time_ - start_); } From c55c13891354f40fbb3c0752df1999e8bc8ce9e8 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 05:42:26 +0000 Subject: [PATCH 074/147] job renaming for PR --- .github/workflows/build_and_unitest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 9bc61be5..6f36038c 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -9,7 +9,7 @@ on: - main jobs: - get_CHANGED_MODULES: + get_changed_modules: runs-on: ubuntu-latest name: Get changed modules @@ -102,10 +102,10 @@ jobs: setup-environment: name: Setup environment runs-on: ubuntu-latest - needs: get_CHANGED_MODULES + needs: get_changed_modules env: - modified_modules: ${{ needs.get_CHANGED_MODULES.outputs.modified_modules }} + modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} outputs: docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} From a049def8a6dbd187c17993137b48f84bbf2046c9 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 17:31:05 +0000 Subject: [PATCH 075/147] workflow changes --- .github/workflows/build_and_unitest.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 6f36038c..d844971a 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -57,37 +57,32 @@ jobs: with: files: src/world_modeling/** - - name: Update CHANGED_MODULES for action + - name: Update CHANGED_MODULES for changes if: steps.changed-files-action.outputs.any_changed == 'true' run: | echo "Detected action changes" echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for interfacing if: steps.changed-files-interfacing.outputs.any_changed == 'true' run: | echo "Detected interfacing changes" echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for perception if: steps.changed-files-perception.outputs.any_changed == 'true' run: | echo "Detected perception changes" echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for samples if: steps.changed-files-samples.outputs.any_changed == 'true' run: | echo "Detected samples changes" echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV - - name: Update CHANGED_MODULES for simulation if: steps.changed-files-simulation.outputs.any_changed == 'true' run: | echo "Detected simulation changes" echo "CHANGED_MODULES=$CHANGED_MODULES simulation" >> $GITHUB_ENV - - - name: Update CHANGED_MODULES for world_modeling + if: steps.changed-files-world-modeling.outputs.any_changed == 'true' run: | echo "Detected world_modeling changes" @@ -98,7 +93,7 @@ jobs: run: | echo "The changed modules are: $CHANGED_MODULES" echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT - + setup-environment: name: Setup environment runs-on: ubuntu-latest @@ -233,3 +228,12 @@ jobs: module: ${{ matrix.module }} service: ${{ matrix.service }} source_branch: ${{ env.SOURCE_BRANCH }} + + confirm-build-and-unittest-complete: + name: Confirm that unit testing suite completed + runs-on: ubuntu-latest + needs: build-and-unittest + + steps: + - name: Unit Testing Suite Completed + - run: echo "::notice:: Unit Testing Suite Completed!" From 4d5218be049c359de59c5ce09489df367e72e066 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 17:32:10 +0000 Subject: [PATCH 076/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index d844971a..b4c38c09 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -236,4 +236,4 @@ jobs: steps: - name: Unit Testing Suite Completed - - run: echo "::notice:: Unit Testing Suite Completed!" + run: echo "::notice:: Unit Testing Suite Completed!" From 89b3650b76471a58ff44d36e5884a73fb461cdef Mon Sep 17 00:00:00 2001 From: Mark Do Date: Thu, 8 Feb 2024 17:35:36 +0000 Subject: [PATCH 077/147] workflow changes --- .github/workflows/build_and_unitest.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index b4c38c09..4c98503c 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -23,7 +23,7 @@ jobs: - name: Find changed files inside action folder id: changed-files-action - uses: tj-actions/changed-files@v42 + uses: tj-actions/changed-files@v43 with: files: src/action/** @@ -229,11 +229,11 @@ jobs: service: ${{ matrix.service }} source_branch: ${{ env.SOURCE_BRANCH }} - confirm-build-and-unittest-complete: - name: Confirm that unit testing suite completed - runs-on: ubuntu-latest - needs: build-and-unittest - - steps: - - name: Unit Testing Suite Completed - run: echo "::notice:: Unit Testing Suite Completed!" + # confirm-build-and-unittest-complete: + # name: Confirm that unit testing suite completed + # runs-on: ubuntu-latest + # needs: build-and-unittest + + # steps: + # - name: Unit Testing Suite Completed + # run: echo "::notice:: Unit Testing Suite Completed!" From 433ac65005aeb3e900c0c4522ce7860c60fdfbbb Mon Sep 17 00:00:00 2001 From: Mark Do Date: Fri, 9 Feb 2024 20:46:43 +0000 Subject: [PATCH 078/147] condensing workflows --- .github/workflows/build_and_unitest.yml | 67 +++++++++++-------------- 1 file changed, 30 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 4c98503c..0d4eac46 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -60,33 +60,35 @@ jobs: - name: Update CHANGED_MODULES for changes if: steps.changed-files-action.outputs.any_changed == 'true' run: | - echo "Detected action changes" - echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - - if: steps.changed-files-interfacing.outputs.any_changed == 'true' - run: | - echo "Detected interfacing changes" - echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV - - if: steps.changed-files-perception.outputs.any_changed == 'true' - run: | - echo "Detected perception changes" - echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV - - if: steps.changed-files-samples.outputs.any_changed == 'true' - run: | - echo "Detected samples changes" - echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV - - if: steps.changed-files-simulation.outputs.any_changed == 'true' - run: | - echo "Detected simulation changes" - echo "CHANGED_MODULES=$CHANGED_MODULES simulation" >> $GITHUB_ENV - - if: steps.changed-files-world-modeling.outputs.any_changed == 'true' - run: | - echo "Detected world_modeling changes" - echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV + if [steps.changed-files-action.outputs.any_changed == 'true']; then + echo "Detected action changes" + echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV + fi + + if [steps.changed-files-interfacing.outputs.any_changed == 'true']; then + echo "Detected interfacing changes" + echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV + fi + + if [steps.changed-files-perception.outputs.any_changed == 'true']; then + echo "Detected perception changes" + echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV + fi + + if [steps.changed-files-samples.outputs.any_changed == 'true']; then + echo "Detected samples changes" + echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV + fi + + if [steps.changed-files-simulation.outputs.any_changed == 'true']; then + echo "Detected simulation changes" + echo "CHANGED_MODULES=$CHANGED_MODULES simulation" >> $GITHUB_ENV + fi + + if [steps.changed-files-world-modeling.outputs.any_changed == 'true']; then + echo "Detected world_modeling changes" + echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV + fi - name: Output list of changed modules id: output-changes @@ -227,13 +229,4 @@ jobs: with: module: ${{ matrix.module }} service: ${{ matrix.service }} - source_branch: ${{ env.SOURCE_BRANCH }} - - # confirm-build-and-unittest-complete: - # name: Confirm that unit testing suite completed - # runs-on: ubuntu-latest - # needs: build-and-unittest - - # steps: - # - name: Unit Testing Suite Completed - # run: echo "::notice:: Unit Testing Suite Completed!" + source_branch: ${{ env.SOURCE_BRANCH }} \ No newline at end of file From f1cdb7d39549f3e711787a2f978e9a89d4a6bc0e Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 00:31:47 +0000 Subject: [PATCH 079/147] condensing workflows --- .github/templates/check_src_changes/action.yml | 14 ++++++++++++++ .github/templates/docker_context/action.yml | 3 ++- .github/templates/docker_context/docker_context.sh | 9 +++------ 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 .github/templates/check_src_changes/action.yml diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml new file mode 100644 index 00000000..2d12e7f0 --- /dev/null +++ b/.github/templates/check_src_changes/action.yml @@ -0,0 +1,14 @@ +name: Check source file changes + +outputs: + modified_modules: + description: "Space delimited list of changed modules" + value: ${{ steps.output-changes.outputs.modified_modules }} + +runs: + using: "composite" + steps: + - id: environment-generator + env: MODIFIED_MODULES: ${{ inputs.modified_modules }} + run: ${{ github.action_path }}/docker_context.sh $MODIFIED_MODULES + shell: bash \ No newline at end of file diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index 954608ca..31dc58b3 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -21,5 +21,6 @@ runs: using: "composite" steps: - id: environment-generator - run: ${{ github.action_path }}/docker_context.sh "${{inputs.modified_modules}}" + env: MODIFIED_MODULES: ${{ inputs.modified_modules }} + run: ${{ github.action_path }}/docker_context.sh $MODIFIED_MODULES shell: bash diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 6f9cf92f..8963da4e 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -11,7 +11,7 @@ modules=$(find modules -maxdepth 1 -name "docker-compose*") # Initialize an empty array for JSON objects json_objects=() -echo "Incoming modified modules are $1" +echo "::notice:: Incoming modified modules are $1" # Loop through each module while read -r module; do @@ -21,12 +21,9 @@ while read -r module; do module_out=$(echo "$module" | sed -n 's/modules\/docker-compose\.\(.*\)\.yaml/\1/p') # Only work with modules that are modified - if [[ $1 = *$module_out* ]]; then - echo "$module_out modified" - else - echo "$module_out not changed" + if [[ $1 != *$module_out* ]]; then if [[ "$1" = "" || $1 = " " ]]; then - echo "Nothing is modified, but probably an infra change so test all modules" + echo "::notice:: No source code modified, testing all modules for possible infra changes" else continue fi From 82590c058f4cf74d095afda35925cef14a026ab9 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 00:36:47 +0000 Subject: [PATCH 080/147] typo in workflow --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 4b88fd73..6cd28943 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -23,7 +23,7 @@ jobs: - name: Find changed files inside action folder id: changed-files-action - uses: tj-actions/changed-files@v43 + uses: tj-actions/changed-files@v42 with: files: src/action/** From ce7d8cc24bd3d3ec575d20e1cac8936cb99cfb8e Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 00:41:17 +0000 Subject: [PATCH 081/147] typo in workflow --- .github/workflows/build_and_unitest.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 6cd28943..a2de3760 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -58,34 +58,33 @@ jobs: files: src/world_modeling/** - name: Update CHANGED_MODULES for changes - if: steps.changed-files-action.outputs.any_changed == 'true' run: | - if [steps.changed-files-action.outputs.any_changed == 'true']; then + if [ ${{ steps.changed-files-action.outputs.any_changed }} ]; then echo "Detected action changes" echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV fi - if [steps.changed-files-interfacing.outputs.any_changed == 'true']; then + if [ ${{ steps.changed-files-interfacing.outputs.any_changed }}]; then echo "Detected interfacing changes" echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV fi - if [steps.changed-files-perception.outputs.any_changed == 'true']; then + if [ ${{ steps.changed-files-perception.outputs.any_changed }} ]; then echo "Detected perception changes" echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV fi - if [steps.changed-files-samples.outputs.any_changed == 'true']; then + if [ ${{ steps.changed-files-samples.outputs.any_changed }} ]; then echo "Detected samples changes" echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV fi - if [steps.changed-files-simulation.outputs.any_changed == 'true']; then + if [ ${{ steps.changed-files-simulation.outputs.any_changed }} ]; then echo "Detected simulation changes" echo "CHANGED_MODULES=$CHANGED_MODULES simulation" >> $GITHUB_ENV fi - if [steps.changed-files-world-modeling.outputs.any_changed == 'true']; then + if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} ]; then echo "Detected world_modeling changes" echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV fi From e47f9f4fbb65aade4dfcaf68f68e1aefe8bc9261 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 00:49:45 +0000 Subject: [PATCH 082/147] workflow changes --- .github/templates/docker_context/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index 31dc58b3..31320ee3 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -21,6 +21,7 @@ runs: using: "composite" steps: - id: environment-generator - env: MODIFIED_MODULES: ${{ inputs.modified_modules }} + env: + MODIFIED_MODULES: ${{ inputs.modified_modules }} run: ${{ github.action_path }}/docker_context.sh $MODIFIED_MODULES shell: bash From 3f8ec555a7e5555218daf17f74259e9a4cd3263b Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 00:56:17 +0000 Subject: [PATCH 083/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index a2de3760..ac1bce87 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -64,7 +64,7 @@ jobs: echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV fi - if [ ${{ steps.changed-files-interfacing.outputs.any_changed }}]; then + if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} ]; then echo "Detected interfacing changes" echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV fi From d85c91fcb9b9efb6ddd797158925b03dc780a70c Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 00:58:52 +0000 Subject: [PATCH 084/147] workflow changes --- .github/workflows/build_and_unitest.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index ac1bce87..3cc525b3 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -62,31 +62,37 @@ jobs: if [ ${{ steps.changed-files-action.outputs.any_changed }} ]; then echo "Detected action changes" echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV + echo "The changed modules are: $CHANGED_MODULES" fi if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} ]; then echo "Detected interfacing changes" echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV + echo "The changed modules are: $CHANGED_MODULES" fi if [ ${{ steps.changed-files-perception.outputs.any_changed }} ]; then echo "Detected perception changes" echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV + echo "The changed modules are: $CHANGED_MODULES" fi if [ ${{ steps.changed-files-samples.outputs.any_changed }} ]; then echo "Detected samples changes" echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV + echo "The changed modules are: $CHANGED_MODULES" fi if [ ${{ steps.changed-files-simulation.outputs.any_changed }} ]; then echo "Detected simulation changes" echo "CHANGED_MODULES=$CHANGED_MODULES simulation" >> $GITHUB_ENV + echo "The changed modules are: $CHANGED_MODULES" fi if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} ]; then echo "Detected world_modeling changes" echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV + echo "The changed modules are: $CHANGED_MODULES" fi - name: Output list of changed modules From 748bea7c62af2a11b929b88180bd5fc311fd9da1 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:01:56 +0000 Subject: [PATCH 085/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 3cc525b3..97daa331 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -62,7 +62,7 @@ jobs: if [ ${{ steps.changed-files-action.outputs.any_changed }} ]; then echo "Detected action changes" echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - echo "The changed modules are: $CHANGED_MODULES" + echo "The changed modules are: {{ env.CHANGED_MODULES }} " fi if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} ]; then From d5c5cc4b9f92913cb732743ad08cedb94170e141 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:18:32 +0000 Subject: [PATCH 086/147] workflow changes --- .github/workflows/build_and_unitest.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 97daa331..5327f0aa 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -57,12 +57,14 @@ jobs: with: files: src/world_modeling/** - - name: Update CHANGED_MODULES for changes + - name: Create list of changed modules + env: + CHANGED_MODULES: "" run: | if [ ${{ steps.changed-files-action.outputs.any_changed }} ]; then echo "Detected action changes" echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - echo "The changed modules are: {{ env.CHANGED_MODULES }} " + echo "The changed modules are: $CHANGED_MODULES" fi if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} ]; then From 2884aad0d5a9eaef123167810279e68337a4273e Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:29:18 +0000 Subject: [PATCH 087/147] workflow changes --- .github/workflows/build_and_unitest.yml | 32 +++++++++++-------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 5327f0aa..f116e2ee 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -61,42 +61,38 @@ jobs: env: CHANGED_MODULES: "" run: | - if [ ${{ steps.changed-files-action.outputs.any_changed }} ]; then + if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then echo "Detected action changes" - echo "CHANGED_MODULES=$CHANGED_MODULES action" >> $GITHUB_ENV - echo "The changed modules are: $CHANGED_MODULES" + $CHANGED_MODULES += "action " fi - if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} ]; then + if [ ${{ steps.changed-files-interfacing.outputs.any_changed == 'true'}} ]; then echo "Detected interfacing changes" - echo "CHANGED_MODULES=$CHANGED_MODULES interfacing" >> $GITHUB_ENV - echo "The changed modules are: $CHANGED_MODULES" + $CHANGED_MODULES += "interfacing " fi - if [ ${{ steps.changed-files-perception.outputs.any_changed }} ]; then + if [ ${{ steps.changed-files-perception.outputs.any_changed == 'true'}} ]; then echo "Detected perception changes" - echo "CHANGED_MODULES=$CHANGED_MODULES perception" >> $GITHUB_ENV - echo "The changed modules are: $CHANGED_MODULES" + $CHANGED_MODULES += "perception " fi - if [ ${{ steps.changed-files-samples.outputs.any_changed }} ]; then + if [ ${{ steps.changed-files-samples.outputs.any_changed == 'true'}} ]; then echo "Detected samples changes" - echo "CHANGED_MODULES=$CHANGED_MODULES samples" >> $GITHUB_ENV - echo "The changed modules are: $CHANGED_MODULES" + $CHANGED_MODULES += "samples " fi - if [ ${{ steps.changed-files-simulation.outputs.any_changed }} ]; then + if [ ${{ steps.changed-files-simulation.outputs.any_changed == 'true'}} ]; then echo "Detected simulation changes" - echo "CHANGED_MODULES=$CHANGED_MODULES simulation" >> $GITHUB_ENV - echo "The changed modules are: $CHANGED_MODULES" + $CHANGED_MODULES += "simulation " fi - if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} ]; then + if [ ${{ steps.changed-files-world-modeling.outputs.any_changed == 'true'}} ]; then echo "Detected world_modeling changes" - echo "CHANGED_MODULES=$CHANGED_MODULES world_modeling" >> $GITHUB_ENV - echo "The changed modules are: $CHANGED_MODULES" + $CHANGED_MODULES += "world_modeling" fi + echo "CHANGED_MODULES = $CHANGED_MODULES" >> $GITHUB_ENV + - name: Output list of changed modules id: output-changes run: | From 881feec009d910ae2856050d9e51589569363ec0 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:32:19 +0000 Subject: [PATCH 088/147] workflow changes --- .github/workflows/build_and_unitest.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index f116e2ee..fbfafec1 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -63,32 +63,32 @@ jobs: run: | if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then echo "Detected action changes" - $CHANGED_MODULES += "action " + CHANGED_MODULES += "action " fi if [ ${{ steps.changed-files-interfacing.outputs.any_changed == 'true'}} ]; then echo "Detected interfacing changes" - $CHANGED_MODULES += "interfacing " + CHANGED_MODULES += "interfacing " fi if [ ${{ steps.changed-files-perception.outputs.any_changed == 'true'}} ]; then echo "Detected perception changes" - $CHANGED_MODULES += "perception " + CHANGED_MODULES += "perception " fi if [ ${{ steps.changed-files-samples.outputs.any_changed == 'true'}} ]; then echo "Detected samples changes" - $CHANGED_MODULES += "samples " + CHANGED_MODULES += "samples " fi if [ ${{ steps.changed-files-simulation.outputs.any_changed == 'true'}} ]; then echo "Detected simulation changes" - $CHANGED_MODULES += "simulation " + CHANGED_MODULES += "simulation " fi if [ ${{ steps.changed-files-world-modeling.outputs.any_changed == 'true'}} ]; then echo "Detected world_modeling changes" - $CHANGED_MODULES += "world_modeling" + CHANGED_MODULES += "world_modeling" fi echo "CHANGED_MODULES = $CHANGED_MODULES" >> $GITHUB_ENV From 136118589c607705ad236217636a0af6be575475 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:34:37 +0000 Subject: [PATCH 089/147] workflow changes --- .github/workflows/build_and_unitest.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index fbfafec1..b699b4ad 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -63,35 +63,35 @@ jobs: run: | if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then echo "Detected action changes" - CHANGED_MODULES += "action " + CHANGED_MODULES+="action " fi if [ ${{ steps.changed-files-interfacing.outputs.any_changed == 'true'}} ]; then echo "Detected interfacing changes" - CHANGED_MODULES += "interfacing " + CHANGED_MODULES+="interfacing " fi if [ ${{ steps.changed-files-perception.outputs.any_changed == 'true'}} ]; then echo "Detected perception changes" - CHANGED_MODULES += "perception " + CHANGED_MODULES+="perception " fi if [ ${{ steps.changed-files-samples.outputs.any_changed == 'true'}} ]; then echo "Detected samples changes" - CHANGED_MODULES += "samples " + CHANGED_MODULES+="samples " fi if [ ${{ steps.changed-files-simulation.outputs.any_changed == 'true'}} ]; then echo "Detected simulation changes" - CHANGED_MODULES += "simulation " + CHANGED_MODULES+="simulation " fi if [ ${{ steps.changed-files-world-modeling.outputs.any_changed == 'true'}} ]; then echo "Detected world_modeling changes" - CHANGED_MODULES += "world_modeling" + CHANGED_MODULES+="world_modeling" fi - echo "CHANGED_MODULES = $CHANGED_MODULES" >> $GITHUB_ENV + echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV - name: Output list of changed modules id: output-changes From 178be8aada2f1f9b7d7915a256b4850063d3957a Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:43:46 +0000 Subject: [PATCH 090/147] workflow changes --- .github/workflows/build_and_unitest.yml | 1 + src/action/test.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 src/action/test.txt diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index b699b4ad..21210af9 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -60,6 +60,7 @@ jobs: - name: Create list of changed modules env: CHANGED_MODULES: "" + if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then echo "Detected action changes" diff --git a/src/action/test.txt b/src/action/test.txt deleted file mode 100644 index bf0d87ab..00000000 --- a/src/action/test.txt +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file From 3465f9ac32611ffd386afb21aa133c83ced037a0 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:44:51 +0000 Subject: [PATCH 091/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 21210af9..4d28c5ad 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -60,7 +60,7 @@ jobs: - name: Create list of changed modules env: CHANGED_MODULES: "" - if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} + # if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then echo "Detected action changes" From 97585a41543a499ad945a6a235583c380790125e Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:48:28 +0000 Subject: [PATCH 092/147] workflow changes --- .github/workflows/build_and_unitest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 4d28c5ad..87b0c091 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -62,6 +62,7 @@ jobs: CHANGED_MODULES: "" # if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | + echo "${{ steps.changed-files-action.outputs.any_changed == 'true'" if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then echo "Detected action changes" CHANGED_MODULES+="action " From 22ca0597bae402a3d95ff8a87e67ed1e2bd652be Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:49:52 +0000 Subject: [PATCH 093/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 87b0c091..5bdaf458 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -62,7 +62,7 @@ jobs: CHANGED_MODULES: "" # if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | - echo "${{ steps.changed-files-action.outputs.any_changed == 'true'" + echo ${{ steps.changed-files-action.outputs.any_changed == 'true' if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then echo "Detected action changes" CHANGED_MODULES+="action " From 4687becc6c319ce7e6f56cb6577a08bb6806b028 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:50:46 +0000 Subject: [PATCH 094/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 5bdaf458..6d685ce2 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -62,8 +62,8 @@ jobs: CHANGED_MODULES: "" # if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | - echo ${{ steps.changed-files-action.outputs.any_changed == 'true' if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then + echo ${{ steps.changed-files-action.outputs.any_changed == 'true' echo "Detected action changes" CHANGED_MODULES+="action " fi From 26db2a214795647b2ad10967ef3fbc4f27d95f8c Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:51:47 +0000 Subject: [PATCH 095/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 6d685ce2..fdf5ce19 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -63,7 +63,7 @@ jobs: # if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then - echo ${{ steps.changed-files-action.outputs.any_changed == 'true' + echo "${{ steps.changed-files-action.outputs.any_changed }}" echo "Detected action changes" CHANGED_MODULES+="action " fi From fbe38a5149ca9e44727b430237293f48936dabaf Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:53:14 +0000 Subject: [PATCH 096/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index fdf5ce19..a0486517 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -62,7 +62,7 @@ jobs: CHANGED_MODULES: "" # if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | - if [ ${{ steps.changed-files-action.outputs.any_changed == 'true' }} ]; then + if [ ${{ steps.changed-files-action.outputs.any_changed == true }} ]; then echo "${{ steps.changed-files-action.outputs.any_changed }}" echo "Detected action changes" CHANGED_MODULES+="action " From d0ed0a959d3308a7447739b3193f0488f09e0b47 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 01:54:38 +0000 Subject: [PATCH 097/147] workflow changes --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index a0486517..a712a0f8 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -62,7 +62,7 @@ jobs: CHANGED_MODULES: "" # if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | - if [ ${{ steps.changed-files-action.outputs.any_changed == true }} ]; then + if [ ${{ steps.changed-files-action.outputs.any_changed = 'true' }} ]; then echo "${{ steps.changed-files-action.outputs.any_changed }}" echo "Detected action changes" CHANGED_MODULES+="action " From b3212b75dbfc3352821ef8e71512ad9a94a2b856 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:00:51 +0000 Subject: [PATCH 098/147] workflow changes --- .github/workflows/build_and_unitest.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index a712a0f8..03f792b5 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -60,35 +60,33 @@ jobs: - name: Create list of changed modules env: CHANGED_MODULES: "" - # if: ${{ steps.changed-files-action.outputs.any_changed == 'true' }} run: | - if [ ${{ steps.changed-files-action.outputs.any_changed = 'true' }} ]; then - echo "${{ steps.changed-files-action.outputs.any_changed }}" + if [ ${{ steps.changed-files-action.outputs.any_changed }} == 'true' ]; then echo "Detected action changes" CHANGED_MODULES+="action " fi - if [ ${{ steps.changed-files-interfacing.outputs.any_changed == 'true'}} ]; then + if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} == 'true' ]; then echo "Detected interfacing changes" CHANGED_MODULES+="interfacing " fi - if [ ${{ steps.changed-files-perception.outputs.any_changed == 'true'}} ]; then + if [ ${{ steps.changed-files-perception.outputs.any_changed }} == 'true' ]; then echo "Detected perception changes" CHANGED_MODULES+="perception " fi - if [ ${{ steps.changed-files-samples.outputs.any_changed == 'true'}} ]; then + if [ ${{ steps.changed-files-samples.outputs.any_changed }} == 'true' ]; then echo "Detected samples changes" CHANGED_MODULES+="samples " fi - if [ ${{ steps.changed-files-simulation.outputs.any_changed == 'true'}} ]; then + if [ ${{ steps.changed-files-simulation.outputs.any_changed }} == 'true' ]; then echo "Detected simulation changes" CHANGED_MODULES+="simulation " fi - if [ ${{ steps.changed-files-world-modeling.outputs.any_changed == 'true'}} ]; then + if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; then echo "Detected world_modeling changes" CHANGED_MODULES+="world_modeling" fi From 86b07684f7b278033dd32c48a2bdb537bd455fe7 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:04:21 +0000 Subject: [PATCH 099/147] workflow changes --- .github/templates/docker_context/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index 31320ee3..9c10702e 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -23,5 +23,5 @@ runs: - id: environment-generator env: MODIFIED_MODULES: ${{ inputs.modified_modules }} - run: ${{ github.action_path }}/docker_context.sh $MODIFIED_MODULES + run: ${{ github.action_path }}/docker_context.sh "$MODIFIED_MODULES" shell: bash From 3b920512eb3fd0a799d519d0ef3db1272fdf42c6 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:21:25 +0000 Subject: [PATCH 100/147] workflow changes --- .../templates/check_src_changes/action.yml | 87 ++++++++++++++- .github/templates/docker_context/action.yml | 2 +- .github/workflows/build_and_unitest.yml | 105 ++---------------- 3 files changed, 90 insertions(+), 104 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 2d12e7f0..3fe0cd1a 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -2,13 +2,90 @@ name: Check source file changes outputs: modified_modules: - description: "Space delimited list of changed modules" + description: "Space deliminated list of modified modules" value: ${{ steps.output-changes.outputs.modified_modules }} runs: using: "composite" steps: - - id: environment-generator - env: MODIFIED_MODULES: ${{ inputs.modified_modules }} - run: ${{ github.action_path }}/docker_context.sh $MODIFIED_MODULES - shell: bash \ No newline at end of file + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Find changed files inside action folder + id: changed-files-action + uses: tj-actions/changed-files@v42 + with: + files: src/action/** + + - name: Get changed files inside interfacing folder + id: changed-files-interfacing + uses: tj-actions/changed-files@v42 + with: + files: src/interfacing/** + + - name: Get changed files inside perception folder + id: changed-files-perception + uses: tj-actions/changed-files@v42 + with: + files: src/perception/** + + - name: Get changed files inside samples folder + id: changed-files-samples + uses: tj-actions/changed-files@v42 + with: + files: src/samples/** + + - name: Get changed files inside simulation folder + id: changed-files-simulation + uses: tj-actions/changed-files@v42 + with: + files: src/simulation/** + + - name: Get changed files inside world_modeling folder + id: changed-files-world-modeling + uses: tj-actions/changed-files@v42 + with: + files: src/world_modeling/** + + - name: Create list of changed modules + env: + CHANGED_MODULES: "" + run: | + if [ ${{ steps.changed-files-action.outputs.any_changed }} == 'true' ]; then + echo "Detected action changes" + CHANGED_MODULES+="action " + fi + + if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} == 'true' ]; then + echo "Detected interfacing changes" + CHANGED_MODULES+="interfacing " + fi + + if [ ${{ steps.changed-files-perception.outputs.any_changed }} == 'true' ]; then + echo "Detected perception changes" + CHANGED_MODULES+="perception " + fi + + if [ ${{ steps.changed-files-samples.outputs.any_changed }} == 'true' ]; then + echo "Detected samples changes" + CHANGED_MODULES+="samples " + fi + + if [ ${{ steps.changed-files-simulation.outputs.any_changed }} == 'true' ]; then + echo "Detected simulation changes" + CHANGED_MODULES+="simulation " + fi + + if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; then + echo "Detected world_modeling changes" + CHANGED_MODULES+="world_modeling" + fi + + echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV + + - name: Output list of changed modules + id: output-changes + run: | + echo "The changed modules are: $CHANGED_MODULES" + echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index 9c10702e..030206f1 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -2,7 +2,7 @@ name: Generate Docker Environment inputs: modified_modules: - description: 'Space deliminated list of modified modules' + description: "Space deliminated list of modified modules" required: true default: '' diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 03f792b5..10d9db33 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -9,103 +9,9 @@ on: - main jobs: - get_changed_modules: - runs-on: ubuntu-latest - name: Get changed modules - - outputs: - modified_modules: ${{ steps.output-changes.outputs.modified_modules }} - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. - - - name: Find changed files inside action folder - id: changed-files-action - uses: tj-actions/changed-files@v42 - with: - files: src/action/** - - - name: Get changed files inside interfacing folder - id: changed-files-interfacing - uses: tj-actions/changed-files@v42 - with: - files: src/interfacing/** - - - name: Get changed files inside perception folder - id: changed-files-perception - uses: tj-actions/changed-files@v42 - with: - files: src/perception/** - - - name: Get changed files inside samples folder - id: changed-files-samples - uses: tj-actions/changed-files@v42 - with: - files: src/samples/** - - - name: Get changed files inside simulation folder - id: changed-files-simulation - uses: tj-actions/changed-files@v42 - with: - files: src/simulation/** - - - name: Get changed files inside world_modeling folder - id: changed-files-world-modeling - uses: tj-actions/changed-files@v42 - with: - files: src/world_modeling/** - - - name: Create list of changed modules - env: - CHANGED_MODULES: "" - run: | - if [ ${{ steps.changed-files-action.outputs.any_changed }} == 'true' ]; then - echo "Detected action changes" - CHANGED_MODULES+="action " - fi - - if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} == 'true' ]; then - echo "Detected interfacing changes" - CHANGED_MODULES+="interfacing " - fi - - if [ ${{ steps.changed-files-perception.outputs.any_changed }} == 'true' ]; then - echo "Detected perception changes" - CHANGED_MODULES+="perception " - fi - - if [ ${{ steps.changed-files-samples.outputs.any_changed }} == 'true' ]; then - echo "Detected samples changes" - CHANGED_MODULES+="samples " - fi - - if [ ${{ steps.changed-files-simulation.outputs.any_changed }} == 'true' ]; then - echo "Detected simulation changes" - CHANGED_MODULES+="simulation " - fi - - if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; then - echo "Detected world_modeling changes" - CHANGED_MODULES+="world_modeling" - fi - - echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV - - - name: Output list of changed modules - id: output-changes - run: | - echo "The changed modules are: $CHANGED_MODULES" - echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT - setup-environment: name: Setup environment runs-on: ubuntu-latest - needs: get_changed_modules - - env: - modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} outputs: docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} @@ -118,18 +24,21 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 + - name: Get Module Changes + id: get-module-changes + uses: "./.github/templates/check_src_changes" + - name: Setup Watod Environment run: ./watod_scripts/watod-setup-env.sh shell: bash - - name: Check module changes - run: echo "changed is ${{ env.modified_modules }}" - - name: Generate Docker Environment id: docker-environment + env: + MODIFIED_MODULES: ${{ steps.get-module-changes.outputs.modified_modules }} uses: "./.github/templates/docker_context" with: - modified_modules: ${{ env.modified_modules }} + modified_modules: ${{ env.MODIFIED_MODULES }} - name: Generate GitHub Environment id: github-environment From 56f336bd28edf268f36b61b81274e84f04914cc9 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:23:54 +0000 Subject: [PATCH 101/147] workflow changes --- .../templates/check_src_changes/action.yml | 136 +++++++++--------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 3fe0cd1a..2a4ecdb5 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -12,80 +12,80 @@ runs: with: fetch-depth: 0 - - name: Find changed files inside action folder - id: changed-files-action - uses: tj-actions/changed-files@v42 - with: - files: src/action/** - - - name: Get changed files inside interfacing folder - id: changed-files-interfacing - uses: tj-actions/changed-files@v42 - with: - files: src/interfacing/** + - name: Find changed files inside action folder + id: changed-files-action + uses: tj-actions/changed-files@v42 + with: + files: src/action/** - - name: Get changed files inside perception folder - id: changed-files-perception - uses: tj-actions/changed-files@v42 - with: - files: src/perception/** - - - name: Get changed files inside samples folder - id: changed-files-samples - uses: tj-actions/changed-files@v42 - with: - files: src/samples/** - - - name: Get changed files inside simulation folder - id: changed-files-simulation - uses: tj-actions/changed-files@v42 - with: - files: src/simulation/** - - - name: Get changed files inside world_modeling folder - id: changed-files-world-modeling - uses: tj-actions/changed-files@v42 - with: - files: src/world_modeling/** + - name: Get changed files inside interfacing folder + id: changed-files-interfacing + uses: tj-actions/changed-files@v42 + with: + files: src/interfacing/** + + - name: Get changed files inside perception folder + id: changed-files-perception + uses: tj-actions/changed-files@v42 + with: + files: src/perception/** + + - name: Get changed files inside samples folder + id: changed-files-samples + uses: tj-actions/changed-files@v42 + with: + files: src/samples/** + + - name: Get changed files inside simulation folder + id: changed-files-simulation + uses: tj-actions/changed-files@v42 + with: + files: src/simulation/** + + - name: Get changed files inside world_modeling folder + id: changed-files-world-modeling + uses: tj-actions/changed-files@v42 + with: + files: src/world_modeling/** - - name: Create list of changed modules - env: - CHANGED_MODULES: "" - run: | - if [ ${{ steps.changed-files-action.outputs.any_changed }} == 'true' ]; then - echo "Detected action changes" - CHANGED_MODULES+="action " - fi + - name: Create list of changed modules + env: + CHANGED_MODULES: "" + run: | + if [ ${{ steps.changed-files-action.outputs.any_changed }} == 'true' ]; then + echo "Detected action changes" + CHANGED_MODULES+="action " + fi - if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} == 'true' ]; then - echo "Detected interfacing changes" - CHANGED_MODULES+="interfacing " - fi + if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} == 'true' ]; then + echo "Detected interfacing changes" + CHANGED_MODULES+="interfacing " + fi - if [ ${{ steps.changed-files-perception.outputs.any_changed }} == 'true' ]; then - echo "Detected perception changes" - CHANGED_MODULES+="perception " - fi + if [ ${{ steps.changed-files-perception.outputs.any_changed }} == 'true' ]; then + echo "Detected perception changes" + CHANGED_MODULES+="perception " + fi - if [ ${{ steps.changed-files-samples.outputs.any_changed }} == 'true' ]; then - echo "Detected samples changes" - CHANGED_MODULES+="samples " - fi + if [ ${{ steps.changed-files-samples.outputs.any_changed }} == 'true' ]; then + echo "Detected samples changes" + CHANGED_MODULES+="samples " + fi - if [ ${{ steps.changed-files-simulation.outputs.any_changed }} == 'true' ]; then - echo "Detected simulation changes" - CHANGED_MODULES+="simulation " - fi + if [ ${{ steps.changed-files-simulation.outputs.any_changed }} == 'true' ]; then + echo "Detected simulation changes" + CHANGED_MODULES+="simulation " + fi - if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; then - echo "Detected world_modeling changes" - CHANGED_MODULES+="world_modeling" - fi + if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; then + echo "Detected world_modeling changes" + CHANGED_MODULES+="world_modeling" + fi - echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV + echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV - - name: Output list of changed modules - id: output-changes - run: | - echo "The changed modules are: $CHANGED_MODULES" - echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file + - name: Output list of changed modules + id: output-changes + run: | + echo "The changed modules are: $CHANGED_MODULES" + echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file From 8976fe2c58a9decae8fa57a2f7709b454a1a966d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:26:44 +0000 Subject: [PATCH 102/147] workflow changes --- .github/templates/check_src_changes/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 2a4ecdb5..88c4ea9a 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -9,8 +9,8 @@ runs: using: "composite" steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 + with: + fetch-depth: 0 - name: Find changed files inside action folder id: changed-files-action From 41ac51fa5c02c0d9fb9814b0b5997fe62ade1c1a Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:27:48 +0000 Subject: [PATCH 103/147] workflow changes --- .github/templates/check_src_changes/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 88c4ea9a..0beaf5db 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -83,9 +83,11 @@ runs: fi echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV + shell: bash - name: Output list of changed modules id: output-changes run: | echo "The changed modules are: $CHANGED_MODULES" - echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file + echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT + shell: bash \ No newline at end of file From 254574d1ca6b157b165975265edc50930fb25c89 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:46:04 +0000 Subject: [PATCH 104/147] Ending job added --- .github/workflows/build_and_unitest.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 10d9db33..8edb1ca7 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -141,3 +141,12 @@ jobs: with: image: ${{ steps.construct-registry-url.outputs.url }} tag: build_${{ env.SOURCE_BRANCH }} + + confirm-build-and-unittest-complete: + name: Confirm Build and Unit Tests Completed + needs: build-and-unittest + runs-on: ubuntu-latest + + runs: + echo "All builds and unit tests completed!" + From 947e7de8acc6a0f98082e42f016d63ff659a9ed0 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:46:53 +0000 Subject: [PATCH 105/147] Ending job added --- .github/workflows/build_and_unitest.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 8edb1ca7..4d59a538 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -146,7 +146,8 @@ jobs: name: Confirm Build and Unit Tests Completed needs: build-and-unittest runs-on: ubuntu-latest - - runs: - echo "All builds and unit tests completed!" + steps: + - name: Ending + runs: + echo "All builds and unit tests completed!" From be1ee79223afe42933804faf2a46258c3e0e5275 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 02:47:09 +0000 Subject: [PATCH 106/147] Ending job added --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 4d59a538..e8ea3ae1 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -148,6 +148,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Ending - runs: + run: echo "All builds and unit tests completed!" From 283172f34f09720951c8ad1cb01e89429fa17e9d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 20:21:01 +0000 Subject: [PATCH 107/147] Created check_src_changes.sh --- .../templates/check_src_changes/action.yml | 33 +------------- .../check_src_changes/check_src_changes.sh | 45 +++++++++++++++++++ .github/templates/docker_context/action.yml | 2 +- .../docker_context/docker_context.sh | 6 +-- .github/workflows/build_and_unitest.yml | 4 +- 5 files changed, 51 insertions(+), 39 deletions(-) create mode 100644 .github/templates/check_src_changes/check_src_changes.sh diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 0beaf5db..ffd4699b 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -51,38 +51,7 @@ runs: - name: Create list of changed modules env: CHANGED_MODULES: "" - run: | - if [ ${{ steps.changed-files-action.outputs.any_changed }} == 'true' ]; then - echo "Detected action changes" - CHANGED_MODULES+="action " - fi - - if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} == 'true' ]; then - echo "Detected interfacing changes" - CHANGED_MODULES+="interfacing " - fi - - if [ ${{ steps.changed-files-perception.outputs.any_changed }} == 'true' ]; then - echo "Detected perception changes" - CHANGED_MODULES+="perception " - fi - - if [ ${{ steps.changed-files-samples.outputs.any_changed }} == 'true' ]; then - echo "Detected samples changes" - CHANGED_MODULES+="samples " - fi - - if [ ${{ steps.changed-files-simulation.outputs.any_changed }} == 'true' ]; then - echo "Detected simulation changes" - CHANGED_MODULES+="simulation " - fi - - if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; then - echo "Detected world_modeling changes" - CHANGED_MODULES+="world_modeling" - fi - - echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV + run: check_src_changes.sh shell: bash - name: Output list of changed modules diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh new file mode 100644 index 00000000..b44baaf3 --- /dev/null +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -0,0 +1,45 @@ +#!/bin/bash +set -e + +################# Create a space delimited list of modified modules ################# +# Outputs a list of modified modules by comparing changes between main and current commit +# References previous GitHub workflow steps + +# Action +if [ ${{ steps.changed-files-action.outputs.any_changed }} == 'true' ]; then + echo "Detected action changes" + CHANGED_MODULES+="action " +fi + +# Interfacing +if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} == 'true' ]; then + echo "Detected interfacing changes" + CHANGED_MODULES+="interfacing " +fi + +# Perception +if [ ${{ steps.changed-files-perception.outputs.any_changed }} == 'true' ]; then + echo "Detected perception changes" + CHANGED_MODULES+="perception " +fi + +# Samples +if [ ${{ steps.changed-files-samples.outputs.any_changed }} == 'true' ]; then + echo "Detected samples changes" + CHANGED_MODULES+="samples " +fi + +# Simulation +if [ ${{ steps.changed-files-simulation.outputs.any_changed }} == 'true' ]; then + echo "Detected simulation changes" + CHANGED_MODULES+="simulation " +fi + +# World-modeling +if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; then + echo "Detected world_modeling changes" + CHANGED_MODULES+="world_modeling" +fi + +# Output list +echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/templates/docker_context/action.yml b/.github/templates/docker_context/action.yml index 030206f1..87bfd0e7 100644 --- a/.github/templates/docker_context/action.yml +++ b/.github/templates/docker_context/action.yml @@ -23,5 +23,5 @@ runs: - id: environment-generator env: MODIFIED_MODULES: ${{ inputs.modified_modules }} - run: ${{ github.action_path }}/docker_context.sh "$MODIFIED_MODULES" + run: ${{ github.action_path }}/docker_context.sh shell: bash diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 8963da4e..6a8ba1ba 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -11,7 +11,7 @@ modules=$(find modules -maxdepth 1 -name "docker-compose*") # Initialize an empty array for JSON objects json_objects=() -echo "::notice:: Incoming modified modules are $1" +echo "::notice:: Incoming modified modules are $MODIFIED_MODULES" # Loop through each module while read -r module; do @@ -21,8 +21,8 @@ while read -r module; do module_out=$(echo "$module" | sed -n 's/modules\/docker-compose\.\(.*\)\.yaml/\1/p') # Only work with modules that are modified - if [[ $1 != *$module_out* ]]; then - if [[ "$1" = "" || $1 = " " ]]; then + if [[ $MODIFIED_MODULES != *$module_out* ]]; then + if [[ "$MODIFIED_MODULES" = "" || $MODIFIED_MODULES = " " ]]; then echo "::notice:: No source code modified, testing all modules for possible infra changes" else continue diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index e8ea3ae1..7979bc3e 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -34,11 +34,9 @@ jobs: - name: Generate Docker Environment id: docker-environment - env: - MODIFIED_MODULES: ${{ steps.get-module-changes.outputs.modified_modules }} uses: "./.github/templates/docker_context" with: - modified_modules: ${{ env.MODIFIED_MODULES }} + modified_modules: ${{ steps.get-module-changes.outputs.modified_modules }} - name: Generate GitHub Environment id: github-environment From 3f9f2a4ac1eb5cce717b6fd04fd696d2aceabaf1 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 20:23:04 +0000 Subject: [PATCH 108/147] Workflow typo --- .github/templates/check_src_changes/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index ffd4699b..2de0b417 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -51,7 +51,7 @@ runs: - name: Create list of changed modules env: CHANGED_MODULES: "" - run: check_src_changes.sh + run: ${{ github.action_path }}/check_src_changes.sh shell: bash - name: Output list of changed modules From 834d010f86de32fe329a2c6230a4e00bc47c2f9c Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 20:29:17 +0000 Subject: [PATCH 109/147] Enable permission to run new .sh file --- .github/templates/check_src_changes/check_src_changes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 .github/templates/check_src_changes/check_src_changes.sh diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh old mode 100644 new mode 100755 index b44baaf3..aa3d71f1 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -42,4 +42,4 @@ if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; fi # Output list -echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV \ No newline at end of file +echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file From a59a0cd9305d805a517e366b1dcdf4cfd7a6d4f4 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 20:42:50 +0000 Subject: [PATCH 110/147] Workflow .sh changes --- .github/templates/check_src_changes/action.yml | 15 +++++++-------- .../check_src_changes/check_src_changes.sh | 12 ++++++------ 2 files changed, 13 insertions(+), 14 deletions(-) mode change 100755 => 100644 .github/templates/check_src_changes/check_src_changes.sh diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 2de0b417..45a62814 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -50,13 +50,12 @@ runs: - name: Create list of changed modules env: - CHANGED_MODULES: "" - run: ${{ github.action_path }}/check_src_changes.sh - shell: bash + ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} + INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} + PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} + SAMPLES_CHANGED: ${{ steps.changed-files-samples.outputs.any_changed }} + SIMULATION_CHANGED: ${{ steps.changed-files-simulation.outputs.any_changed }} + WORLD_MODELING_CHANGED: ${{ steps.changed-files-world-modeling.outputs.any_changed }} - - name: Output list of changed modules - id: output-changes - run: | - echo "The changed modules are: $CHANGED_MODULES" - echo "modified_modules=$CHANGED_MODULES" >> $GITHUB_OUTPUT + run: ${{ github.action_path }}/check_src_changes.sh shell: bash \ No newline at end of file diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh old mode 100755 new mode 100644 index aa3d71f1..45868b57 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -6,37 +6,37 @@ set -e # References previous GitHub workflow steps # Action -if [ ${{ steps.changed-files-action.outputs.any_changed }} == 'true' ]; then +if [ $ACTION_CHANGED == 'true' ]; then echo "Detected action changes" CHANGED_MODULES+="action " fi # Interfacing -if [ ${{ steps.changed-files-interfacing.outputs.any_changed }} == 'true' ]; then +if [ $INTERFACING_CHANGED == 'true' ]; then echo "Detected interfacing changes" CHANGED_MODULES+="interfacing " fi # Perception -if [ ${{ steps.changed-files-perception.outputs.any_changed }} == 'true' ]; then +if [ $PERCEPTION_CHANGED == 'true' ]; then echo "Detected perception changes" CHANGED_MODULES+="perception " fi # Samples -if [ ${{ steps.changed-files-samples.outputs.any_changed }} == 'true' ]; then +if [ $SAMPLES_CHANGED == 'true' ]; then echo "Detected samples changes" CHANGED_MODULES+="samples " fi # Simulation -if [ ${{ steps.changed-files-simulation.outputs.any_changed }} == 'true' ]; then +if [ $SIMULATION_CHANGED == 'true' ]; then echo "Detected simulation changes" CHANGED_MODULES+="simulation " fi # World-modeling -if [ ${{ steps.changed-files-world-modeling.outputs.any_changed }} == 'true' ]; then +if [ $WORLD_MODELING_CHANGED == 'true' ]; then echo "Detected world_modeling changes" CHANGED_MODULES+="world_modeling" fi From 3cb6ed6911bb7cc51f0df5e53610023e38494e55 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 20:51:53 +0000 Subject: [PATCH 111/147] checking pipeline --- src/interfacing/test2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index bf0d87ab..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -4 \ No newline at end of file +1 \ No newline at end of file From afe3ec4c1c6b80a179bd2a4cc204bfd55b77d4a4 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sat, 10 Feb 2024 20:56:28 +0000 Subject: [PATCH 112/147] checking pipeline --- src/interfacing/test2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index 56a6051c..d8263ee9 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -1 \ No newline at end of file +2 \ No newline at end of file From f9add1331e230e6da45beeb64cecf13869433b26 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:12:23 +0000 Subject: [PATCH 113/147] Testing workflow --- .github/templates/check_src_changes/check_src_changes.sh | 0 src/interfacing/test2.txt | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 .github/templates/check_src_changes/check_src_changes.sh diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh old mode 100644 new mode 100755 diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index d8263ee9..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -2 \ No newline at end of file +1 \ No newline at end of file From a5fd026beff0eb0a38786eaad8417828b5ba780f Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:18:15 +0000 Subject: [PATCH 114/147] Testing workflow --- .github/templates/check_src_changes/check_src_changes.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh index 45868b57..c7fa1533 100755 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -42,4 +42,5 @@ if [ $WORLD_MODELING_CHANGED == 'true' ]; then fi # Output list +echo "::notice:: CHANGED_MODULES is $CHANGED_MODULES" echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file From e23dc9007c7fbe5fd9c401ed59dac56b9c9c4159 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:21:12 +0000 Subject: [PATCH 115/147] Testing workflow --- .github/templates/check_src_changes/action.yml | 2 +- .../check_src_changes/check_src_changes.sh | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 45a62814..d09c0043 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -3,7 +3,7 @@ name: Check source file changes outputs: modified_modules: description: "Space deliminated list of modified modules" - value: ${{ steps.output-changes.outputs.modified_modules }} + value: ${{ steps.output-changes.outputs.MODIFIED_MODULES }} runs: using: "composite" diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh index c7fa1533..1b9965f0 100755 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -8,39 +8,39 @@ set -e # Action if [ $ACTION_CHANGED == 'true' ]; then echo "Detected action changes" - CHANGED_MODULES+="action " + MODIFIED_MODULES+="action " fi # Interfacing if [ $INTERFACING_CHANGED == 'true' ]; then echo "Detected interfacing changes" - CHANGED_MODULES+="interfacing " + MODIFIED_MODULES+="interfacing " fi # Perception if [ $PERCEPTION_CHANGED == 'true' ]; then echo "Detected perception changes" - CHANGED_MODULES+="perception " + MODIFIED_MODULES+="perception " fi # Samples if [ $SAMPLES_CHANGED == 'true' ]; then echo "Detected samples changes" - CHANGED_MODULES+="samples " + MODIFIED_MODULES+="samples " fi # Simulation if [ $SIMULATION_CHANGED == 'true' ]; then echo "Detected simulation changes" - CHANGED_MODULES+="simulation " + MODIFIED_MODULES+="simulation " fi # World-modeling if [ $WORLD_MODELING_CHANGED == 'true' ]; then echo "Detected world_modeling changes" - CHANGED_MODULES+="world_modeling" + MODIFIED_MODULES+="world_modeling" fi # Output list -echo "::notice:: CHANGED_MODULES is $CHANGED_MODULES" -echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file +echo "::notice:: MODIFIED_MODULES are $MODIFIED_MODULES" +echo "MODIFIED_MODULES=$MODIFIED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file From 3853ad8a944405d73a7df724a5102cedafe3c355 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:26:05 +0000 Subject: [PATCH 116/147] Testing workflow --- .github/templates/check_src_changes/check_src_changes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh index 1b9965f0..e079a8eb 100755 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -43,4 +43,4 @@ fi # Output list echo "::notice:: MODIFIED_MODULES are $MODIFIED_MODULES" -echo "MODIFIED_MODULES=$MODIFIED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file +echo "modified_modules=$MODIFIED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file From 2fdab6afc282bd8c67e93709d7b984748170fbb2 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:28:56 +0000 Subject: [PATCH 117/147] Testing workflow --- .github/templates/check_src_changes/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index d09c0043..45a62814 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -3,7 +3,7 @@ name: Check source file changes outputs: modified_modules: description: "Space deliminated list of modified modules" - value: ${{ steps.output-changes.outputs.MODIFIED_MODULES }} + value: ${{ steps.output-changes.outputs.modified_modules }} runs: using: "composite" From 7c374ebb23dd5f2f7a1cbf866f8ffe4830f70589 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:31:05 +0000 Subject: [PATCH 118/147] Testing workflow --- .github/templates/check_src_changes/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 45a62814..5fdf6590 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -58,4 +58,7 @@ runs: WORLD_MODELING_CHANGED: ${{ steps.changed-files-world-modeling.outputs.any_changed }} run: ${{ github.action_path }}/check_src_changes.sh - shell: bash \ No newline at end of file + shell: bash + + - name: Sanity check + run: echo ${{ steps.output-changes.outputs.modified_modules }} \ No newline at end of file From 115367b17bfb873e636d112b9cb367c6a2dc670f Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:33:25 +0000 Subject: [PATCH 119/147] Testing workflow --- .github/templates/check_src_changes/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 5fdf6590..e809bcb6 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -61,4 +61,5 @@ runs: shell: bash - name: Sanity check - run: echo ${{ steps.output-changes.outputs.modified_modules }} \ No newline at end of file + run: echo ${{ steps.output-changes.outputs.modified_modules }} + shell: bash \ No newline at end of file From a0a743dd18983fdf0e7f71e5fec56dae71f08956 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:35:42 +0000 Subject: [PATCH 120/147] Testing workflow --- .github/templates/check_src_changes/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index e809bcb6..e634159c 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -49,6 +49,7 @@ runs: files: src/world_modeling/** - name: Create list of changed modules + id: output-changes env: ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} @@ -61,5 +62,5 @@ runs: shell: bash - name: Sanity check - run: echo ${{ steps.output-changes.outputs.modified_modules }} + run: echo "sus ${{ steps.output-changes.outputs.modified_modules }}" shell: bash \ No newline at end of file From 29101f10b0ca94872bff8737b224c1096ddc51ae Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:48:03 +0000 Subject: [PATCH 121/147] Update docker_context.sh --- .github/templates/check_src_changes/action.yml | 4 ---- .github/templates/docker_context/docker_context.sh | 12 ++++++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index e634159c..d00214b6 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -59,8 +59,4 @@ runs: WORLD_MODELING_CHANGED: ${{ steps.changed-files-world-modeling.outputs.any_changed }} run: ${{ github.action_path }}/check_src_changes.sh - shell: bash - - - name: Sanity check - run: echo "sus ${{ steps.output-changes.outputs.modified_modules }}" shell: bash \ No newline at end of file diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 6a8ba1ba..e8feffd9 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -11,7 +11,14 @@ modules=$(find modules -maxdepth 1 -name "docker-compose*") # Initialize an empty array for JSON objects json_objects=() +# Test echo "::notice:: Incoming modified modules are $MODIFIED_MODULES" +CHANGES_DETECTED=false +if [[ "$MODIFIED_MODULES" = "" || $MODIFIED_MODULES = " " ]]; then + echo "::notice:: No source code modified, testing all modules for possible infra changes" +else + CHANGES_DETECTED=true +fi # Loop through each module while read -r module; do @@ -21,10 +28,7 @@ while read -r module; do module_out=$(echo "$module" | sed -n 's/modules\/docker-compose\.\(.*\)\.yaml/\1/p') # Only work with modules that are modified - if [[ $MODIFIED_MODULES != *$module_out* ]]; then - if [[ "$MODIFIED_MODULES" = "" || $MODIFIED_MODULES = " " ]]; then - echo "::notice:: No source code modified, testing all modules for possible infra changes" - else + if [[ $MODIFIED_MODULES != *$module_out* && $CHANGES_DETECTED = "true" ]]; then continue fi fi From c129364e8e096510fae9321de612aea426891fba Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:49:32 +0000 Subject: [PATCH 122/147] Update docker_context.sh --- .github/templates/docker_context/docker_context.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index e8feffd9..3f754350 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -11,7 +11,7 @@ modules=$(find modules -maxdepth 1 -name "docker-compose*") # Initialize an empty array for JSON objects json_objects=() -# Test +# Check MODIFIED_MODULES list, if empty run all unit-tests echo "::notice:: Incoming modified modules are $MODIFIED_MODULES" CHANGES_DETECTED=false if [[ "$MODIFIED_MODULES" = "" || $MODIFIED_MODULES = " " ]]; then @@ -29,8 +29,7 @@ while read -r module; do # Only work with modules that are modified if [[ $MODIFIED_MODULES != *$module_out* && $CHANGES_DETECTED = "true" ]]; then - continue - fi + continue fi # Loop through each service From 384b061b1c1196a2840ed9ae9ae43d0ec51b9bd4 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 14:57:55 +0000 Subject: [PATCH 123/147] Added notice to echo last job --- .github/workflows/build_and_unitest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 7979bc3e..5f0c70dd 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -147,5 +147,5 @@ jobs: steps: - name: Ending run: - echo "All builds and unit tests completed!" + echo "::notice:: All builds and unit tests completed!" From 5aeee25a0aa28f3aeedf29855581dabd2735dae0 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 23:00:05 +0000 Subject: [PATCH 124/147] Added notice to echo last job --- .github/workflows/build_and_unitest.yml | 3 +-- watod-config.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 5f0c70dd..3d47e0b1 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -146,6 +146,5 @@ jobs: runs-on: ubuntu-latest steps: - name: Ending - run: - echo "::notice:: All builds and unit tests completed!" + run: echo "::notice:: All builds and unit tests completed!" diff --git a/watod-config.sh b/watod-config.sh index 637c1624..d8ce0416 100755 --- a/watod-config.sh +++ b/watod-config.sh @@ -12,7 +12,7 @@ ## - simulation : starts simulation ## - samples : starts sample ROS2 pubsub nodes -# ACTIVE_MODULES="" +ACTIVE_MODULES="samples" ############################## OPTIONAL CONFIGURATIONS ############################## ## Name to append to docker containers. DEFAULT = "" From 4fb211a452f0bed083344066d1baddd7ef27cd83 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Sun, 11 Feb 2024 23:00:36 +0000 Subject: [PATCH 125/147] Removed accidental watod-config changes --- watod-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watod-config.sh b/watod-config.sh index d8ce0416..637c1624 100755 --- a/watod-config.sh +++ b/watod-config.sh @@ -12,7 +12,7 @@ ## - simulation : starts simulation ## - samples : starts sample ROS2 pubsub nodes -ACTIVE_MODULES="samples" +# ACTIVE_MODULES="" ############################## OPTIONAL CONFIGURATIONS ############################## ## Name to append to docker containers. DEFAULT = "" From 3d7572e38232f0112d9f5f05c9a919f7f696789e Mon Sep 17 00:00:00 2001 From: Mark Do Date: Mon, 12 Feb 2024 01:29:50 +0000 Subject: [PATCH 126/147] Workflow typo --- .github/workflows/build_and_unitest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 3d47e0b1..46665e67 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -146,5 +146,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Ending - run: echo "::notice:: All builds and unit tests completed!" + run: | + echo "All builds and unit tests completed!" From a049c15a14dc8671d1ee22ff5bc66beec865bbdd Mon Sep 17 00:00:00 2001 From: Mark Do Date: Mon, 12 Feb 2024 01:35:42 +0000 Subject: [PATCH 127/147] Added notice to final workflow step --- .github/templates/docker_context/docker_context.sh | 1 - .github/workflows/build_and_unitest.yml | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 3f754350..8a94500e 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -12,7 +12,6 @@ modules=$(find modules -maxdepth 1 -name "docker-compose*") json_objects=() # Check MODIFIED_MODULES list, if empty run all unit-tests -echo "::notice:: Incoming modified modules are $MODIFIED_MODULES" CHANGES_DETECTED=false if [[ "$MODIFIED_MODULES" = "" || $MODIFIED_MODULES = " " ]]; then echo "::notice:: No source code modified, testing all modules for possible infra changes" diff --git a/.github/workflows/build_and_unitest.yml b/.github/workflows/build_and_unitest.yml index 46665e67..12ef538c 100644 --- a/.github/workflows/build_and_unitest.yml +++ b/.github/workflows/build_and_unitest.yml @@ -147,5 +147,4 @@ jobs: steps: - name: Ending run: | - echo "All builds and unit tests completed!" - + echo "::notice:: All builds and unit tests completed!" From b431849f576b37ea1ca794c9f000e725b458771d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 15:38:43 +0000 Subject: [PATCH 128/147] removed testing txt files --- src/interfacing/test2.txt | 1 - src/world_modeling/test3.txt | 1 - 2 files changed, 2 deletions(-) delete mode 100644 src/interfacing/test2.txt delete mode 100644 src/world_modeling/test3.txt diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt deleted file mode 100644 index 56a6051c..00000000 --- a/src/interfacing/test2.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/src/world_modeling/test3.txt b/src/world_modeling/test3.txt deleted file mode 100644 index d8263ee9..00000000 --- a/src/world_modeling/test3.txt +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file From e0269b63ec20d837cd82549c39c1ea952142860c Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 16:34:53 +0000 Subject: [PATCH 129/147] added infra checks --- .../templates/check_src_changes/action.yml | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index d00214b6..9e3360ff 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -11,46 +11,64 @@ runs: - uses: actions/checkout@v4 with: fetch-depth: 0 + + - name: Find changed files outside of src directory + id: changed-files-outside-src + uses: tj-actions/changed-files@v42 + with: + files: '!src/**' + + - name: Find changed files inside src/wato_msgs folder + id: changed-files-wato-msgs + uses: tj-actions/changed-files@v42 + with: + files: src/infrastructure/** - - name: Find changed files inside action folder + - name: Find changed files inside src/action folder id: changed-files-action uses: tj-actions/changed-files@v42 with: files: src/action/** - - name: Get changed files inside interfacing folder + - name: Get changed files inside src/interfacing folder id: changed-files-interfacing uses: tj-actions/changed-files@v42 with: files: src/interfacing/** - - name: Get changed files inside perception folder + - name: Get changed files inside src/perception folder id: changed-files-perception uses: tj-actions/changed-files@v42 with: files: src/perception/** - - name: Get changed files inside samples folder + - name: Get changed files inside src/samples folder id: changed-files-samples uses: tj-actions/changed-files@v42 with: files: src/samples/** - - name: Get changed files inside simulation folder + - name: Get changed files inside src/simulation folder id: changed-files-simulation uses: tj-actions/changed-files@v42 with: files: src/simulation/** - - name: Get changed files inside world_modeling folder + - name: Get changed files inside src/world_modeling folder id: changed-files-world-modeling uses: tj-actions/changed-files@v42 with: files: src/world_modeling/** + - name: Sanity + run: | + echo "outside: ${{ steps.changed-files-outside-src.outputs.any_changed }}" + echo "wato_msgs: ${{ steps.changed-files-wato-msgs.outputs.any_changed }}" + - name: Create list of changed modules id: output-changes env: + INFRASTRUCTURE_CHANGED: $ {{ steps.changed-files-wato-msgs.outputs.any_changed || steps.changed-files-outside-src.outputs.any_changed}} ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} From 92b483aff9f1bd0fc67a3e88d63ef37c06e83f11 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 16:36:48 +0000 Subject: [PATCH 130/147] fixed typo --- .github/templates/check_src_changes/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 9e3360ff..45db6bb4 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -64,6 +64,7 @@ runs: run: | echo "outside: ${{ steps.changed-files-outside-src.outputs.any_changed }}" echo "wato_msgs: ${{ steps.changed-files-wato-msgs.outputs.any_changed }}" + shell: bash - name: Create list of changed modules id: output-changes From f9addddb8dc5cbceab89533a2a2d7bb39d3e7460 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 16:48:58 +0000 Subject: [PATCH 131/147] added infra checks --- .github/templates/check_src_changes/action.yml | 2 +- .../templates/check_src_changes/check_src_changes.sh | 12 +++++++++++- .github/templates/docker_context/docker_context.sh | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 45db6bb4..3c62628c 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -22,7 +22,7 @@ runs: id: changed-files-wato-msgs uses: tj-actions/changed-files@v42 with: - files: src/infrastructure/** + files: src/wato-msgs/** - name: Find changed files inside src/action folder id: changed-files-action diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh index e079a8eb..130a2857 100755 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -5,6 +5,8 @@ set -e # Outputs a list of modified modules by comparing changes between main and current commit # References previous GitHub workflow steps + + # Action if [ $ACTION_CHANGED == 'true' ]; then echo "Detected action changes" @@ -41,6 +43,14 @@ if [ $WORLD_MODELING_CHANGED == 'true' ]; then MODIFIED_MODULES+="world_modeling" fi +# Infrastructure +if [$INFRASTRUCTURE_CHANGED == 'true']; then + echo "Detected infrastructure changes" + echo "::notice:: Detected infrastructure changes, testing entire repo" + MODIFIED_MODULES="infrastructure" +else + echo "::notice:: MODIFIED_MODULES are $MODIFIED_MODULES" +if + # Output list -echo "::notice:: MODIFIED_MODULES are $MODIFIED_MODULES" echo "modified_modules=$MODIFIED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 8a94500e..dadef163 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -11,10 +11,12 @@ modules=$(find modules -maxdepth 1 -name "docker-compose*") # Initialize an empty array for JSON objects json_objects=() -# Check MODIFIED_MODULES list, if empty run all unit-tests +# Check for infrastructure changes CHANGES_DETECTED=false -if [[ "$MODIFIED_MODULES" = "" || $MODIFIED_MODULES = " " ]]; then +if [[ $MODIFIED_MODULES = "" || $MODIFIED_MODULES = " " ]]; then echo "::notice:: No source code modified, testing all modules for possible infra changes" +else if [[ $MODIFIED_MODULES = "infrastructure" ]] + echo "::notice:: Infra changes detected, testing all modules" else CHANGES_DETECTED=true fi From 860cbfa62ac672116d64b5b4dc33fdbdc255ab85 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 16:49:23 +0000 Subject: [PATCH 132/147] txt add to wato_msgs --- src/wato_msgs/test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/wato_msgs/test.txt diff --git a/src/wato_msgs/test.txt b/src/wato_msgs/test.txt new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/src/wato_msgs/test.txt @@ -0,0 +1 @@ +1 \ No newline at end of file From be9d3c78ec50506aa5fbd7e26db10b4da991db97 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 16:51:28 +0000 Subject: [PATCH 133/147] typos --- .github/templates/check_src_changes/action.yml | 2 +- .github/templates/check_src_changes/check_src_changes.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 3c62628c..6fb818c2 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -22,7 +22,7 @@ runs: id: changed-files-wato-msgs uses: tj-actions/changed-files@v42 with: - files: src/wato-msgs/** + files: src/wato_msgs/** - name: Find changed files inside src/action folder id: changed-files-action diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh index 130a2857..ee0aad9f 100755 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -50,7 +50,7 @@ if [$INFRASTRUCTURE_CHANGED == 'true']; then MODIFIED_MODULES="infrastructure" else echo "::notice:: MODIFIED_MODULES are $MODIFIED_MODULES" -if +fi # Output list echo "modified_modules=$MODIFIED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file From 57002421ab27c48ae0ac51003025efa502629c88 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 16:53:55 +0000 Subject: [PATCH 134/147] bash moment --- .github/templates/docker_context/docker_context.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index dadef163..268127bd 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -15,7 +15,7 @@ json_objects=() CHANGES_DETECTED=false if [[ $MODIFIED_MODULES = "" || $MODIFIED_MODULES = " " ]]; then echo "::notice:: No source code modified, testing all modules for possible infra changes" -else if [[ $MODIFIED_MODULES = "infrastructure" ]] +elif [[ $MODIFIED_MODULES = "infrastructure" ]]; then echo "::notice:: Infra changes detected, testing all modules" else CHANGES_DETECTED=true From a372d7fa8587ab8c1c0f5962df7d1ceaf13ea36b Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 16:56:58 +0000 Subject: [PATCH 135/147] bash moment --- .github/templates/check_src_changes/action.yml | 3 ++- .github/templates/check_src_changes/check_src_changes.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 6fb818c2..bb8217b2 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -64,12 +64,13 @@ runs: run: | echo "outside: ${{ steps.changed-files-outside-src.outputs.any_changed }}" echo "wato_msgs: ${{ steps.changed-files-wato-msgs.outputs.any_changed }}" + echo "wato_msgs: ${{ steps.changed-files-wato-msgs.outputs.any_changed || steps.changed-files-outside-src.outputs.any_changed }}" shell: bash - name: Create list of changed modules id: output-changes env: - INFRASTRUCTURE_CHANGED: $ {{ steps.changed-files-wato-msgs.outputs.any_changed || steps.changed-files-outside-src.outputs.any_changed}} + INFRASTRUCTURE_CHANGED: ${{ steps.changed-files-wato-msgs.outputs.any_changed || steps.changed-files-outside-src.outputs.any_changed }} ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh index ee0aad9f..ae3891b3 100755 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -44,7 +44,7 @@ if [ $WORLD_MODELING_CHANGED == 'true' ]; then fi # Infrastructure -if [$INFRASTRUCTURE_CHANGED == 'true']; then +if [ $INFRASTRUCTURE_CHANGED == 'true' ]; then echo "Detected infrastructure changes" echo "::notice:: Detected infrastructure changes, testing entire repo" MODIFIED_MODULES="infrastructure" From 4627c9f63dca4d2f3e3146d60e07aeb89962e996 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 17:02:31 +0000 Subject: [PATCH 136/147] naming convention changes --- .github/templates/check_src_changes/action.yml | 7 ------- .github/templates/check_src_changes/check_src_changes.sh | 4 +--- .github/templates/docker_context/docker_context.sh | 4 ++-- src/wato_msgs/test.txt | 1 - 4 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 src/wato_msgs/test.txt diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index bb8217b2..140a8bf9 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -60,13 +60,6 @@ runs: with: files: src/world_modeling/** - - name: Sanity - run: | - echo "outside: ${{ steps.changed-files-outside-src.outputs.any_changed }}" - echo "wato_msgs: ${{ steps.changed-files-wato-msgs.outputs.any_changed }}" - echo "wato_msgs: ${{ steps.changed-files-wato-msgs.outputs.any_changed || steps.changed-files-outside-src.outputs.any_changed }}" - shell: bash - - name: Create list of changed modules id: output-changes env: diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh index ae3891b3..19492bac 100755 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -5,8 +5,6 @@ set -e # Outputs a list of modified modules by comparing changes between main and current commit # References previous GitHub workflow steps - - # Action if [ $ACTION_CHANGED == 'true' ]; then echo "Detected action changes" @@ -46,7 +44,7 @@ fi # Infrastructure if [ $INFRASTRUCTURE_CHANGED == 'true' ]; then echo "Detected infrastructure changes" - echo "::notice:: Detected infrastructure changes, testing entire repo" + echo "::notice:: Detected infrastructure changes" MODIFIED_MODULES="infrastructure" else echo "::notice:: MODIFIED_MODULES are $MODIFIED_MODULES" diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 268127bd..b7ce656c 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -14,9 +14,9 @@ json_objects=() # Check for infrastructure changes CHANGES_DETECTED=false if [[ $MODIFIED_MODULES = "" || $MODIFIED_MODULES = " " ]]; then - echo "::notice:: No source code modified, testing all modules for possible infra changes" + echo "::notice:: No source code modified, testing all modules for possible infrastructure changes" elif [[ $MODIFIED_MODULES = "infrastructure" ]]; then - echo "::notice:: Infra changes detected, testing all modules" + echo "::notice:: Infrastructure changes detected, testing all modules" else CHANGES_DETECTED=true fi diff --git a/src/wato_msgs/test.txt b/src/wato_msgs/test.txt deleted file mode 100644 index 56a6051c..00000000 --- a/src/wato_msgs/test.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file From 553d5521002e4c8d9052e1e4c1e10db3ce5848ac Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 17:08:52 +0000 Subject: [PATCH 137/147] naming convention changes --- .github/templates/check_src_changes/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 140a8bf9..49805267 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -59,6 +59,11 @@ runs: uses: tj-actions/changed-files@v42 with: files: src/world_modeling/** + + - name: Sanity + run: | + echo: outisde: ${{ steps.changed-files-outside-src.outputs.any_changed }} + shell: bash - name: Create list of changed modules id: output-changes From 66d6a7f02376208051f2b7d8b6ba9ecd2371452c Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 17:10:16 +0000 Subject: [PATCH 138/147] typo --- .github/templates/check_src_changes/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 49805267..b39fc141 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -62,7 +62,7 @@ runs: - name: Sanity run: | - echo: outisde: ${{ steps.changed-files-outside-src.outputs.any_changed }} + echo "outside: ${{ steps.changed-files-outside-src.outputs.any_changed }}" shell: bash - name: Create list of changed modules From ff92af48c56910985e941c09034433bf7cb8c02e Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 17:13:23 +0000 Subject: [PATCH 139/147] typo --- .github/templates/check_src_changes/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index b39fc141..31870e2a 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -68,7 +68,7 @@ runs: - name: Create list of changed modules id: output-changes env: - INFRASTRUCTURE_CHANGED: ${{ steps.changed-files-wato-msgs.outputs.any_changed || steps.changed-files-outside-src.outputs.any_changed }} + INFRASTRUCTURE_CHANGED: ${{ steps.changed-files-wato-msgs.outputs.any_changed }} || {{ steps.changed-files-outside-src.outputs.any_changed }} ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} From ce6208e652da2446b3cb635b9dc322a412743711 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 17:17:00 +0000 Subject: [PATCH 140/147] typo --- .github/templates/check_src_changes/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 31870e2a..4d4bdf4d 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -68,7 +68,7 @@ runs: - name: Create list of changed modules id: output-changes env: - INFRASTRUCTURE_CHANGED: ${{ steps.changed-files-wato-msgs.outputs.any_changed }} || {{ steps.changed-files-outside-src.outputs.any_changed }} + INFRASTRUCTURE_CHANGED: ${{ steps.changed-files-wato-msgs.outputs.any_changed }} || ${{ steps.changed-files-outside-src.outputs.any_changed }} ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} From c40caccd3db9300b77f21c7eb3de809cfc16c340 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 17:20:20 +0000 Subject: [PATCH 141/147] typo --- .github/templates/check_src_changes/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 4d4bdf4d..23bc688a 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -68,7 +68,7 @@ runs: - name: Create list of changed modules id: output-changes env: - INFRASTRUCTURE_CHANGED: ${{ steps.changed-files-wato-msgs.outputs.any_changed }} || ${{ steps.changed-files-outside-src.outputs.any_changed }} + INFRASTRUCTURE_CHANGED: ${{ steps.changed-files-wato-msgs.outputs.any_changed == 'true' || steps.changed-files-outside-src.outputs.any_changed == 'true' }} ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} From 3539d1b170f18883b62f0e058538e37a57d014f5 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 17:25:56 +0000 Subject: [PATCH 142/147] testing pipeline --- .github/templates/check_src_changes/action.yml | 2 +- src/wato_msgs/sus.txt | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/wato_msgs/sus.txt diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 23bc688a..7feb2549 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -62,7 +62,7 @@ runs: - name: Sanity run: | - echo "outside: ${{ steps.changed-files-outside-src.outputs.any_changed }}" + echo "wato_msgs: ${{ steps.changed-files-wato-msgs.outputs.any_changed }}" shell: bash - name: Create list of changed modules diff --git a/src/wato_msgs/sus.txt b/src/wato_msgs/sus.txt new file mode 100644 index 00000000..e69de29b From 96329d33833f130375e1a495ce852ab73eaf2e37 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Tue, 13 Feb 2024 17:28:41 +0000 Subject: [PATCH 143/147] testing pipeline --- .github/templates/check_src_changes/action.yml | 5 ----- src/wato_msgs/sus.txt | 0 2 files changed, 5 deletions(-) delete mode 100644 src/wato_msgs/sus.txt diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index 7feb2549..ca04c64c 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -60,11 +60,6 @@ runs: with: files: src/world_modeling/** - - name: Sanity - run: | - echo "wato_msgs: ${{ steps.changed-files-wato-msgs.outputs.any_changed }}" - shell: bash - - name: Create list of changed modules id: output-changes env: diff --git a/src/wato_msgs/sus.txt b/src/wato_msgs/sus.txt deleted file mode 100644 index e69de29b..00000000 From dee29a8d045bbe92ce16b75ee78c89f90c606543 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 14 Feb 2024 17:23:50 +0000 Subject: [PATCH 144/147] Cleaning up workflow logic --- .github/templates/check_src_changes/action.yml | 4 +++- .../templates/check_src_changes/check_src_changes.sh | 3 +-- .github/templates/docker_context/docker_context.sh | 11 ++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index ca04c64c..a0dd7fc4 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -63,7 +63,9 @@ runs: - name: Create list of changed modules id: output-changes env: - INFRASTRUCTURE_CHANGED: ${{ steps.changed-files-wato-msgs.outputs.any_changed == 'true' || steps.changed-files-outside-src.outputs.any_changed == 'true' }} + INFRASTRUCTURE_CHANGED: > + ${{ steps.changed-files-wato-msgs.outputs.any_changed == 'true' + || steps.changed-files-outside-src.outputs.any_changed == 'true' }} ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} diff --git a/.github/templates/check_src_changes/check_src_changes.sh b/.github/templates/check_src_changes/check_src_changes.sh index 19492bac..5e531b58 100755 --- a/.github/templates/check_src_changes/check_src_changes.sh +++ b/.github/templates/check_src_changes/check_src_changes.sh @@ -43,12 +43,11 @@ fi # Infrastructure if [ $INFRASTRUCTURE_CHANGED == 'true' ]; then - echo "Detected infrastructure changes" echo "::notice:: Detected infrastructure changes" MODIFIED_MODULES="infrastructure" else echo "::notice:: MODIFIED_MODULES are $MODIFIED_MODULES" fi -# Output list +# Output lis echo "modified_modules=$MODIFIED_MODULES" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index b7ce656c..060d3dd7 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -12,13 +12,10 @@ modules=$(find modules -maxdepth 1 -name "docker-compose*") json_objects=() # Check for infrastructure changes -CHANGES_DETECTED=false -if [[ $MODIFIED_MODULES = "" || $MODIFIED_MODULES = " " ]]; then - echo "::notice:: No source code modified, testing all modules for possible infrastructure changes" -elif [[ $MODIFIED_MODULES = "infrastructure" ]]; then +TEST_ALL=false +if [[ $MODIFIED_MODULES = "infrastructure" ]]; then echo "::notice:: Infrastructure changes detected, testing all modules" -else - CHANGES_DETECTED=true + TEST_ALL=true fi # Loop through each module @@ -29,7 +26,7 @@ while read -r module; do module_out=$(echo "$module" | sed -n 's/modules\/docker-compose\.\(.*\)\.yaml/\1/p') # Only work with modules that are modified - if [[ $MODIFIED_MODULES != *$module_out* && $CHANGES_DETECTED = "true" ]]; then + if [[ $MODIFIED_MODULES != *$module_out* && $TEST_ALL = "false" ]]; then continue fi From ae0397e1952fe519c1ca8f18d64a480d6b7266d5 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 14 Feb 2024 17:29:38 +0000 Subject: [PATCH 145/147] testing workflow --- .github/templates/check_src_changes/action.yml | 6 +++--- src/simulation/carla_sim/sus.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 src/simulation/carla_sim/sus.txt diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index a0dd7fc4..db177137 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -63,9 +63,9 @@ runs: - name: Create list of changed modules id: output-changes env: - INFRASTRUCTURE_CHANGED: > - ${{ steps.changed-files-wato-msgs.outputs.any_changed == 'true' - || steps.changed-files-outside-src.outputs.any_changed == 'true' }} + INFRASTRUCTURE_CHANGED: false + # ${{ steps.changed-files-wato-msgs.outputs.any_changed == 'true' + # || steps.changed-files-outside-src.outputs.any_changed == 'true' }} ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} diff --git a/src/simulation/carla_sim/sus.txt b/src/simulation/carla_sim/sus.txt new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/src/simulation/carla_sim/sus.txt @@ -0,0 +1 @@ +1 \ No newline at end of file From 1412ad0cc238852e6560e029372866b3123f3f08 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 14 Feb 2024 17:34:48 +0000 Subject: [PATCH 146/147] Fully tested GitHub CI pipeline for module-specific unit tests --- .github/templates/check_src_changes/action.yml | 6 +++--- src/simulation/carla_sim/sus.txt | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 src/simulation/carla_sim/sus.txt diff --git a/.github/templates/check_src_changes/action.yml b/.github/templates/check_src_changes/action.yml index db177137..a0dd7fc4 100644 --- a/.github/templates/check_src_changes/action.yml +++ b/.github/templates/check_src_changes/action.yml @@ -63,9 +63,9 @@ runs: - name: Create list of changed modules id: output-changes env: - INFRASTRUCTURE_CHANGED: false - # ${{ steps.changed-files-wato-msgs.outputs.any_changed == 'true' - # || steps.changed-files-outside-src.outputs.any_changed == 'true' }} + INFRASTRUCTURE_CHANGED: > + ${{ steps.changed-files-wato-msgs.outputs.any_changed == 'true' + || steps.changed-files-outside-src.outputs.any_changed == 'true' }} ACTION_CHANGED: ${{ steps.changed-files-action.outputs.any_changed }} INTERFACING_CHANGED: ${{ steps.changed-files-interfacing.outputs.any_changed }} PERCEPTION_CHANGED: ${{ steps.changed-files-perception.outputs.any_changed }} diff --git a/src/simulation/carla_sim/sus.txt b/src/simulation/carla_sim/sus.txt deleted file mode 100644 index 56a6051c..00000000 --- a/src/simulation/carla_sim/sus.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file From 89d79605c9f1fa342d8f954f540237b5b68ac986 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 14 Feb 2024 17:39:19 +0000 Subject: [PATCH 147/147] Fully tested GitHub CI pipeline for module-specific unit tests --- .github/templates/docker_context/docker_context.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index 060d3dd7..5e35355f 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -14,7 +14,6 @@ json_objects=() # Check for infrastructure changes TEST_ALL=false if [[ $MODIFIED_MODULES = "infrastructure" ]]; then - echo "::notice:: Infrastructure changes detected, testing all modules" TEST_ALL=true fi