diff --git a/.github/workflows/BuildAndRun.yaml b/.github/workflows/BuildAndRun.yaml index f9d0fdb12e5..ededd8635fa 100644 --- a/.github/workflows/BuildAndRun.yaml +++ b/.github/workflows/BuildAndRun.yaml @@ -6,14 +6,14 @@ on: - cron: 0 0 * * * pull_request: paths: - - "**" - - "!docs/**" - - "!README.md" - - "!.github/**" - - ".github/workflows/BuildAndRun.yaml" - - "!mkdocs.yml" - - "!pyproject.toml" - - "!poetry.lock" + - '**' + - '!docs/**' + - '!README.md' + - '!.github/**' + - '.github/workflows/BuildAndRun.yaml' + - '!mkdocs.yml' + - '!pyproject.toml' + - '!poetry.lock' push: branches: - master @@ -31,20 +31,15 @@ jobs: rosdistro: [humble] steps: - name: Suppress warnings - run: git config --global --add safe.directory '*' - - - name: Setup workspace - run: mkdir -p src/scenario_simulator_v2 + run: | + git config --global --add safe.directory '*' - - uses: actions/checkout@v4 + - uses: actions/checkout@v2-beta with: fetch-depth: 0 - path: src/scenario_simulator_v2 + token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v4 - with: - repository: RobotecAI/scenario_simulator_v2_scenarios - path: src/scenario_simulator_v2_scenarios + - run: git clone https://github.com/RobotecAI/scenario_simulator_v2_scenarios.git - name: Search packages in this repository id: list_packages @@ -55,14 +50,22 @@ jobs: run: | echo "Target packages: ${{ steps.list_packages.outputs.package_list }}" + - name: Copy repository + run: | + mkdir -p ~/ros2_ws/src/scenario_simulator_v2 + cp -rf . ~/ros2_ws/src/scenario_simulator_v2 + shell: bash + - name: Install dependencies run: | + cd ~/ros2_ws vcs import src < src/scenario_simulator_v2/dependency_${{ matrix.rosdistro }}.repos - name: Resolve rosdep run: | - apt-get update - apt-get install -y python3-pip + cd ~/ros2_ws + apt update + apt install -y python3-pip rosdep update --include-eol-distros rosdep install -iy --from-paths src --rosdistro ${{ matrix.rosdistro }} shell: bash @@ -70,12 +73,14 @@ jobs: - name: Build packages run: | source /opt/ros/${{ matrix.rosdistro }}/setup.bash + cd ~/ros2_ws colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_CPP_MOCK_SCENARIOS=ON --packages-up-to ${{ steps.list_packages.outputs.package_list }} shell: bash - name: Colcon test run: | source /opt/ros/${{ matrix.rosdistro }}/setup.bash + cd ~/ros2_ws source install/local_setup.bash colcon test --packages-select ${{ steps.list_packages.outputs.package_list }} shell: bash @@ -84,22 +89,23 @@ jobs: if: always() run: | source /opt/ros/${{ matrix.rosdistro }}/setup.bash + cd ~/ros2_ws source install/local_setup.bash colcon test-result --verbose shell: bash - name: Scenario test run: | - source install/setup.bash - source install/local_setup.bash + source ~/ros2_ws/install/setup.bash + source ~/ros2_ws/install/local_setup.bash ros2 launch scenario_test_runner scenario_test_runner.launch.py workflow:='$(find-pkg-share scenario_test_runner)/config/workflow_example.yaml' global_frame_rate:=20 ros2 run scenario_test_runner result_checker.py /tmp/scenario_test_runner/result.junit.xml shell: bash - name: Basic test run: | - source install/setup.bash - source install/local_setup.bash + source ~/ros2_ws/install/setup.bash + source ~/ros2_ws/install/local_setup.bash ros2 launch scenario_test_runner scenario_test_runner.launch.py workflow:='$(find-pkg-share scenario_simulator_v2_scenarios)/workflow/basic.yaml' ros2 run scenario_test_runner result_checker.py /tmp/scenario_test_runner/result.junit.xml shell: bash diff --git a/.github/workflows/CheckBranchUpToDate.yaml b/.github/workflows/CheckBranchUpToDate.yaml index 22fae54e25b..a161bf643d9 100644 --- a/.github/workflows/CheckBranchUpToDate.yaml +++ b/.github/workflows/CheckBranchUpToDate.yaml @@ -13,11 +13,10 @@ jobs: runs-on: ubuntu-22.04 steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: fetch-depth: 0 fetch-tags: true - - name: Check if branches are up to date shell: bash run: | diff --git a/.github/workflows/Documentation.yaml b/.github/workflows/Documentation.yaml index 083f5216f78..627f83143bd 100644 --- a/.github/workflows/Documentation.yaml +++ b/.github/workflows/Documentation.yaml @@ -16,36 +16,28 @@ jobs: name: Generate documentation runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - + - uses: actions/checkout@v2-beta - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - + uses: docker/setup-buildx-action@v2 - name: run protoc-gen-doc run: docker run --rm -v $(pwd)/simulation/simulation_interface/proto/:/protos -v $(pwd)/docs/proto_doc:/out pseudomuto/protoc-gen-doc --doc_opt=markdown,protobuf.md - - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.10" - - uses: abatilo/actions-poetry@v2 with: poetry-version: "1.5.1" - - name: install run: poetry install --no-interaction - - name: Generate documentation run: poetry run mkdocs build - - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: site path: site retention-days: 1 - - name: Publish Documentation if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}} uses: peaceiris/actions-gh-pages@v3 @@ -54,26 +46,21 @@ jobs: publish_dir: site keep_files: false external_repository: tier4/scenario_simulator_v2-docs - - generate_api_document: + generate_api_document: name: Generate API documentation runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - + - uses: actions/checkout@v2-beta - name: Install doxygen - run: sudo apt-get install -y doxygen - + run: sudo apt install -y doxygen - name: Build document run: doxygen Doxyfile - - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2 with: name: api_documentation_site path: html retention-days: 1 - - name: Publish Documentation if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}} uses: peaceiris/actions-gh-pages@v3 diff --git a/.github/workflows/DocumentationLinkCheck.yaml b/.github/workflows/DocumentationLinkCheck.yaml index 0d76e93ebf7..9f3479424a8 100644 --- a/.github/workflows/DocumentationLinkCheck.yaml +++ b/.github/workflows/DocumentationLinkCheck.yaml @@ -11,7 +11,7 @@ jobs: linkChecker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Check documentation link id: lychee diff --git a/.github/workflows/InterfaceUpdateNotification.yaml b/.github/workflows/InterfaceUpdateNotification.yaml index a04927bf4ff..fcacbeb93dc 100644 --- a/.github/workflows/InterfaceUpdateNotification.yaml +++ b/.github/workflows/InterfaceUpdateNotification.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Add label diff --git a/.github/workflows/LineLint.yaml b/.github/workflows/LineLint.yaml index 3889a70f4ab..e2b4c4b8187 100644 --- a/.github/workflows/LineLint.yaml +++ b/.github/workflows/LineLint.yaml @@ -1,5 +1,5 @@ name: Line lint -on: +on: workflow_dispatch: push: @@ -8,5 +8,5 @@ jobs: runs-on: ubuntu-latest name: Check if all files end in newline steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - uses: fernandrone/linelint@0.0.4 diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 26e1b7bd86f..baed581a687 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -5,6 +5,7 @@ on: - master types: - closed + - created - edited - labeled - opened @@ -33,17 +34,14 @@ jobs: steps: - name: Restore branch uses: levonet/action-restore-branch@master - - name: Install bloom run: apt update && apt install -y python3-bloom git - - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: ref: master fetch-depth: 0 fetch-tags: true - - name: Setup git run: | git config --global user.name "Release Bot" @@ -51,47 +49,39 @@ jobs: git config --global --add safe.directory /__w/scenario_simulator_v2/scenario_simulator_v2 git config --global credential.helper ${{ secrets.GITHUB_TOKEN }} git config pull.rebase false - - name: Get old version id: old_version run: | echo "old_version=$(catkin_package_version)" >> $GITHUB_OUTPUT - - name: Merge branch run: git pull origin ${{ github.head_ref }} - - name: Bump patch version if: (contains(github.event.pull_request.labels.*.name, 'bump patch')) run: | catkin_generate_changelog -y catkin_tag_changelog --bump patch catkin_package_version --bump patch - - name: Bump minor version if: (contains(github.event.pull_request.labels.*.name, 'bump minor')) run: | catkin_generate_changelog -y catkin_tag_changelog --bump minor catkin_package_version --bump minor - - name: Bump major version if: (contains(github.event.pull_request.labels.*.name, 'bump major')) run: | catkin_generate_changelog -y catkin_tag_changelog --bump major catkin_package_version --bump major - - name: Get new version id: new_version run: | echo "new_version=$(catkin_package_version)" >> $GITHUB_OUTPUT - - name: Commit changes if: github.event.pull_request.merged == true run: | git add . git commit -m "Bump version of scenario_simulator_v2 from version ${{ steps.old_version.outputs.old_version }} to version ${{ steps.new_version.outputs.new_version }}" - - name: Pushing to the protected branch 'master' if: github.event.pull_request.merged == true uses: CasperWA/push-protected@v2 @@ -99,7 +89,6 @@ jobs: token: ${{ secrets.BLOOM_GITHUB_TOKEN }} branch: master force: true - - name: Get linked issues id: linked_issues uses: hossainemruz/linked-issues@main @@ -107,7 +96,6 @@ jobs: pr_url: ${{github.event.pull_request.html_url}} format: ExternalIssueRef continue-on-error: true - - name: Update release description env: PULL_REQUEST_BODY: ${{ github.event.pull_request.body }} @@ -116,13 +104,11 @@ jobs: echo "" >> release_description.txt echo "# Related Issues " >> release_description.txt echo "${{ steps.linked_issues.outputs.issues }}" >> release_description.txt - - name: Get release description id: get_release_description uses: mathiasvr/command-output@v2.0.0 with: run: cat release_description.txt - - name: Create a GitHub release if: github.event.pull_request.merged == true uses: ncipollo/release-action@v1 @@ -130,7 +116,6 @@ jobs: tag: ${{ steps.new_version.outputs.new_version }} name: ${{ steps.new_version.outputs.new_version }} body: ${{ steps.get_release_description.outputs.stdout }} - - name: Delete branch if: github.event.pull_request.merged == true uses: SvanBoxel/delete-merged-branch@main diff --git a/.github/workflows/SimModelUpdateNotification.yaml b/.github/workflows/SimModelUpdateNotification.yaml index ee34a04c446..49dc7a0a4c4 100644 --- a/.github/workflows/SimModelUpdateNotification.yaml +++ b/.github/workflows/SimModelUpdateNotification.yaml @@ -9,6 +9,10 @@ jobs: notify: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Add comment run: | gh pr comment "$PR_NUMBER" --edit-last --body "This PR edits vehicle model that is copied from [simple_planning_simulator](https://github.com/autowarefoundation/autoware.universe/tree/main/simulator/simple_planning_simulator). Please consider making changes to the original code to avoid confusion or consult developers (@hakuturu583, @yamacir-kit and @HansRobo )." \ diff --git a/.github/workflows/SpellCheck.yaml b/.github/workflows/SpellCheck.yaml index 29cd2a30942..612b3e54d61 100644 --- a/.github/workflows/SpellCheck.yaml +++ b/.github/workflows/SpellCheck.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Run spell-check uses: autowarefoundation/autoware-github-actions/spell-check@v1 @@ -20,3 +20,4 @@ jobs: local-cspell-json: .github/workflows/custom_spell.json dict-packages: | https://github.com/tier4/cspell-dicts + verbose: true diff --git a/.github/workflows/SpellCheckAll.yaml b/.github/workflows/SpellCheckAll.yaml index bacef52f9be..c3c5633773b 100644 --- a/.github/workflows/SpellCheckAll.yaml +++ b/.github/workflows/SpellCheckAll.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Run spell-check uses: autowarefoundation/autoware-github-actions/spell-check@v1 @@ -21,3 +21,4 @@ jobs: dict-packages: | https://github.com/tier4/cspell-dicts incremental-files-only: false + verbose: true