Skip to content

Commit 79d549b

Browse files
authored
Merge branch 'master' into feat/disallow-debug-format
2 parents 45cc780 + 12b0865 commit 79d549b

File tree

40 files changed

+530
-180
lines changed

40 files changed

+530
-180
lines changed

.config/dictionaries/project.dic

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
aarch
2+
autogen
23
bindgen
34
binstall
45
bkioshn
@@ -11,6 +12,7 @@ chtml
1112
codegen
1213
colordiff
1314
cowsay
15+
cuelang
1416
cytopia
1517
depgraph
1618
devenv
@@ -24,6 +26,7 @@ doublecircle
2426
Earthfile
2527
Earthfiles
2628
Edgedriver
29+
EPREFIX
2730
errchkjson
2831
extldflags
2932
findutils
@@ -67,9 +70,13 @@ libasound
6770
libatk
6871
libatspi
6972
libdrm
73+
libexpat
74+
libfreetype
7075
libgbm
7176
libgcc
77+
liblasi
7278
libnss
79+
librsvg
7380
libsqlite
7481
libxkbcommon
7582
libxshmfence
@@ -81,13 +88,17 @@ metno
8188
mithril
8289
mkdocs
8390
modcache
91+
molinski
8492
mozallowfullscreen
8593
msedgedriver
94+
multilib
8695
multirepo
8796
nextest
8897
nilnil
8998
nixos
9099
nixpkgs
100+
noninteractive
101+
nproc
91102
onsi
92103
penwidth
93104
pkeyopt
@@ -126,6 +137,7 @@ testunit
126137
Timoni
127138
toolsets
128139
transpiling
140+
trixie
129141
UDCs
130142
unarchiving
131143
uniseg

docs/Earthfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ src:
2121
COPY --dir postgresql-ci+build/docs src/appendix/examples/built_docs/postgresql
2222

2323
# Build the docs here.
24-
# TODO: Enable when our earthly self-satellites will be back
25-
disable-docs:
24+
docs:
2625
FROM +src
2726

2827
DO docs-ci+BUILD

earthly/cue/Earthfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
VERSION 0.8
2+
3+
IMPORT ../debian AS debian
4+
5+
# Define a constant name for the container and its version.
6+
ARG --global CUE_IMAGE="cuelang/cue:0.14.1"
7+
8+
9+
INSTALL:
10+
FUNCTION
11+
12+
COPY +cue-bin/cue /usr/bin/cue
13+
14+
15+
# Get cue binary
16+
cue-bin:
17+
FROM $CUE_IMAGE
18+
SAVE ARTIFACT /usr/bin/cue
19+
20+
# Just check that Cue can be properly installed, and runs.
21+
check-cue:
22+
FROM debian+common
23+
24+
DO +INSTALL
25+
26+
RUN cue version

earthly/cue/blueprint.cue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project: name: "ci-cue"

earthly/debian/Earthfile

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
VERSION 0.8
2+
3+
# Define a constant name for the container and its version.
4+
ARG --global DEBIAN_IMAGE="debian:13.0-slim"
5+
6+
# Optimally install packages for debian
7+
INSTALL:
8+
FUNCTION
9+
10+
ARG packages
11+
12+
# Install the packages and leave no garbage behind
13+
# Also don't install anything not explicitly asked for.
14+
ENV DEBIAN_FRONTEND=noninteractive
15+
RUN set -eux; \
16+
apt-get update --fix-missing \
17+
&& apt-get install -y --no-install-recommends $packages \
18+
&& apt-get dist-clean \
19+
&& rm -rf /var/lib/apt/lists/*
20+
21+
# The current version of our base Debian Container.
22+
# Clean with nothing added.
23+
debian-clean:
24+
FROM $DEBIAN_IMAGE
25+
26+
27+
# The current version of our base Debian Container.
28+
# Normally you want this because it has all the common tools
29+
# one would expect inside CI.
30+
common:
31+
FROM +debian-clean
32+
33+
LET PACKAGES= \
34+
ca-certificates \
35+
apt-utils \
36+
git \
37+
curl \
38+
gzip \
39+
unzip \
40+
bzip2 \
41+
bash \
42+
jq \
43+
gpg \
44+
lcov \
45+
tar \
46+
wget \
47+
xz-utils
48+
DO +INSTALL --packages=$PACKAGES
49+
50+
# Checks our debian container is basically usable, and nothing more.
51+
check-debian:
52+
FROM +common
53+
54+
RUN cat /etc/os-release
55+
56+
version-check-debian:
57+
FROM +debian
58+
59+
# The idea here is the version check will check if the image its using is the latest image in docker hub.
60+
# This would need to be run without cache, and should be a special target.
61+
# We need a general solution to help us track our containers and make sure we are aware when they are out of date.
62+
RUN exit 1

earthly/debian/blueprint.cue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project: name: "ci-debian"

earthly/docs/Earthfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
VERSION 0.8
22

33
IMPORT ../python AS python-ci
4+
IMPORT ../debian AS debian
45
IMPORT ../../utilities/scripts AS scripts
56

67
# cspell: words libfreetype liblcms libopenjp etag
@@ -14,21 +15,21 @@ deps:
1415
# This is all the tooling needed to build the docs.
1516

1617
# Install extra packages we will need to support plugins.
17-
RUN apt-get install -y \
18-
graphviz \
18+
LET PACKAGES= \
1919
fontconfig \
20-
fonts-liberation \
2120
libxml2-dev \
22-
libxslt1-dev \
2321
libffi-dev \
24-
libssl-dev \
2522
libfreetype6-dev \
23+
libtiff-dev \
24+
libssl-dev \
25+
fonts-liberation \
26+
libxslt1-dev \
2627
liblcms2-dev \
2728
libopenjp2-7-dev \
28-
libtiff-dev \
2929
tk-dev \
3030
tcl-dev \
3131
make
32+
DO debian+INSTALL --packages=$PACKAGES
3233

3334
# Fix up font cache
3435
RUN fc-cache -f

earthly/flutter/Earthfile

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ IMPORT ./installer AS installer
88
# Install flutter.
99
INSTALL_FLUTTER:
1010
FUNCTION
11-
ARG version=3.29.3
11+
ARG version=3.35.1
1212
ARG TARGETARCH
1313

1414
# Install Flutter
@@ -234,30 +234,51 @@ UNIT_TESTS:
234234
END
235235

236236
# Build web app and save artifacts locally if needed.
237+
# TODO(damian-molinski): This target should become BUILD_APP with platforms ARG.
238+
# platforms='web,android,ios'
239+
# Because `sentry_dart_plugin` requires access to .dart_tool as well as flutter itself
240+
# and using `sentry-cli` instead seems to not be worth effort.
237241
BUILD_WEB:
238242
FUNCTION
239243

240244
ARG --required TARGET
241245
ARG BUILD_MODE='--release'
246+
ARG --required BUILD_NAME
247+
ARG --required BUILD_NUMBER
242248
ARG SAVE_LOCALLY=false
243249
ARG WORKDIR
244-
ARG SENTRY_UPLOAD_DEBUG_SYMBOLS=false
245-
ARG BUILD_ARGS=''
250+
ARG UPLOAD_DEBUG_SYMBOLS=false
251+
ARG SENTRY_ORG
252+
ARG SENTRY_PROJECT
246253

247254
WORKDIR $WORKDIR
248255

249-
IF [ $SENTRY_UPLOAD_DEBUG_SYMBOLS = true ]
250-
IF [ ! echo "$BUILD_ARGS" | grep -q -- '--source-maps' ]
251-
ARG BUILD_ARGS='$BUILD_ARGS --source-maps'
252-
END
256+
LET ADDITIONAL_BUILD_ARGS = ""
257+
LET SENTRY_RELEASE = "$SENTRY_PROJECT@$BUILD_NAME+$BUILD_NUMBER"
258+
LET SENTRY_DIST = "$BUILD_NUMBER"
259+
260+
IF [ $UPLOAD_DEBUG_SYMBOLS = true ]
261+
SET ADDITIONAL_BUILD_ARGS = "--dart-define=SENTRY_RELEASE=$SENTRY_RELEASE $ADDITIONAL_BUILD_ARGS"
262+
SET ADDITIONAL_BUILD_ARGS = "--dart-define=SENTRY_DIST=$SENTRY_DIST $ADDITIONAL_BUILD_ARGS"
263+
SET ADDITIONAL_BUILD_ARGS = "$ADDITIONAL_BUILD_ARGS --source-maps"
253264
END
254265

255266
RUN flutter clean
256267
RUN flutter pub get
257-
RUN flutter build web $BUILD_MODE --pwa-strategy=none --target $TARGET --build-number=$(date +%s) $BUILD_ARGS
258-
259-
IF [ $SENTRY_UPLOAD_DEBUG_SYMBOLS = true ]
260-
RUN flutter pub run sentry_dart_plugin
268+
RUN flutter build web $BUILD_MODE \
269+
--pwa-strategy=none \
270+
--target $TARGET \
271+
--build-name=$BUILD_NAME \
272+
--build-number=$BUILD_NUMBER \
273+
$ADDITIONAL_BUILD_ARGS
274+
275+
IF [ $UPLOAD_DEBUG_SYMBOLS = true ]
276+
RUN --secret SENTRY_AUTH_TOKEN=SENTRY_AUTH_TOKEN \
277+
flutter pub run sentry_dart_plugin \
278+
--sentry-define=org=$SENTRY_ORG \
279+
--sentry-define=project=$SENTRY_PROJECT \
280+
--sentry-define=release=$SENTRY_RELEASE \
281+
--sentry-define=dist=$SENTRY_DIST
261282
END
262283

263284
WORKDIR "$WORKDIR/build"

earthly/graphviz/Earthfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
VERSION 0.8
2+
3+
IMPORT ../debian AS debian
4+
5+
# Define a constant name for the container and its version.
6+
ARG --global VERSION=13.1.0
7+
ARG --global SHA256=13339b83ee5467001a035cfacd175702ac4b14f5d390f0d34e89437b29881278
8+
ARG --global URL=https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${VERSION}/graphviz-${VERSION}.tar.xz
9+
10+
# Sadly this is the only way to reliably pin a version of graphviz in debian.
11+
INSTALL:
12+
FUNCTION
13+
14+
LET PACKAGES= \
15+
build-essential \
16+
pkg-config \
17+
libexpat1-dev \
18+
zlib1g-dev \
19+
libpng-dev \
20+
libfreetype-dev \
21+
librsvg2-dev \
22+
liblasi-dev \
23+
wget
24+
DO debian+INSTALL --packages=$PACKAGES
25+
26+
RUN mkdir build; \
27+
cd build; \
28+
wget -nv -O graphviz-${VERSION}.tar.xz "$URL" \
29+
&& echo "${SHA256} graphviz-${VERSION}.tar.xz" | sha256sum -c - \
30+
&& tar -xf graphviz-${VERSION}.tar.xz \
31+
&& cd graphviz-${VERSION} \
32+
&& echo "Building Graphviz ${VERSION}" \
33+
&& ./configure > /dev/null 2>&1 \
34+
&& make -j"$(nproc)" > /dev/null 2>&1 \
35+
&& make install > /dev/null 2>&1 \
36+
&& cd ../.. \
37+
&& rm -rf build \
38+
&& echo "Graphviz built and installed OK"

earthly/python/Earthfile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,37 @@ VERSION 0.8
33

44
IMPORT ../../utilities/scripts AS scripts
55
IMPORT ../../ AS cat-ci
6+
IMPORT ../debian AS debian
7+
IMPORT ../cue AS cue
8+
IMPORT ../graphviz AS graphviz
9+
10+
11+
# Define a constant name for the container and its version.
12+
ARG --global PYTHON_IMAGE="python:3.13-slim-trixie"
613

714
# cspell: words libjpeg ruff
815

916
python-base:
10-
FROM python:3.13-slim-bookworm
17+
FROM $PYTHON_IMAGE
1118

1219
# Install necessary packages
13-
RUN apt-get update && apt-get install -y \
20+
LET PACKAGES= \
1421
bash \
1522
curl \
1623
libffi-dev \
1724
gcc \
1825
musl-dev \
1926
zlib1g-dev \
2027
libjpeg-dev \
21-
git
28+
git \
29+
jq
30+
DO debian+INSTALL --packages=$PACKAGES
31+
32+
# Install CUE
33+
DO cue+INSTALL
34+
35+
# Install Graphviz
36+
DO graphviz+INSTALL
2237

2338
# Poetry Installation directory.
2439
# Gives poetry and our poetry project a reliable location.

0 commit comments

Comments
 (0)