Merge pull request #367 from kiwix/win32_fedora
Use fedora 30 to cross compile kiwix-tools.
This commit is contained in:
commit
deff7fe50e
|
@ -31,6 +31,9 @@ jobs:
|
||||||
- stage: build_docker_images
|
- stage: build_docker_images
|
||||||
script: *build_images
|
script: *build_images
|
||||||
env: VARIANT=bionic
|
env: VARIANT=bionic
|
||||||
|
- stage: build_docker_images
|
||||||
|
script: *build_images
|
||||||
|
env: VARIANT=f30
|
||||||
- stage: android_build
|
- stage: android_build
|
||||||
env: PLATFORM="android"
|
env: PLATFORM="android"
|
||||||
if: type != pull_request
|
if: type != pull_request
|
||||||
|
@ -70,7 +73,7 @@ script:
|
||||||
then
|
then
|
||||||
VARIANT=xenial
|
VARIANT=xenial
|
||||||
if [[ $DESKTOP_ONLY = 1 ]]; then VARIANT=bionic; fi
|
if [[ $DESKTOP_ONLY = 1 ]]; then VARIANT=bionic; fi
|
||||||
if [[ $PLATFORM =~ ^win32_* ]]; then VARIANT=bionic; fi
|
if [[ $PLATFORM =~ ^win32_* ]]; then VARIANT=f30; fi
|
||||||
fi
|
fi
|
||||||
- |
|
- |
|
||||||
if [[ $TRAVIS_OS_NAME = "linux" ]]
|
if [[ $TRAVIS_OS_NAME = "linux" ]]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
_fedora_common = ['automake', 'libtool', 'cmake', 'git', 'subversion', 'ccache', 'pkgconfig', 'gcc-c++', 'gettext-devel']
|
_fedora_common = ['automake', 'libtool', 'cmake', 'git', 'subversion', 'ccache', 'pkg-config', 'gcc-c++', 'gettext-devel']
|
||||||
_debian_common = ['automake', 'libtool', 'cmake', 'git', 'subversion', 'ccache', 'pkg-config', 'gcc', 'autopoint']
|
_debian_common = ['automake', 'libtool', 'cmake', 'git', 'subversion', 'ccache', 'pkg-config', 'gcc', 'autopoint']
|
||||||
PACKAGE_NAME_MAPPERS = {
|
PACKAGE_NAME_MAPPERS = {
|
||||||
'flatpak': {
|
'flatpak': {
|
||||||
|
|
|
@ -89,7 +89,7 @@ def run_kiwix_build(target, platform,
|
||||||
command = ['kiwix-build']
|
command = ['kiwix-build']
|
||||||
command.append(target)
|
command.append(target)
|
||||||
command.append('--hide-progress')
|
command.append('--hide-progress')
|
||||||
if platform == 'flatpak':
|
if platform == 'flatpak' or platform.startswith('win32_'):
|
||||||
command.append('--assume-packages-installed')
|
command.append('--assume-packages-installed')
|
||||||
if target == 'kiwix-android' and platform.startswith('android_'):
|
if target == 'kiwix-android' and platform.startswith('android_'):
|
||||||
command.extend(['--target-platform', 'android', '--android-arch', platform[8:]])
|
command.extend(['--target-platform', 'android', '--android-arch', platform[8:]])
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
FROM fedora:30
|
||||||
|
|
||||||
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
|
RUN dnf install -y --nodocs \
|
||||||
|
# Base build tools
|
||||||
|
make automake libtool cmake git-core subversion pkg-config gcc-c++ \
|
||||||
|
wget unzip ninja-build ccache which patch \
|
||||||
|
# Cross win32 compiler
|
||||||
|
mingw32-gcc-c++ mingw32-bzip2-static mingw32-win-iconv-static \
|
||||||
|
mingw32-winpthreads-static mingw32-zlib-static mingw32-xz-libs-static \
|
||||||
|
mingw32-libmicrohttpd \
|
||||||
|
# Other tools (to remove)
|
||||||
|
# vim less grep
|
||||||
|
&& dnf remove -y "*-doc" \
|
||||||
|
&& dnf autoremove -y \
|
||||||
|
&& dnf clean all
|
||||||
|
|
||||||
|
# Create user
|
||||||
|
RUN useradd --create-home ci_builder
|
||||||
|
USER ci_builder
|
||||||
|
WORKDIR /home/ci_builder
|
||||||
|
ENV PATH="/home/ci_builder/.local/bin:${PATH}"
|
||||||
|
|
||||||
|
ENV TRAVIS_BUILD_DIR /home/ci_builder/kiwix-build
|
||||||
|
ENV TRAVIS_OS_NAME linux_f30
|
||||||
|
|
||||||
|
CMD pip3 install --user ./kiwix-build && kiwix-build/travis/compile_all.py
|
Loading…
Reference in New Issue