BlueGit

golden-age paperdoll-renderer

Files

paperdoll-renderer / blue-ci-cd.yml

blue-ci-cd.yml

blue-ci-cd.yml 5.9 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. The AUR job follows
6# timfa/legacy-cycles (aur-ssh-setup.sh, publish-aur.sh).
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, one release publish, then the AUR
12#
13# Release (design.md, v0.1.0 decision, rechecked 7 November 2026 against the
14# live OpenAPI): the release job publishes onto the tag that started this
15# pipeline with POST /repos/$CI_PROJECT_PATH/releases/$CI_COMMIT_TAG/assets,
16# BlueGit's create-only route for an existing tag (409 if a release exists;
17# never creates, moves or deletes the tag). replace is never sent and the
18# tag-creating release route is not called. Tags are pushed by hand on a green
19# master; publish:aur then updates the AUR package paperdoll-renderer-bin.
20#
21# posprint notes two runner facts used below: jobs start in the checkout
22# (CI_PROJECT_DIR is not set), and artifact paths are exact files.
23# Windows is cross-compiled with MinGW, the same reason posprint gives:
24# no Windows runner on BlueGit.
25
26stages: [test, package, verify, release, publish]
27
28variables:
29 CARGO_TERM_COLOR: always
30 RUST_BACKTRACE: "1"
31 CARGO_PROFILE_DEV_DEBUG: "false"
32 CARGO_PROFILE_TEST_DEBUG: "false"
33
34workflow:
35 rules:
36 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
37 - if: $CI_COMMIT_BRANCH == "master"
38 - if: $CI_COMMIT_BRANCH == "main"
39 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
40 - if: $CI_COMMIT_TAG != ""
41
42.rust:
43 image: rust:1.96-bookworm
44 timeout: 2h
45 before_script:
46 - export CARGO_HOME="$PWD/cargo-home"
47 - export PATH="$CARGO_HOME/bin:$PATH"
48 - apt-get update -qq
49 - apt-get install -y -qq pkg-config gcc libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev python3
50
51.on_tag:
52 rules:
53 - if: $CI_COMMIT_TAG != ""
54
55test:
56 extends: .rust
57 stage: test
58 interruptible: true
59 cache:
60 key: cargo-test
61 paths: [target/, cargo-home/]
62 rules:
63 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
64 - if: $CI_COMMIT_BRANCH == "master"
65 - if: $CI_COMMIT_BRANCH == "main"
66 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
67 - if: $CI_COMMIT_TAG != ""
68 script:
69 - cargo fmt --check
70 - cargo check --workspace --all-targets --locked
71 - cargo clippy --workspace --all-targets --locked -- -D warnings
72 - cargo test --workspace --locked
73
74package:appimage:
75 extends: [.rust, .on_tag]
76 stage: package
77 needs: [test]
78 interruptible: true
79 cache:
80 key: cargo-linux
81 paths: [target/, cargo-home/]
82 before_script:
83 - export CARGO_HOME="$PWD/cargo-home"
84 - export PATH="$CARGO_HOME/bin:$PATH"
85 - apt-get update -qq
86 - apt-get install -y -qq pkg-config gcc libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev file
87 script:
88 - bash scripts/package/appimage.sh
89 artifacts:
90 paths: [dist/paperdoll-renderer-x86_64.AppImage]
91 expire_in: 30d
92
93package:ubuntu:
94 extends: [.rust, .on_tag]
95 stage: package
96 needs: [test]
97 interruptible: true
98 cache:
99 key: cargo-linux
100 paths: [target/, cargo-home/]
101 before_script:
102 - export CARGO_HOME="$PWD/cargo-home"
103 - export PATH="$CARGO_HOME/bin:$PATH"
104 - apt-get update -qq
105 - apt-get install -y -qq pkg-config gcc libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev dpkg-dev
106 script:
107 - bash scripts/package/deb.sh
108 artifacts:
109 paths: [dist/paperdoll-renderer_amd64.deb]
110 expire_in: 30d
111
112package:arch:
113 extends: .on_tag
114 stage: package
115 image: archlinux/archlinux:base-devel
116 timeout: 2h
117 needs: [test]
118 interruptible: true
119 script:
120 - pacman -Syu --noconfirm
121 - pacman -S --noconfirm --needed base-devel rust pkgconf libxkbcommon libxcb libx11 libglvnd git
122 - bash scripts/package/arch.sh
123 artifacts:
124 paths: [dist/paperdoll-renderer-x86_64.pkg.tar.zst]
125 expire_in: 30d
126
127# MinGW cross build. posprint documents this because BlueGit has no Windows runner.
128package:windows:
129 extends: [.rust, .on_tag]
130 stage: package
131 needs: [test]
132 interruptible: true
133 cache:
134 key: cargo-windows
135 paths: [target/, cargo-home/]
136 before_script:
137 - export CARGO_HOME="$PWD/cargo-home"
138 - export PATH="$CARGO_HOME/bin:$PATH"
139 - apt-get update -qq
140 - apt-get install -y -qq gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 zip python3
141 - rustup target add x86_64-pc-windows-gnu
142 - export CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc
143 - export AR_x86_64_pc_windows_gnu=x86_64-w64-mingw32-ar
144 script:
145 - bash scripts/package/windows.sh
146 artifacts:
147 paths: [dist/paperdoll-renderer-windows-x86_64.zip]
148 expire_in: 30d
149
150verify:packages:
151 stage: verify
152 image: bluegit/base
153 extends: .on_tag
154 needs: [package:appimage, package:ubuntu, package:arch, package:windows]
155 script:
156 - bash scripts/ci/verify-packages.sh
157 artifacts:
158 paths: [dist/SHA256SUMS]
159 expire_in: 30d
160
161release:
162 stage: release
163 image: bluegit/base
164 extends: .on_tag
165 needs: [verify:packages, package:appimage, package:ubuntu, package:arch, package:windows]
166 resource_group: release
167 script:
168 - bash scripts/ci/release.sh
169
170# AUR (approach of timfa/legacy-cycles): after the release, publish
171# paperdoll-renderer-bin from this tag's .deb release asset. Protected
172# variables (AUR_SSH_PRIVATE_KEY_B64, AUR_GIT_AUTHOR_NAME, AUR_GIT_AUTHOR_EMAIL)
173# reach only protected refs; v* is a protected tag pattern.
174# allow_failure: an AUR outage does not turn the release red.
175publish:aur:
176 stage: publish
177 image: archlinux/archlinux:base-devel
178 extends: .on_tag
179 needs: [release]
180 allow_failure: true
181 resource_group: aur
182 script:
183 - pacman -Syu --noconfirm --needed git openssh curl coreutils shadow util-linux
184 - bash scripts/ci/aur-ssh-setup.sh
185 - bash scripts/ci/publish-aur.sh paperdoll-renderer-bin