We never use the android platform in other project. We always an arch
specific android platform (android_arm).
So, do not try to do any dependencies archives there.
Especially if travis kill the job because it takes too long to create
the archive.
As we now move to multi-arch build, we may have things compiled natively
or "neutral" (as toolchains). So we cannot use the BASE_DIR as
relative_path because BASE_DIR is arch dependent.
Compiling all dependencies for all archs takes a too long time for travis.
By downloading the cache of specific android arch, we avoid to recompile
them.
Android will need kiwix-lib builder to build, so we cannot make the
target_only.
If we are building a PR comming from a fork, the secret key will not
be available and we cannot decrypt the ssh key.
And if the ssh key cannot be decrypted, we should not try to use it to
upload base dependencies.
`cron` and deployement are made only on "secured environment" so we don't
need to test for existance of the key because we are sure that we have
been able to decrypt it.
The deps will be build only if we are in a cron.
In this case, we can directly build only the target.
But in other case, we have to build the target and its dependencies.
As we want to use qt and packages are available only since ubuntu artful, we
need to use docker because travis-ci is ubuntu trusty.
We could also build qt, but it takes too many time and travis timeout.
- kiwix-build is installable, so let's install it in travisCI
- Declare the dependency to meson in the setup.py
- As kiwixbuild is installed, we don't need to change the `sys.path`
- Install all packages using travis apt plugin
- Copy ninja binary in $HOME/bin.
We still need sudo required because travis image has more memory in this
case and this is needed to test big cluster in libzim.
kiwix-android is following its own release process and tagging policy.
Will should fix this in the future but trying to compile kiwix-android
master branch may fail with tagged version of kiwix-lib.
`compile_all.sh` script starts to be very complex.
Let's rewrite it in python.
In the same time, update the travis scripts to handle deployement of
release versions.
There are some problem in meson 0.44.0.
`meson` change the way it detects static libraries (to something that seems
better to me), but it breaks some of our build that we have to fix.
Until we have fixed our dependencies declaration, let's force meson to
be in 0.43.0.
This publish the same this that nightly build except that :
- Use the `--make-release` option to force kiwix-build to use tagged
version of subprojects.
- The archives are named using the tag name.
- The archives are pushed to "releases" directory in download.kiwix.org.
I don't know why, but the travis build doesn't work since few days.
It seems that pip3 cannot install in `/usr/local` anymore.
Probably related to last travis change* as a lot of people seems to have
problem with this update and python (even if this is not the same problems)
Anyway, we should not install a dependencies in global environment without
a sudo. Let's install the pip3 dependencies for the user only.
[*] https://docs.travis-ci.com/user/build-environment-updates/2017-09-06/
Previous script (from kiwix repository) created a APK with all architecture embeded.
Now, we generated a APK per architecture. It simplify the build process and
generate smaller APKs.
We may end in a deadlock if we publish dependencies archives at the end
of the compilation and if all compilation succeed.
For example project B may depend on project A.
If we change the project A API and the project B code to reflect the API
change and merge A' API in master and create a PR for B, the PR for B
will need a new archive with new project A' API.
However, as B' master fails with new A, the whole compilation fails and
nothing is publish. So B'PR is never compiled successfully.
By publish the archives as soons as generated, the A' new API will be
published and B'PR will compile correctly, even if master fails.
Will be able to merge B'PR without bypassing travisCI.
Those dependencies will be used by travis CI in other projects.
We want to avoid other project to need a ssh key to get them :
- To avoid spread(and maintenance) of ssh key.
- For PR coming from another repositories, ssh key is not available.
By making those dependencies available by http, we simplify the process.
Fix partially #34.
Archives download need to be updated in client projects.
If we want to build other projects (kiwix-lib, kiwix-tools) with travis,
it is better to have all dependencies already compiled.
kiwix-build project now compiles them and publishes the dependencies
archive at the right place where other projects can use them.
Make `kiwix-build.py` also fail if sub-command fail instead of just print
an error message and quit.
`kiwix-deploy.py` is far more simple and already fails miserably if a
sub-command fails.