mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 08:17:40 -04:00
ci: Add GitLab CI configuration for Linux builds
Add GitLab CI with Linux builds on Alpine, Arch, Fedora, and Ubuntu using both make and meson build systems. Generated-by: Claude Code 1.0.65 (claude-sonnet-4@20250514) Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
e896802631
commit
04f948e83f
1 changed files with 65 additions and 0 deletions
65
.gitlab-ci.yml
Normal file
65
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GIT_DEPTH: 1
|
||||||
|
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "ci"
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
|
||||||
|
# Linux builds with make
|
||||||
|
.build-make-template: &build-make-template
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- ./scripts/install-deps.sh
|
||||||
|
script:
|
||||||
|
- make
|
||||||
|
- make check
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
|
build-make-alpine:
|
||||||
|
<<: *build-make-template
|
||||||
|
image: alpine:latest
|
||||||
|
|
||||||
|
build-make-archlinux:
|
||||||
|
<<: *build-make-template
|
||||||
|
image: archlinux:latest
|
||||||
|
|
||||||
|
build-make-fedora:
|
||||||
|
<<: *build-make-template
|
||||||
|
image: fedora:latest
|
||||||
|
|
||||||
|
build-make-ubuntu:
|
||||||
|
<<: *build-make-template
|
||||||
|
image: ubuntu:latest
|
||||||
|
|
||||||
|
# Linux builds with meson
|
||||||
|
.build-meson-template: &build-meson-template
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- ./scripts/install-deps.sh
|
||||||
|
script:
|
||||||
|
- meson setup -D python=enabled -D yaml=enabled build
|
||||||
|
- meson compile -C build
|
||||||
|
- if ! meson test -C build; then cat build/meson-logs/testlog.txt; false; fi
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
|
build-meson-alpine:
|
||||||
|
<<: *build-meson-template
|
||||||
|
image: alpine:latest
|
||||||
|
|
||||||
|
build-meson-archlinux:
|
||||||
|
<<: *build-meson-template
|
||||||
|
image: archlinux:latest
|
||||||
|
|
||||||
|
build-meson-fedora:
|
||||||
|
<<: *build-meson-template
|
||||||
|
image: fedora:latest
|
||||||
|
|
||||||
|
build-meson-ubuntu:
|
||||||
|
<<: *build-meson-template
|
||||||
|
image: ubuntu:latest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue