EVO-melroy-winegui/.gitlab-ci.yml

65 lines
1.6 KiB
YAML

image: danger89/gtk3-docker-cmake-ninja:4.0
stages:
- test
- build
static_code_analysis:
stage: test
script:
- cppcheck --version
- ./scripts/cpp_check.sh
code_style_guidelines:
stage: test
script:
- clang-format --version
- ./scripts/check_format.sh
# Build WineGUI + Doxygen
test-build:
stage: build
rules:
- if: "$CI_COMMIT_TAG == null"
script: ./scripts/build_prod.sh
artifacts:
name: "Packages + Documentation"
expire_in: 1 month
paths:
- doc/doxygen/
- build_prod/WineGUI-*.deb
- build_prod/WineGUI-*.rpm
- build_prod/WineGUI-*.tar.gz
# Build Prd & Deploy new release on a new tag (deployment job),
# which includes the deb, rpm and tar.gz file as well as the latest release txt file.
# And will automatically create asset links to the existing GitLab release towards the deployment URL target files.
build-and-deploy:
stage: build
rules:
- if: '$CI_COMMIT_TAG && $CI_PROJECT_NAMESPACE == "melroy"'
script:
- ./scripts/build_prod.sh
- export APP_VERSION=${CI_COMMIT_TAG}
- ./scripts/create_release_links.sh
- ./scripts/create_latest_release_file.sh
environment:
name: production
url: https://winegui.melroy.org/downloads
artifacts:
name: "Packages + Documentation"
expire_in: 3 months
paths:
- doc/doxygen/
- release/
- build_prod/WineGUI-*.deb
- build_prod/WineGUI-*.rpm
- build_prod/WineGUI-*.tar.gz
#unit_test:
# stage: test
# script: ./build_prod/bin/runTests
# cache:
# key: "$CI_PIPELINE_ID"
# policy: pull
# paths:
# - build_prod/bin/