<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by amir alizadeh on Medium]]></title>
        <description><![CDATA[Stories by amir alizadeh on Medium]]></description>
        <link>https://medium.com/@amiralizadeh9480?source=rss-edbcf35c7b4e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EzeHCIB5ZixIJtzTx3AYxw.jpeg</url>
            <title>Stories by amir alizadeh on Medium</title>
            <link>https://medium.com/@amiralizadeh9480?source=rss-edbcf35c7b4e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 26 May 2026 07:39:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amiralizadeh9480/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[How to run OpenGL based tests on Github Actions]]></title>
            <link>https://amiralizadeh9480.medium.com/how-to-run-opengl-based-tests-on-github-actions-60f270b1ea2c?source=rss-edbcf35c7b4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/60f270b1ea2c</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[opengl]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[amir alizadeh]]></dc:creator>
            <pubDate>Sun, 10 Jan 2021 19:29:27 GMT</pubDate>
            <atom:updated>2021-01-10T19:29:27.082Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Hi</strong><br>My name is amir and this is the first time I trying to write on medium in English.<br>I writing this article because when I faced the error I didn’t find any tutorial about how should I do this and took me about 2 days to find out and hopefully I can save people&#39;s time in the future.</p><p>I’m working on a hobby C++project that uses OpenGL for rendering.<br>I started writing unit tests for the rendering part of my project. All tests on my local machine passed but when I pushed my code on Github tests didn’t pass and this is the error I got in my CI build.</p><h3>Error: WGL: The driver does not appear to support OpenGL</h3><p>After a lot of researches, I found out two things that I didn’t know about Github Actions.<br>First: windows-latest OS on Github Actions is the windows server, not the regular windows we use for our PC.<br>Second: Github Action servers don’t support any GPU based codes.<br>At first, The solution I found was I should use a <a href="https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/about-self-hosted-runners">self-hosted runner</a> which needed to buy a server with GPU support.<br>But As I mentioned my project is just a hobby project just for learning and not earning money.<br>So I searched how I can use CPU to run OpenGL based application instead of GPU and found a project called <strong>Mesa3D </strong>which is an OpenGL implementation that allows running OpenGL commands on CPU.</p><p><a href="https://mesa3d.org/">The Mesa 3D Graphics Library</a></p><p>Now I knew all I need to do is install Mesa3D on the Github Actions server one step before running my unit tests.<br>By default, Mesa3D officially doesn’t have any precompiled libraries and you should Build it yourself.<br>Thankfully, I found recent prebuild libraries on Github built by pal1000.</p><p><a href="https://github.com/pal1000/mesa-dist-win">pal1000/mesa-dist-win</a></p><p>And all I did was Updating my Github Actions workflow. I just added a step before running my tests.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ad4a0f5d09e4bc96eeb7ec007957e6da/href">https://medium.com/media/ad4a0f5d09e4bc96eeb7ec007957e6da/href</a></iframe><p>First, we should download prebuilt libraries from GitHub and save the zip file. I used the latest version (20.3.2) when I writing this article but you can check for the latest builds on the project releases page and replace the URL if needed.</p><pre>curl.exe -L — output mesa.7z — url https://github.com/pal1000/mesa-dist-win/releases/download/20.3.2/mesa3d-20.3.2-release-msvc.7z</pre><p>Second, we should extract the zip file using 7zip. You should install 7zip before this step.<br>There is a complete workflow sample at end of this article.</p><pre>&quot;C:\Program Files\7-Zip\7z.exe&quot; x mesa.7z</pre><p>Then we should put DLL files in the same folder as the test binary files.<br>I used the symbolic links to do this.<br>Make sure You are using the right working directory.</p><pre>mklink opengl32.dll &quot;x64\opengl32.dll&quot;<br>mklink libglapi.dll &quot;x64\libglapi.dll&quot;</pre><p>A sample workflow using CMake and Mesa3D to run OpenGL based tests on Github Actions:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5cc52f57925fda4fe8fd53e506ab5156/href">https://medium.com/media/5cc52f57925fda4fe8fd53e506ab5156/href</a></iframe><p>Also If you are interested, you can check out <a href="https://github.com/amir9480/michka">my project</a> on GitHub and use the workflow codes I use for my project.</p><p><a href="https://github.com/amir9480/michka/blob/24001c0901425c8abe2cf0a47e6dcfa6e554eba9/.github/workflows/tests.yml">amir9480/michka</a></p><p>In end, Excuse me if I had any misspell/issues with my articles.</p><p>I still learning English :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60f270b1ea2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>