BlueGit

golden-age paperdoll-renderer

Files

paperdoll-renderer / blue-ci-cd.yml

blue-ci-cd.yml

59dd3616 History
blue-ci-cd.yml 5.2 KiB Download Raw
1# Paperdoll Renderer — BlueGit CI (git.timfalken.com).
2#
3# Syntax checked on 6 November 2026 against GET /api/v1/ci/spec,
4# timfa/bluegit docs/CI.md, and the public pipelines of timfa/posprint,
5# timfa/minecart-trains and timfa/click-tween. legacy-cycles publishes
6# releases only; its pipeline file is not public and was not copied.
7#
8# Requested graph:
9# merge request and master/main push -> test
10# tag push, after tests succeed -> AppImage, Ubuntu package, Arch package,
11# Windows build, artifact check, then one release publish
12#
13# Verified release limit, rechecked against api_routes.go on master: no route
14# attaches artifacts to an existing tag or release. POST /repos/$CI_PROJECT_PATH/releases
15# creates the git tag (409 if it exists). replace=true is 403 on a tag pipeline.
16# scripts/ci/release.sh does not call that route and does not send replace.
17# The release job exits 3 until BlueGit adds the attach route in design.md.
18# This file does not create a tag. No release has been started here.
19#
20# posprint notes two runner facts used below: jobs start in the checkout
21# (CI_PROJECT_DIR is not set), and artifact paths are exact files.
22# Windows is cross-compiled with MinGW, the same reason posprint gives:
23# no Windows runner on BlueGit.
24
25stages: [test, package, verify, release]
26
27variables:
28 CARGO_TERM_COLOR: always
29 RUST_BACKTRACE: "1"
30 CARGO_PROFILE_DEV_DEBUG: "false"
31 CARGO_PROFILE_TEST_DEBUG: "false"
32
33workflow:
34 rules:
35 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
36 - if: $CI_COMMIT_BRANCH == "master"
37 - if: $CI_COMMIT_BRANCH == "main"
38 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
39 - if: $CI_COMMIT_TAG != ""
40
41.rust:
42 image: rust:1.96-bookworm
43 timeout: 2h
44 before_script:
45 - export CARGO_HOME="$PWD/cargo-home"
46 - export PATH="$CARGO_HOME/bin:$PATH"
47 - apt-get update -qq
48 - apt-get install -y -qq pkg-config gcc libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev python3
49
50.on_tag:
51 rules:
52 - if: $CI_COMMIT_TAG != ""
53
54test:
55 extends: .rust
56 stage: test
57 interruptible: true
58 cache:
59 key: cargo-test
60 paths: [target/, cargo-home/]
61 rules:
62 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
63 - if: $CI_COMMIT_BRANCH == "master"
64 - if: $CI_COMMIT_BRANCH == "main"
65 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
66 - if: $CI_COMMIT_TAG != ""
67 script:
68 - cargo fmt --check
69 - cargo check --workspace --all-targets --locked
70 - cargo clippy --workspace --all-targets --locked -- -D warnings
71 - cargo test --workspace --locked
72
73package:appimage:
74 extends: [.rust, .on_tag]
75 stage: package
76 needs: [test]
77 interruptible: true
78 cache:
79 key: cargo-linux
80 paths: [target/, cargo-home/]
81 before_script:
82 - export CARGO_HOME="$PWD/cargo-home"
83 - export PATH="$CARGO_HOME/bin:$PATH"
84 - apt-get update -qq
85 - apt-get install -y -qq pkg-config gcc libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev file
86 script:
87 - bash scripts/package/appimage.sh
88 artifacts:
89 paths: [dist/paperdoll-renderer-x86_64.AppImage]
90 expire_in: 30d
91
92package:ubuntu:
93 extends: [.rust, .on_tag]
94 stage: package
95 needs: [test]
96 interruptible: true
97 cache:
98 key: cargo-linux
99 paths: [target/, cargo-home/]
100 before_script:
101 - export CARGO_HOME="$PWD/cargo-home"
102 - export PATH="$CARGO_HOME/bin:$PATH"
103 - apt-get update -qq
104 - apt-get install -y -qq pkg-config gcc libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev dpkg-dev
105 script:
106 - bash scripts/package/deb.sh
107 artifacts:
108 paths: [dist/paperdoll-renderer_amd64.deb]
109 expire_in: 30d
110
111package:arch:
112 extends: .on_tag
113 stage: package
114 image: archlinux/archlinux:base-devel
115 timeout: 2h
116 needs: [test]
117 interruptible: true
118 script:
119 - pacman -Syu --noconfirm
120 - pacman -S --noconfirm --needed base-devel rust pkgconf libxkbcommon libxcb libx11 libglvnd git
121 - bash scripts/package/arch.sh
122 artifacts:
123 paths: [dist/paperdoll-renderer-x86_64.pkg.tar.zst]
124 expire_in: 30d
125
126# MinGW cross build. posprint documents this because BlueGit has no Windows runner.
127package:windows:
128 extends: [.rust, .on_tag]
129 stage: package
130 needs: [test]
131 interruptible: true
132 cache:
133 key: cargo-windows
134 paths: [target/, cargo-home/]
135 before_script:
136 - export CARGO_HOME="$PWD/cargo-home"
137 - export PATH="$CARGO_HOME/bin:$PATH"
138 - apt-get update -qq
139 - apt-get install -y -qq gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 zip
140 - rustup target add x86_64-pc-windows-gnu
141 - export CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc
142 - export AR_x86_64_pc_windows_gnu=x86_64-w64-mingw32-ar
143 script:
144 - bash scripts/package/windows.sh
145 artifacts:
146 paths: [dist/paperdoll-renderer-windows-x86_64.zip]
147 expire_in: 30d
148
149verify:packages:
150 stage: verify
151 image: bluegit/base
152 extends: .on_tag
153 needs: [package:appimage, package:ubuntu, package:arch, package:windows]
154 script:
155 - bash scripts/ci/verify-packages.sh
156 artifacts:
157 paths: [dist/SHA256SUMS]
158 expire_in: 30d
159
160release:
161 stage: release
162 image: bluegit/base
163 extends: .on_tag
164 needs: [verify:packages, package:appimage, package:ubuntu, package:arch, package:windows]
165 resource_group: release
166 script:
167 - bash scripts/ci/release.sh