asam-ev / qc-framework

Mozilla Public License 2.0
13 stars 6 forks source link

CI/CD: Add build GitHub Actions workflows #53

Closed patrickpa closed 1 month ago

patrickpa commented 1 month ago

Description

This PR adds GitHub Actions workflows to automatically trigger build on PRs and merges (target branch commit from PR).

The workflows added here trigger only if any change is done on the source code:

...
paths: # we only include paths critical for building to avoid unnecessary runs
      - src/**
      - include/**
      - scripts/cmake/**
...

How was the PR tested?

  1. Add workflow for Linux build
  2. Add workflow for Windows build

Notes

andreaskern74 commented 1 month ago

@patrickpa : Thanks for working on that! I noticed that you are downloading/installing the third-party dependencies from their official sources. Have you thought about using https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages?

I've never used it, but it might be an approach to supply these third-party dependencies in pre-compiled packages, which only need to be downloaded and used directly in the workflow.

patrickpa commented 1 month ago

@patrickpa : Thanks for working on that! I noticed that you are downloading/installing the third-party dependencies from their official sources. Have you thought about using https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages?

I've never used it, but it might be an approach to supply these third-party dependencies in pre-compiled packages, which only need to be downloaded and used directly in the workflow.

Hi @andreaskern74, I have seen it for language packages such Java and JavaScript packages, but indeed didn't check for custom third-party dependencies. I can take a look to see if there is any information regarding that. Thanks a lot for the input!

patrickpa commented 1 month ago

@andreaskern74 One idea I had was to publish a Docker container to the registry with the pre-installed packages. With this approach we would have a ready to go "build environment". What do you think of it?

andreaskern74 commented 1 month ago

@andreaskern74 One idea I had was to publish a Docker container to the registry with the pre-installed packages. With this approach we would have a ready to go "build environment". What do you think of it?

@patrickpa : Is this working also for the Windows builds, is the Windows compiler a cross-compiler? However, I'm not expert in these things. Everything what works (and what is allowed) is fine for me 👍

patrickpa commented 1 month ago

@andreaskern74 One idea I had was to publish a Docker container to the registry with the pre-installed packages. With this approach we would have a ready to go "build environment". What do you think of it?

@patrickpa : Is this working also for the Windows builds, is the Windows compiler a cross-compiler? However, I'm not expert in these things. Everything what works (and what is allowed) is fine for me 👍

Yes, as far as I am aware we can have the windows container with the pre-installed dependencies. Than is fine for me, I will first make the workflow to run correctly on GitHub as the "standard" mode and will check for optimizations on the flow for the dependencies.

Thanks! :+1: