-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
46 lines (42 loc) · 1.73 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2023 Collabora, Ltd.
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- release
build-ubuntu-2204:
image: registry.freedesktop.org/mateosss/basalt/ubuntu/22.04
stage: build
when: manual
script:
- echo BUILD_UBUNTU_2204_JOB_ID=$CI_JOB_ID >> release.env
- cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBASALT_BUILD_SHARED_LIBRARY_ONLY=on -DCMAKE_CXX_FLAGS="-mtune=haswell -march=haswell" -DCMAKE_C_FLAGS="-mtune=haswell -march=haswell"
- time cmake --build build
- cd build && cpack
- mv *.deb ../basalt-monado-ubuntu-22.04-haswell-amd64.deb
artifacts:
name: basalt-monado-ubuntu-22.04-haswell-amd64
expose_as: "basalt-monado-ubuntu-2204-haswell-amd64-deb"
paths:
- "basalt-monado-ubuntu-22.04-haswell-amd64.deb"
reports:
dotenv: release.env
release:
stage: release
image: registry.freedesktop.org/mateosss/basalt/ubuntu/22.04
when: manual
script:
- echo "Releasing artifacts of previous jobs"
- curl --location --output /usr/local/bin/release-cli "https://gitlab.com/api/v4/projects/gitlab-org%2Frelease-cli/packages/generic/release-cli/latest/release-cli-linux-amd64"
- chmod +x /usr/local/bin/release-cli
needs: ["build-ubuntu-2204"]
release:
name: "Release of $CI_COMMIT_SHORT_SHA"
tag_name: "release-$CI_COMMIT_SHORT_SHA"
description: "Release of Monado's Basalt for $CI_COMMIT_SHORT_SHA"
assets:
links:
- name: "Ubuntu 22.04 .deb (amd64, -march=haswell)"
url: "https://gitlab.freedesktop.org/mateosss/basalt/-/jobs/${BUILD_UBUNTU_2204_JOB_ID}/artifacts/raw/basalt-monado-ubuntu-22.04-haswell-amd64.deb"
link_type: package