Skip to content

Commit

Permalink
Automatically enable split-dev on 3.20
Browse files Browse the repository at this point in the history
  • Loading branch information
at-wat committed Jul 18, 2024
1 parent 5e72e30 commit ad96e8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,48 +49,29 @@ 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
docker run --rm \
-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"
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"
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
Expand Down
10 changes: 2 additions & 8 deletions build-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ad96e8b

Please sign in to comment.