EVO-melroy-winegui/.gitlab-ci.yml
2025-03-24 16:10:49 +01:00

69 lines
1.7 KiB
YAML

default:
image: registry.melroy.org/melroy/docker-images/gtk3-docker-cmake-ninja:bookworm
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
only:
- merge_requests
- main
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_source_archive.sh
- ./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
- build_prod/WineGUI-Source-*.tar.gz
#unit_test:
# stage: test
# script: ./build_prod/bin/runTests
# cache:
# key: "$CI_PIPELINE_ID"
# policy: pull
# paths:
# - build_prod/bin/