ConnectIQ Docker image and GitHub Action

With the latest releases of the ConnectIQ SDK, it is finally easy to run the SDK on Linux. Thanks to this update, I've been able to create a Docker image that tests a ConnectIQ application (if it uses "Run No Evil"). The command to test an app is:

docker run -v /path/to/your/app:/app -w /app ghcr.io/matco/connectiq-tester:latest fenix7

The code source of the image is available here: https://github.com/matco/connectiq-tester. It's currently based on ConnectIQ 4.1.4 and the device bits retrieved on 29 June 2022.

In addition to the Docker image, I created a GitHub Actions that can test your application using GitHub CI. Just add the following step to your GitHub workflow:
- name: Test application
  id: run_tests
  uses: matco/action-connectiq-tester@v1
  with:
    device: fenix7

The web page of the action is here: https://github.com/marketplace/actions/connectiq-tester and its source code is here: https://github.com/matco/action-connectiq-tester. You can have a look at the CI workflow of my own ConnectIQ application here: https://github.com/matco/badminton/blob/dev/.github/workflows/test.yml.

Feel free to use these tools and do not hesitate to provide your feedback. I already have ideas to improve them. My goal was to have the simplest GitHub Action possible, but I'm not sure if this approach is the good one. It may be better to have an action that setups ConnectIQ directly in the GitHub Action runner. This would allow choosing the version of the SDK to install and give more flexibility to the Action (for example, choosing custom flags for the compiler).
I found that someone built a Docker image that setups the full ConnectIQ SDK here: https://github.com/cedric-dufour/connectiq-sdk-docker. It's funny because the Docker files are very similar, even if the goal is slightly different. This image could be a good base for another kind of GitHub Action.

I also have a message for the Garmin ConnectIQ team: it's still far too complicated to retrieve and set up the device files that are required to launch the simulator. A direct download link to these files would be good. An option to configure the path of the devices bits would also be appreciated (instead of hard-coding a path inside the user's home folder).
I also think it would be nice if Garmin provides and supports these kind of tools themselves. By the way, both the Docker image and the GitHub Action are licensed with the "unlicense" (public domain) so you can do whatever you want with them. I would be happy if you decide to copy and support them as your own.

  • Thanks for the action and docker image. I found it very usefull when building my own tools for CI/CD. I  wanted to let GitHub create the project export. So I wrote an action for it. I also created a build action to verify each commit builds. I used your work as heavy inspiration, thanks!

  • Hi littledev, I'm getting an error running your action 'blackshadev/garmin-connectiq-release-action': 

    Exception in thread "main" java.lang.UnsatisfiedLinkError: no fontmanager in system library path: /usr/lib/jvm/java-17-openjdk/lib

    Are you able to check it out and let me know if the docker image is still working?

    Thanks,

    Scott.

  • Hi scott, yeah I will thanks for the notification. I will take a look at it. I will be off on vacation soon, so if I won't manage, can you try to use v8.1.1, that is the one I use for my own app as well and should work without any issues

  • I just drafted a new release 8.2.1-1 for you. Locally and with my own app (wayfinder) I wasn't able to reproduce the error. If you still have the error on 8.2.1-1 can you share you app sources somewhere? I want to reproduce the error your are getting such that I can find a fix for you.

    After this message I will probably be off on vacation, sorry I couldn' t help you faster, but I will check out your reply after I am back in 3 weeks. 

  • Thanks for the update but receiving the same error with blackshadev/[email protected]

  • Hi Scott I tried replying with my app account. But the messages doesn't seem to get through. 

    I am currently on holy day for the next few weeks, sorry I can't help you in a short time span. 

    Could you maybe share your code or something? Because it works for me just fine even with 8.2.1 on my way finder app. You are probably using some module I don't and it would be very nice for me to be able to reproduce the issue.