Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Build #446

Merged
merged 5 commits into from
Jun 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
ci:
name: ${{ matrix.ros_distro }}
if: ${{ github.actor != 'RWT-bot' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -17,9 +18,16 @@ jobs:
node_version: [14]
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.RWT_BOT_PAT }}
- name: Docker pull
run: docker pull ros:${{ matrix.ros_distro }}-ros-core
- name: Docker build
run: docker build --build-arg ROS_DISTRO="${{ matrix.ros_distro }}" --build-arg NODE_VERSION="${{ matrix.node_version }}" -t roslibjsdocker .
- name: Tests
run: docker run -v $(pwd):/root/roslibjs --rm roslibjsdocker bash -i -c 'bash /root/roslibjs/test/build.bash'
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event_name == 'push' && github.ref == 'develop' && matrix.ros_distro == 'noetic' }}
with:
commit_message: Update Build
file_pattern: 'build/*.js'
10 changes: 0 additions & 10 deletions test/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,3 @@ echo -e "\e[1m\e[35mnpm run test-examples\e[0m"
npm run test-examples
echo -e "\e[1m\e[35mnpm run test-workersocket\e[0m"
npm run test-workersocket

echo -e "\e[1m\e[35mChecking build folder is up-to-date with library\e[0m"
changed_build_files=$(git -C "$(git rev-parse --show-toplevel)" diff --name-only HEAD -- build)
if [ -n "$changed_build_files" ]
then
echo -e "\e[1m\e[31mBuild folder is out-of-sync with library. Build library, npm run build, and (ammend) commit\e[0m"
exit 1
else
echo -e "\e[1m\e[32mBuild folder is up-to-date with library\e[0m"
fi