kiwix / kiwix-build

Kiwix & openZIM build engine
GNU General Public License v3.0
87 stars 42 forks source link

Create a github action to automatically download the right dependency archive in our project CI. #695

Closed mgautierfr closed 4 months ago

mgautierfr commented 10 months ago

kiwix-build publish archives containing compile dependencies to be use by our project.

For example : https://tmp.kiwix.org/ci/deps2_focal_aarch64_dyn_libkiwix.tar.xz is the pre-compiled dependencies for the libkiwix project, build on focal to build using the aarch64_dyn target (even if target doesn't really exist at project level)

On project CI, this archive is downloaded using this kind of simple script:

ARCHIVE_NAME=deps2_${OS_NAME}_${{matrix.target}}_libkiwix.tar.xz
wget -O- http://tmp.kiwix.org/ci/${ARCHIVE_NAME} | tar -xJ -C /home/runner

But now kiwix-build publish these archives also for PR in a "dev_preview" directory. (https://github.com/kiwix/kiwix-build/pull/651). It would be nice that if we have a project PR (using branch foo) and a dependency archive exists in tmp.kiwix.org/ci/dev_preview/foo, we use this one (and fallback to the "main" archive if not).

We don't want to update and maintain such a script in all our projects. So it is probably time to create a github action which will download and install the right dependencies automatically.

kelson42 commented 4 months ago

@mgautierfr Is that not what has been done with https://github.com/kiwix/kiwix-build/tree/main/actions/dl_deps_archive ?

mgautierfr commented 4 months ago

Yes. It is done.