Add ArchLinux to ci
Github actions support archlinux, so lets test builds on it.
I would love to help. Could you guide me ?
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:
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
Can we do it step by step?
I will start by making a test repo, and pushing CMakeLists and test.cpp to it
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.
Ah no issues :)
So in this page, which workflow should I setup?
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 ;)
