diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-04-05 20:54:17 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-04-28 17:54:02 +0200 |
commit | afffb9e57d6f4194398493aeecdb1ba6a0f42622 (patch) | |
tree | c011fe0c3b183566f016050930bf9ee30a149d63 | |
parent | 4a1f1977435c7153d97652984aa783c2cbd1e803 (diff) | |
download | meson-afffb9e57d6f4194398493aeecdb1ba6a0f42622.zip meson-afffb9e57d6f4194398493aeecdb1ba6a0f42622.tar.gz meson-afffb9e57d6f4194398493aeecdb1ba6a0f42622.tar.bz2 |
ci: Added bionic image
-rw-r--r-- | .github/workflows/images.yml | 1 | ||||
-rw-r--r-- | .github/workflows/os_comp.yml | 1 | ||||
-rw-r--r-- | ci/ciimage/bionic/image.json | 8 | ||||
-rwxr-xr-x | ci/ciimage/bionic/install.sh | 58 | ||||
-rwxr-xr-x | ci/ciimage/build.py | 5 |
5 files changed, 72 insertions, 1 deletions
diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index bde2223..0cf9156 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -31,6 +31,7 @@ jobs: - { name: CUDA (on Arch), id: cuda } - { name: Fedora, id: fedora } - { name: OpenSUSE, id: opensuse } + - { name: Ubuntu Bionic, id: bionic } - { name: Ubuntu Eoan, id: eoan } steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml index 7f3437e..4a6d7cd 100644 --- a/.github/workflows/os_comp.yml +++ b/.github/workflows/os_comp.yml @@ -39,6 +39,7 @@ jobs: - { name: CUDA (on Arch), id: cuda } - { name: Fedora, id: fedora } - { name: OpenSUSE, id: opensuse } + - { name: Ubuntu Bionic, id: bionic } container: mesonbuild/${{ matrix.cfg.id }}:latest steps: - uses: actions/checkout@v1 diff --git a/ci/ciimage/bionic/image.json b/ci/ciimage/bionic/image.json new file mode 100644 index 0000000..6a3d723 --- /dev/null +++ b/ci/ciimage/bionic/image.json @@ -0,0 +1,8 @@ +{ + "base_image": "ubuntu:bionic", + "env": { + "CI": "1", + "SKIP_SCIENTIFIC": "1", + "DC": "gdc" + } +} diff --git a/ci/ciimage/bionic/install.sh b/ci/ciimage/bionic/install.sh new file mode 100755 index 0000000..47deb2a --- /dev/null +++ b/ci/ciimage/bionic/install.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +set -e + +export DEBIAN_FRONTEND=noninteractive +export LANG='C.UTF-8' +export DC=gdc + +pkgs=( + python3-pytest-xdist + python3-pip libxml2-dev libxslt1-dev libyaml-dev libjson-glib-dev + wget unzip cmake doxygen + clang + pkg-config-arm-linux-gnueabihf + qt4-linguist-tools qt5-default qtbase5-private-dev + python-dev + libomp-dev + ldc + libclang-dev + libgcrypt20-dev + libgpgme-dev + libhdf5-dev openssh-server + libboost-python-dev libboost-regex-dev + libblocksruntime-dev + libperl-dev libscalapack-mpi-dev libncurses-dev +) + +boost_pkgs=(atomic chrono date-time filesystem log regex serialization system test thread) + +sed -i '/^#\sdeb-src /s/^#//' "/etc/apt/sources.list" +apt-get -y update +apt-get -y upgrade +apt-get -y install eatmydata + +# Base stuff +eatmydata apt-get -y build-dep meson + +# Add boost packages +for i in "${boost_pkgs[@]}"; do + for j in "1.62.0" "1.65.1"; do + pkgs+=("libboost-${i}${j}") + done +done + +# packages +eatmydata apt-get -y install "${pkgs[@]}" + +eatmydata python3 -m pip install codecov jsonschema + +# Install the ninja 0.10 +wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip +unzip ninja-linux.zip -d /ci + +# cleanup +apt-get -y remove ninja-build +apt-get -y clean +apt-get -y autoclean +rm ninja-linux.zip diff --git a/ci/ciimage/build.py b/ci/ciimage/build.py index 34a92fa..e623a7e 100755 --- a/ci/ciimage/build.py +++ b/ci/ciimage/build.py @@ -71,6 +71,9 @@ class Builder(BuilderBase): for key, val in self.image_def.env.items(): out_data += f'export {key}="{val}"\n' + # Also add /ci to PATH + out_data += 'export PATH="/ci:$PATH"\n' + out_file.write_text(out_data) # make it executable @@ -157,7 +160,7 @@ class ImageTester(BuilderBase): test_cmd = [ self.docker, 'run', '--rm', '-t', 'meson_test_image', - '/usr/bin/bash', '-c', 'source /ci/env_vars.sh; cd meson; ./run_tests.py $CI_ARGS' + '/bin/bash', '-c', 'source /ci/env_vars.sh; cd meson; ./run_tests.py $CI_ARGS' ] if subprocess.run(test_cmd).returncode != 0: raise RuntimeError('Running tests failed') |