BlueGit

golden-age paperdoll-renderer

Files

paperdoll-renderer / blue-ci-cd.yml

blue-ci-cd.yml

blue-ci-cd.yml 5.0 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: POST /repos/$CI_PROJECT_PATH/releases creates the
14# git tag. opPublishRelease returns 409 when that tag already exists.
15# replace=true is rejected on a tag pipeline (403, checkReplace). scripts/ci/release.sh
16# still performs the documented call and fails on a non-2xx response. This
17# file does not create a tag by itself. No release has been started here.
18#
19# posprint notes two runner facts used below: jobs start in the checkout
20# (CI_PROJECT_DIR is not set), and artifact paths are exact files.
21# Windows is cross-compiled with MinGW, the same reason posprint gives:
22# no Windows runner on BlueGit.
23
24stages: [test, package, verify, release]
25
26variables:
27 CARGO_TERM_COLOR: always
28 RUST_BACKTRACE: "1"
29 CARGO_PROFILE_DEV_DEBUG: "false"
30 CARGO_PROFILE_TEST_DEBUG: "false"
31
32workflow:
33 rules:
34 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
35 - if: $CI_COMMIT_BRANCH == "master"
36 - if: $CI_COMMIT_BRANCH == "main"
37 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
38 - if: $CI_COMMIT_TAG != ""
39
40.rust:
41 image: rust:1.96-bookworm
42 timeout: 2h
43 before_script:
44 - export CARGO_HOME="$PWD/cargo-home"
45 - export PATH="$CARGO_HOME/bin:$PATH"
46 - apt-get update -qq
47 - apt-get install -y -qq pkg-config libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev python3
48
49.on_tag:
50 rules:
51 - if: $CI_COMMIT_TAG != ""
52
53test:
54 extends: .rust
55 stage: test
56 interruptible: true
57 cache:
58 key: cargo-test
59 paths: [target/, cargo-home/]
60 rules:
61 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
62 - if: $CI_COMMIT_BRANCH == "master"
63 - if: $CI_COMMIT_BRANCH == "main"
64 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
65 - if: $CI_COMMIT_TAG != ""
66 script:
67 - cargo fmt --check
68 - cargo check --workspace --all-targets --locked
69 - cargo clippy --workspace --all-targets --locked -- -D warnings
70 - cargo test --workspace --locked
71
72package:appimage:
73 extends: [.rust, .on_tag]
74 stage: package
75 needs: [test]
76 interruptible: true
77 cache:
78 key: cargo-linux
79 paths: [target/, cargo-home/]
80 before_script:
81 - export CARGO_HOME="$PWD/cargo-home"
82 - export PATH="$CARGO_HOME/bin:$PATH"
83 - apt-get update -qq
84 - apt-get install -y -qq pkg-config libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev file
85 script:
86 - bash scripts/package/appimage.sh
87 artifacts:
88 paths: [dist/paperdoll-renderer-x86_64.AppImage]
89 expire_in: 30d
90
91package:ubuntu:
92 extends: [.rust, .on_tag]
93 stage: package
94 needs: [test]
95 interruptible: true
96 cache:
97 key: cargo-linux
98 paths: [target/, cargo-home/]
99 before_script:
100 - export CARGO_HOME="$PWD/cargo-home"
101 - export PATH="$CARGO_HOME/bin:$PATH"
102 - apt-get update -qq
103 - apt-get install -y -qq pkg-config libxcb1-dev libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libgl1-mesa-dev dpkg-dev
104 script:
105 - bash scripts/package/deb.sh
106 artifacts:
107 paths: [dist/paperdoll-renderer_amd64.deb]
108 expire_in: 30d
109
110package:arch:
111 extends: .on_tag
112 stage: package
113 image: archlinux/archlinux:base-devel
114 timeout: 2h
115 needs: [test]
116 interruptible: true
117 script:
118 - pacman -Syu --noconfirm
119 - pacman -S --noconfirm --needed rust pkgconf libxkbcommon libxcb libx11 libglvnd git
120 - bash scripts/package/arch.sh
121 artifacts:
122 paths: [dist/paperdoll-renderer-x86_64.pkg.tar.zst]
123 expire_in: 30d
124
125# MinGW cross build. posprint documents this because BlueGit has no Windows runner.
126package:windows:
127 extends: [.rust, .on_tag]
128 stage: package
129 needs: [test]
130 interruptible: true
131 cache:
132 key: cargo-windows
133 paths: [target/, cargo-home/]
134 before_script:
135 - export CARGO_HOME="$PWD/cargo-home"
136 - export PATH="$CARGO_HOME/bin:$PATH"
137 - apt-get update -qq
138 - apt-get install -y -qq gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 zip
139 - rustup target add x86_64-pc-windows-gnu
140 script:
141 - bash scripts/package/windows.sh
142 artifacts:
143 paths: [dist/paperdoll-renderer-windows-x86_64.zip]
144 expire_in: 30d
145
146verify:packages:
147 stage: verify
148 image: bluegit/base
149 extends: .on_tag
150 needs: [package:appimage, package:ubuntu, package:arch, package:windows]
151 script:
152 - bash scripts/ci/verify-packages.sh
153 artifacts:
154 paths: [dist/SHA256SUMS]
155 expire_in: 30d
156
157release:
158 stage: release
159 image: bluegit/base
160 extends: .on_tag
161 needs: [verify:packages, package:appimage, package:ubuntu, package:arch, package:windows]
162 resource_group: release
163 script:
164 - bash scripts/ci/release.sh