<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Automation &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/automation/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Tue, 25 Feb 2025 21:31:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Xojo GitHub Actions</title>
		<link>https://blog.xojo.com/2022/10/19/xojo-github-actions/</link>
		
		<dc:creator><![CDATA[Jürg Otter]]></dc:creator>
		<pubDate>Wed, 19 Oct 2022 12:30:00 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=10874</guid>

					<description><![CDATA[Would you like to automate the build processes of Xojo built applications with GitHub Actions? With no user interaction the whole process can be performed:&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Would you like to automate the build processes of Xojo built applications with GitHub Actions? With no user interaction the whole process can be performed: Build all Targets, CodeSign Windows executables, create and sign the installers, package the macOS app in a .dmg and notarize the app, and for Linux create a .tgz package.</p>



<figure class="wp-block-image size-full is-style-default"><img fetchpriority="high" decoding="async" width="1200" height="705" src="https://blog.xojo.com/wp-content/uploads/2022/10/1_Beta-Build.gif" alt="beta build GitHub actions with xojo" class="wp-image-10886"/></figure>



<h2 class="wp-block-heading">What are GitHub Actions?</h2>



<p>If you want to read all about it &#8211; head over to their <a href="https://docs.github.com/en/actions">documentation</a>. To get started, you should at least know about the following terms:</p>



<h3 class="wp-block-heading"><strong>Workflow</strong></h3>



<p>A workflow is a configurable automated process that will run one or more jobs. Workflows are defined by a YAML file checked in to your repository.&nbsp;</p>



<h3 class="wp-block-heading"><strong>Job</strong></h3>



<p>A job is a set of steps in a workflow that execute on the same runner. Each step is either a shell script that will be executed, or an action that will be run.</p>



<h3 class="wp-block-heading"><strong>Runner</strong></h3>



<p>A runner is a machine that runs your workflows when they&#8217;re triggered. GitHub provides <a href="https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources">ready to use runners</a> as preconfigured virtual machines. And of course you can <a href="https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners">host your own runners</a>.</p>



<p>A GitHub Actions workflow can be configured to be triggered when an event occurs in the repository. So how to leverage that? Let&#8217;s talk about the Git Branching strategy that I&#8217;m going to use in this example first.</p>



<h2 class="wp-block-heading">Git Branching Strategy</h2>



<p>Using GitHub obviously means the one is using Git as Source Control. There are quite a few common strategies and workflows to use Git. For this example I&#8217;ll be using the following:</p>



<ul class="wp-block-list"><li>Default Branch: main<br>I want to make sure that all code in the main branch can be compiled at all times. Every push (or Pull Request against the main branch) should automatically build a Beta Version of the app.<br>At some time I want to use the latest commit to build a final version of the application.</li><li>Feature branches: feature/xyz<br>To start working on a new feature or bug fix, I&#8217;ll create a feature branch. As I often commit I don&#8217;t want to build every single commit. There might be commits with &#8220;work in progress&#8221; which won&#8217;t even compile.<br>Once ready: I create a Pull Request against the main branch.</li><li>Pull Request <em>(against main branch)</em><br>This means a feature or bug fix is ready. So a GitHub Action should kick in and build the app. If that fails it simply means the feature isn&#8217;t ready for the main branch. The built Beta Version can be downloaded to do some more manual tests before merging into the main branch.<br>Once the Pull Request is merged <em>(always using a squash commit)</em>, this will result in a single commit to the main branch (of the whole new feature). Same procedure: a Beta of the app is automatically built and ready for to download and test.</li><li>Release a Final Build<br>After adding couple of new features and bug fixes I want to release a final version.<br>Whenever I feel ready, a GitHub Actions Workflow can be started manually. That will build a Final Version, create a Release in the GitHub Repository and upload all Builds to the Release as Assets.</li></ul>



<p>A bit of information before starting to write the <a href="https://docs.github.com/en/actions/using-workflows">GitHub Actions Workflows</a>:</p>



<h2 class="wp-block-heading"><strong>About Workflows</strong></h2>



<p>Workflows are defined by a YAML file checked in to the repository in the .github/workflows directory.</p>



<figure class="wp-block-image size-large is-style-default"><img decoding="async" width="1024" height="234" src="https://blog.xojo.com/wp-content/uploads/2022/10/2_Workflows-yaml-1024x234.png" alt="" class="wp-image-10879" srcset="https://blog.xojo.com/wp-content/uploads/2022/10/2_Workflows-yaml-1024x234.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/10/2_Workflows-yaml-300x69.png 300w, https://blog.xojo.com/wp-content/uploads/2022/10/2_Workflows-yaml-768x176.png 768w, https://blog.xojo.com/wp-content/uploads/2022/10/2_Workflows-yaml-1536x351.png 1536w, https://blog.xojo.com/wp-content/uploads/2022/10/2_Workflows-yaml-2048x469.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading"><strong>YAML files</strong></h3>



<p>A word of precaution when writing and editing YAML files:</p>



<ul class="wp-block-list"><li>Indentation is done by spaces (not by tabs!)</li><li>Indentation has to be exact, or expect to get syntax errors</li></ul>



<h2 class="wp-block-heading"><strong>Xojo GitHub Actions Workflows</strong></h2>



<p>According to the Git Branching Strategy I want to build Beta Releases <em>(on Pull Requests and on Push to the main branch)</em>, and I want to manually create a Release with a Final Build.</p>



<p>This means that there will be two Workflows:</p>



<ul class="wp-block-list"><li><strong>Beta Build</strong></li><li><strong>Create Release</strong></li></ul>



<p>They have something in common. Both need to build the Xojo project and execute the postbuild steps. To avoid duplication I&#8217;m going to write a <a href="https://docs.github.com/en/actions/using-workflows/reusing-workflows">reusable workflow</a>:</p>



<ul class="wp-block-list"><li><strong>Xojo</strong> <em>(Build and PostBuild)</em></li></ul>



<p>A workflow <em>(Beta Build | Create Release)</em> that uses another workflow <em>(Xojo Build and PostBuild)</em> is referred to as a &#8220;caller&#8221; workflow. The reusable workflow is a &#8220;called&#8221; workflow.</p>



<p>This ScreenShot shows the Beta Build workflow which calls the reusable Xojo workflow:</p>



<figure class="wp-block-image size-large is-style-default"><img decoding="async" width="1024" height="403" src="https://blog.xojo.com/wp-content/uploads/2022/10/3_Workflow-Run-1024x403.png" alt="" class="wp-image-10880" srcset="https://blog.xojo.com/wp-content/uploads/2022/10/3_Workflow-Run-1024x403.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/10/3_Workflow-Run-300x118.png 300w, https://blog.xojo.com/wp-content/uploads/2022/10/3_Workflow-Run-768x302.png 768w, https://blog.xojo.com/wp-content/uploads/2022/10/3_Workflow-Run-1536x605.png 1536w, https://blog.xojo.com/wp-content/uploads/2022/10/3_Workflow-Run-2048x806.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>The Create Release workflow looks similar during it&#8217;s run. It can be started manually on GitHub.</p>



<figure class="wp-block-image size-full is-style-default"><img loading="lazy" decoding="async" width="1200" height="694" src="https://blog.xojo.com/wp-content/uploads/2022/10/4_Create-Release.gif" alt="create release with GitHub actions and xojo" class="wp-image-10894"/></figure>



<p>Once finished, a new Release is available in the GitHub repository:</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="547" src="https://blog.xojo.com/wp-content/uploads/2022/10/5_CreateRelease-Final-1024x547.png" alt="" class="wp-image-10881" srcset="https://blog.xojo.com/wp-content/uploads/2022/10/5_CreateRelease-Final-1024x547.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/10/5_CreateRelease-Final-300x160.png 300w, https://blog.xojo.com/wp-content/uploads/2022/10/5_CreateRelease-Final-768x410.png 768w, https://blog.xojo.com/wp-content/uploads/2022/10/5_CreateRelease-Final-1536x820.png 1536w, https://blog.xojo.com/wp-content/uploads/2022/10/5_CreateRelease-Final-2048x1093.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">The Set Up</h2>



<p>There is quite a bit to do:</p>



<ul class="wp-block-list"><li>Set up a <strong>Build Mac</strong><br>A Mac of our own is needed. The reason for that is that Xojo isn&#8217;t set up on GitHub&#8217;s virtual macOS machines <em>(one would need to download and install it every single time)</em>. And even if it were, we would need to setup and register Xojo with a License. And Xojo Licenses take a seat on every machine &#8211; so no good idea for a fresh virtual machine on every build.</li><li>Create a <strong>Xojo IDE Communicator</strong><br>Build Automation with Xojo requires to communicate with the Xojo IDE. I&#8217;m going to use the project that Xojo ships in the examples, but modify it a bit.</li><li>Configure the <strong>GitHub Repository Settings</strong><br>There are settings to enforce the chosen Git Branching Strategy. And there are some settings for GitHub Actions that need to be set up.</li><li>Set up a <strong>self-hosted GitHub runner</strong><br>Install the GitHub runner on the Build Mac and link it to the repository.</li><li><strong>Xojo Project</strong> and <strong>Post Build Scripts</strong><br>I&#8217;m going to add a PreBuild Xojo Script. And of course all Post Build Scripts regarding CodeSigning, Installer creation, packaging, Notarization.</li><li>GitHub Actions: <strong>Secrets</strong><br>CodeSigning means certificates and passwords. They get their safe place in the repository Secrets.</li><li>GitHub Actions: <strong>Workflows</strong><br>Once everything is in place&#8230; one can finally start writing the actual workflows.</li></ul>



<p>As you can imagine, guiding you through all these steps is going to be quite a lengthy article.</p>



<h2 class="wp-block-heading"><strong>Source Code &amp; Documentation</strong></h2>



<p>Should you consider using GitHub Actions with your own Xojo projects, then have a look at this repository: <a href="https://github.com/jo-tools/xojo-github-actions">GitHub: jo-tools/xojo-github-actions</a></p>



<p>It contains the full documentation, the source of the modified Xojo IDE Communicator, an Example Xojo Project &#8211; and of course all the GitHub Actions Workflows.</p>



<p>I hope this gives you a lot of helpful hints, ideas and approaches so that you get a head start to get your Xojo Projects built using GitHub Actions Workflows.</p>



<h2 class="wp-block-heading"><strong>That&#8217;s all Folks!</strong></h2>



<p>I hope this brief introduction of how Build Automation for Xojo built Application can be used with GitHub Actions Workflows has been helpful to some, food for thought to others.</p>



<p><em>Jürg Otter is a long term user of Xojo and working for </em><a href="https://www.cmiag.ch/"><em>CM Informatik AG</em></a><em>. Their Application </em><a href="https://cmi-bildung.ch/"><em>CMI LehrerOffice</em></a><em> is a Xojo Design Award Winner 2018. In his leisure time Jürg provides some </em><a href="https://www.jo-tools.ch/xojo/"><em>bits and pieces for Xojo Developers</em></a><em>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automated Testing: How We Test Xojo Builds</title>
		<link>https://blog.xojo.com/2021/12/17/automated-testing-how-we-test-xojo-builds/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Fri, 17 Dec 2021 22:04:03 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Automated Builds]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=9831</guid>

					<description><![CDATA[Xojo has an extensive testing period where actual users test a pre-release version with their projects but if you are wondering what kind of testing we do internally before each pre-release of Xojo, we have quite a bit of automated testing processes. There are over 400 tests just for the compiler alone. Already, we are approaching 300 tests for our Android framework. In total, across all supported platforms, there are over 2500 automated tests. ]]></description>
										<content:encoded><![CDATA[
<p>Xojo has an extensive testing period where actual users test a pre-release version with their projects but if you are wondering what kind of testing we do internally before each pre-release of Xojo,&nbsp;we have quite a bit of automated testing processes. There are over 400 tests just for the compiler alone. Already, we are approaching 300 tests for our Android framework. In total, across all supported platforms, there are over 2500 automated tests. Most tests run every time we do a full build of Xojo (also a fully automated process) which occurs 2 to 5 times a week. When one of these tests fails, the unlucky engineer responsible is informed and gets to work fixing it. More automated tests are being added to our system regularly.</p>



<p>Primarily, <a href="https://blog.xojo.com/2020/09/29/how-do-we-decide-what-goes-into-xojo/\">we focus</a> on the issues having the greatest impact on the Xojo community. However, that focus is not absolute. The engineering team at Xojo is using Xojo all-day, every day. They will often catch bugs in the early stages of the development of a new feature or as a side effect of fixing some other bug, long before that release gets to pre-release testers. The number of combinations of interactions between various parts of the Xojo frameworks is effectively infinite and no system can test everything. That&#8217;s why pre-release testing by actual users is so important. When you look at the bugs that are reported, 95.6% have only one user reporting them. Though we provide, in fact require, users to search Feedback before submitting a case, users often describe the same bug in varying ways resulting in&nbsp;duplicates. Given both the infinite number of interactions and some number of duplicate reports, the fact that overwhelming majority of reports have just one user is understandable. That we focus on the reports that have multiple users is also understandable. And of course there are exceptions, if it&#8217;s obvious that a new bug is going to effect a lot of users, we will get to work on it ASAP.&nbsp;In addition, if an engineer is working in a particular part of the IDE or a particular framework, since they have take the time to refamiliarize themselves with that code, they will often look for bugs that have been reported against it.&nbsp;</p>



<p>Development tools are special because the type of people who use them are more likely to report bugs and are more likely to want to search the list of open cases, get updates about bugs and more. While it&#8217;s important to report bugs, and we can’t stress enough how much we appreciate the time and care you take in doing so, even if the bug is fixed, you still have to wait for the release in which it&#8217;s fixed. Even our engineers have to wait for bugs fixes just like you do. Still, when you run into a bug, please search <a href="http://www.xojo.com/download">Feedback</a> first to see if it&#8217;s been reported, perhaps think of a few ways it could have been reported and do a few searches. If you find a match, add yourself to the case. If you don&#8217;t, please file a case. If you haven&#8217;t found a workaround, ask on the <a href="https://forum.xojo.com/">forum</a> or contact us directly and we see what we can do to help. </p>



<p>There is a lot of automated testing that goes on before we put out a pre-release to Testers. And we will continue to add more because automated testing is a terrific and efficient way to test anything that can be automatically tested. We are always on the lookout for ways to improve efficiency in our processes. </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
