imguiwrap icon indicating copy to clipboard operation
imguiwrap copied to clipboard

Add ArchLinux to ci

Open kfsone opened this issue 4 years ago • 6 comments

Github actions support archlinux, so lets test builds on it.

kfsone avatar Jul 22 '21 21:07 kfsone

I would love to help. Could you guide me ?

svenkat19 avatar Jul 23 '21 08:07 svenkat19

I would love to help. Could you guide me ?

Sure!

The whirlwind tour is that github now offers a free ci/cd method called workflows or actions. See the tab up in the navbar:

image

You configure them through yaml files in .github/workflows, and you can specify mixtures of os, version and architecture that forms a build matrix:

https://github.com/kfsone/imguiwrap/blob/d70c112f102d93e5707aa14069d584fddd416726/.github/workflows/cmake.yml#L13-L22

I was hoping it'd be as easy as just adding arch to this list and translating the Ubuntu dependencies step:

https://github.com/kfsone/imguiwrap/blob/d70c112f102d93e5707aa14069d584fddd416726/.github/workflows/cmake.yml#L29-L32

But it looks like it may need to use some archlinux actions from the (https://github.com/marketplace?type=actions), or perhaps going through docker to either build or run the tests - again there seem to be actions for this in the marketplace.

If you want to give it a try, you can either fork the repos and experiment there or make yourself a test repos, something like:

    # CMakeLists.txt
    cmake_minimum_required(VERSION 3.0)
    add_executable(action_test test.cpp)
    // test.cpp
    #include <iostream>
    int main() {
      // "hello world" v2.0, because it can never fail :)
      std::cout << "Segmentation fault.\n";
    }

Push that to your github repos, go to the actions tab, and it'll guide you through creating a workflow and adding the .yml file, and then you can edit that right thru the github web interface! :)

Ideally, I'd want to aim for a build under one or more arch LTS because the build check is ultimately about compiler compatibility?

Useful links:

https://docs.github.com/en/actions https://docs.github.com/en/actions/learn-github-actions

kfsone avatar Jul 23 '21 09:07 kfsone

Can we do it step by step?

I will start by making a test repo, and pushing CMakeLists and test.cpp to it

svenkat19 avatar Jul 24 '21 06:07 svenkat19

Yeah, it'll be as much a learning experience for me anyway :) I've got a small animal rescue to look after the next 7 days while my wife visits family, so might be a little delayed in responding.

kfsone avatar Jul 24 '21 20:07 kfsone

Ah no issues :)

image So in this page, which workflow should I setup?

svenkat19 avatar Jul 25 '21 14:07 svenkat19

It shouldn't matter too much, they should do pretty much the same thing but the cmake one will use "cmake --build" to do the compilation while the other will have to generate the command line itself, which is kinda missing the whole point of a cmake project ;)

kfsone avatar Jul 25 '21 23:07 kfsone