From 7234eb016407ce70743b9a35a3033291c4416a8d Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 20:47:07 +0000 Subject: [PATCH] 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