Build in parallel and RPM validation

This commit is contained in:
Andrea Scarpino 2021-06-07 23:16:19 +02:00
parent b5c01f4425
commit 4b080ab4e2

View file

@ -1,53 +1,64 @@
stages:
- build
- test
- publish
.build:
stage: build
allow_failure: true
image: "coderus/sailfishos-platform-sdk:${SFOS_VERSION}"
variables:
ARCH: armv7hl
SFOS_VERSION: "3.4.0.24"
image: coderus/sailfishos-platform-sdk:${SFOS_VERSION}
artifacts:
paths:
- "output/*"
script:
- sudo mkdir output
- mkdir output
- mkdir ~/build
- cp -r * ~/build
- pushd ~/build
- mb2 -t SailfishOS-$SFOS_VERSION-armv7hl build
- mb2 -t SailfishOS-$SFOS_VERSION-$ARCH build
- popd
- sudo cp -v ~/build/RPMS/* output
- rm -rf ~/build/*
- cp -r * ~/build
- pushd ~/build
- mb2 -t SailfishOS-$SFOS_VERSION-i486 build
- popd
- sudo cp -v ~/build/RPMS/* output
- rm -rf ~/build/*
- cp -r * ~/build
- pushd ~/build
- mb2 -t SailfishOS-$SFOS_VERSION-aarch64 build
- popd
- sudo cp -v ~/build/RPMS/* output
- ls -la output
- cp -v ~/build/RPMS/* output
only:
- merge_requests
- tags
tags:
- docker
build:
build_armv7hl:
extends: .build
build_i486:
extends: .build
variables:
SFOS_VERSION: "3.4.0.24"
ARCH: i486
build_aarch64:
extends: .build
variables:
ARCH: aarch64
test:validate-rpms:
stage: test
image: registry.gitlab.com/whisperfish/sailo-rs/rpm-validator:latest
allow_failure: true
needs:
- build_armv7hl
- build_i486
- build_aarch64
script:
- rpmvalidation.sh output/*.rpm
only:
- merge_requests
- tags
publish:
image: inetprocess/gitlab-release
stage: publish
only:
- tags
dependencies:
- build
script:
- gitlab-release --message 'Release $CI_COMMIT_TAG' output/*
image: inetprocess/gitlab-release
stage: publish
needs:
- build_armv7hl
- build_i486
- build_aarch64
only:
- tags
script:
- gitlab-release --message 'Release $CI_COMMIT_TAG' output/*