mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 11:28:49 +03:00
Add basic meson CI
This commit is contained in:
parent
956dbb7230
commit
6d175c1ae0
2 changed files with 65 additions and 12 deletions
13
.ci/gcc-9/Dockerfile
Normal file
13
.ci/gcc-9/Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
FROM ubuntu:20.04
|
||||
|
||||
# wget needs recommends
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y software-properties-common \
|
||||
&& add-apt-repository ppa:ubuntu-toolchain-r/test -y \
|
||||
&& add-apt-repository ppa:beineri/opt-qt-5.15.2-focal -y \
|
||||
&& apt-get update && apt-get -y install --no-install-recommends build-essential ninja-build qt515base qt515declarative qt515tools qt515multimedia qt515script qt515quickcontrols2 qt515svg liblmdb-dev libgl1-mesa-dev libssl-dev git ccache pkg-config libsecret-1-dev cmake python3-pip \
|
||||
&& apt-get -y install wget \
|
||||
&& pip3 install meson \
|
||||
&& /usr/sbin/update-ccache-symlinks \
|
||||
&& apt-get clean
|
||||
|
|
@ -4,28 +4,64 @@ variables:
|
|||
# prevent configure tzdata hanging apt install commands
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
build-gcc9:
|
||||
stage: build
|
||||
image: ubuntu:20.04
|
||||
stages:
|
||||
- prepare
|
||||
- build
|
||||
- deploy
|
||||
|
||||
prepare-gcc9-image:
|
||||
stage: prepare
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
tags: [docker]
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
changes:
|
||||
- .ci/gcc-9/Dockerfile
|
||||
script:
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||
- /kaniko/executor --whitelist-var-run=false --context $CI_PROJECT_DIR/.ci/gcc-9 --dockerfile $CI_PROJECT_DIR/.ci/gcc-9/Dockerfile --destination $CI_REGISTRY_IMAGE/gcc-9:latest
|
||||
|
||||
build-gcc9-meson:
|
||||
stage: build
|
||||
image: $CI_REGISTRY_IMAGE/gcc-9:latest
|
||||
tags: [docker]
|
||||
needs:
|
||||
- job: prepare-gcc9-image
|
||||
optional: true
|
||||
variables:
|
||||
QT_PKG: 515
|
||||
TRAVIS_OS_NAME: linux
|
||||
before_script:
|
||||
- . "/opt/qt${QT_PKG}/bin/qt${QT_PKG}-env.sh" || true
|
||||
script:
|
||||
- meson setup builddir
|
||||
- meson compile -C builddir
|
||||
cache:
|
||||
key: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- .ccache
|
||||
- subprojects/packagecache/
|
||||
|
||||
build-gcc9:
|
||||
stage: build
|
||||
image: $CI_REGISTRY_IMAGE/gcc-9:latest
|
||||
tags: [docker]
|
||||
needs:
|
||||
- job: prepare-gcc9-image
|
||||
optional: true
|
||||
variables:
|
||||
QT_PKG: 515
|
||||
TRAVIS_OS_NAME: linux
|
||||
before_script:
|
||||
- apt-get update
|
||||
- apt-get install -y software-properties-common
|
||||
- add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
- add-apt-repository ppa:beineri/opt-qt-5.15.2-focal -y
|
||||
- apt-get update && apt-get -y install --no-install-recommends build-essential ninja-build qt${QT_PKG}{base,declarative,tools,multimedia,script,quickcontrols2,svg} liblmdb-dev libgl1-mesa-dev libssl-dev git ccache pkg-config libsecret-1-dev cmake
|
||||
# need recommended deps for wget
|
||||
- apt-get -y install wget
|
||||
- /usr/sbin/update-ccache-symlinks
|
||||
- wget https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0-Linux-x86_64.sh && sh cmake-3.19.0-Linux-x86_64.sh --skip-license --prefix=/usr/local
|
||||
- rm -rf ../.hunter && mv .hunter ../.hunter || true
|
||||
- . "/opt/qt${QT_PKG}/bin/qt${QT_PKG}-env.sh" || true
|
||||
script:
|
||||
- export PATH="/usr/local/bin/:/usr/lib/ccache:${PATH}"
|
||||
- export CMAKE_BUILD_PARALLEL_LEVEL=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
|
||||
- . "/opt/qt${QT_PKG}/bin/qt${QT_PKG}-env.sh" || true
|
||||
- cmake -GNinja -H. -Bbuild
|
||||
-DCMAKE_INSTALL_PREFIX=.deps/usr
|
||||
-DHUNTER_ROOT="../.hunter"
|
||||
|
@ -50,6 +86,7 @@ build-macos:
|
|||
#- brew reinstall --force python3
|
||||
#- brew bundle --file=./.ci/macos/Brewfile --force --cleanup
|
||||
- rm -rf ../.hunter && mv .hunter ../.hunter || true
|
||||
needs: []
|
||||
script:
|
||||
- export PATH=/usr/local/opt/qt@5/bin/:${PATH}
|
||||
- export CMAKE_PREFIX_PATH=/usr/local/opt/qt@5
|
||||
|
@ -105,6 +142,7 @@ build-flatpak-amd64:
|
|||
image: ubuntu:latest
|
||||
#image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
|
||||
tags: [docker]
|
||||
needs: []
|
||||
before_script:
|
||||
# need flatpak 1.11.1 at least
|
||||
- apt-get update && apt-get install -y software-properties-common
|
||||
|
@ -135,6 +173,7 @@ build-flatpak-arm64:
|
|||
image: ubuntu:latest
|
||||
#image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
|
||||
tags: [docker-arm64]
|
||||
needs: []
|
||||
before_script:
|
||||
# need flatpak 1.11.1 at least
|
||||
- apt-get update && apt-get install -y software-properties-common
|
||||
|
@ -164,6 +203,7 @@ linting:
|
|||
stage: build
|
||||
image: alpine:latest
|
||||
tags: [docker]
|
||||
needs: []
|
||||
before_script:
|
||||
- apk update && apk add clang-extra-tools make git python3 py3-pip
|
||||
- export PATH="$PATH:/root/.local/bin"
|
||||
|
|
Loading…
Reference in a new issue