From ad96e8b00469aa7fd67d3df7eabb2ef7acbe854d Mon Sep 17 00:00:00 2001 From: Atsushi Watanabe Date: Thu, 18 Jul 2024 20:38:07 +0900 Subject: [PATCH] Automatically enable split-dev on 3.20 --- .github/workflows/build.yaml | 27 ++++----------------------- build-repo.sh | 10 ++-------- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2cb7eb4..452cae4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -49,8 +49,7 @@ jobs: echo "split-dev=${SPLIT_DEV}" | tee -a ${GITHUB_OUTPUT} echo "pkg-name=${pkg_name}" | tee -a ${GITHUB_OUTPUT} echo "apk-pkg-name=ros-${ROS_DISTRO}-${pkg_name//_/-}" | tee -a ${GITHUB_OUTPUT} - - name: Test - if: steps.test-data.outputs.split-dev != 'true' + - name: Build sample package run: | mkdir -p /tmp/apks chmod a+w /tmp/apks @@ -58,7 +57,8 @@ jobs: -v /tmp/${{ steps.test-data.outputs.pkg-name }}:/src/${{ steps.test-data.outputs.pkg-name }}:ro \ -v /tmp/apks:/packages \ ${{ steps.test-data.outputs.image }} - + - name: Test + run: ls -l /tmp/apks/*/* echo "Checking -dbg subpackage" ls -l /tmp/apks/*/* | grep -e "${{ steps.test-data.outputs.apk-pkg-name }}-dbg-[[:alnum:]\._git]\+-r0.apk" @@ -66,31 +66,12 @@ jobs: ls -l /tmp/apks/*/* | grep -e "${{ steps.test-data.outputs.apk-pkg-name }}-doc-[[:alnum:]\._git]\+-r0.apk" echo "Checking main package" ls -l /tmp/apks/*/* | grep -e "${{ steps.test-data.outputs.apk-pkg-name }}-[[:alnum:]\._git]\+-r0.apk" - - sudo rm -rf /tmp/apks - - name: Test with split-dev + - name: Test split-dev if: steps.test-data.outputs.split-dev run: | - mkdir -p /tmp/apks - chmod a+w /tmp/apks - docker run --rm \ - -v /tmp/${{ steps.test-data.outputs.pkg-name }}:/src/${{ steps.test-data.outputs.pkg-name }}:ro \ - -v /tmp/apks:/packages \ - -e SPLIT_DEV=yes \ - ${{ steps.test-data.outputs.image }} - - ls -l /tmp/apks/*/* - echo "Checking -dbg subpackage" - ls -l /tmp/apks/*/* | grep -e "${{ steps.test-data.outputs.apk-pkg-name }}-dbg-[[:alnum:]\._git]\+-r0.apk" - echo "Checking -doc subpackage" - ls -l /tmp/apks/*/* | grep -e "${{ steps.test-data.outputs.apk-pkg-name }}-doc-[[:alnum:]\._git]\+-r0.apk" - echo "Checking main package" - ls -l /tmp/apks/*/* | grep -e "${{ steps.test-data.outputs.apk-pkg-name }}-[[:alnum:]\._git]\+-r0.apk" echo "Checking dev package" ls -l /tmp/apks/*/* | grep -e "${{ steps.test-data.outputs.apk-pkg-name }}-dev-[[:alnum:]\._git]\+-r0.apk" - sudo rm -rf /tmp/apks - - name: Login to GitHub Container Registry if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} uses: docker/login-action@v3 diff --git a/build-repo.sh b/build-repo.sh index 2bb0bcd..63cb56a 100755 --- a/build-repo.sh +++ b/build-repo.sh @@ -79,17 +79,11 @@ case "${SKIP_ROSDEP_UPDATE}" in esac generate_opts= -case "${SPLIT_DEV}" in - "") - ;; - yes) +case "${ALPINE_VERSION}" in + 3.20) generate_opts="${generate_opts} --split-dev" ;; - no) - ;; *) - echo "SPLIT_DEV must be one of: \"yes\", \"no\", \"\" (default: \"no\")" - exit 1 ;; esac