@@ -8,27 +8,83 @@ permissions:
88 contents : read
99
1010jobs :
11+ mongo :
12+ runs-on : ubuntu-24.04
13+ timeout-minutes : 15
14+ steps :
15+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16+ with :
17+ persist-credentials : false
18+ - name : Start mongo 8.0 and 7.0 with the fixture's script
19+ run : |
20+ mkdir -p "$RUNNER_TEMP/cfg"
21+ python3 -I - "$RUNNER_TEMP/cfg" <<'PY'
22+ import re, sys, pathlib
23+ src = pathlib.Path("linux/crates/test-fixtures/src/mongo_fixture.rs").read_text()
24+ script = re.search(r'const START_SCRIPT: &str = r#"(.*?)"#;', src, re.S).group(1)
25+ d = pathlib.Path(sys.argv[1]); (d / "start.sh").write_text(script); (d / "keyfile").write_text("0123456789abcdef0123456789abcdef")
26+ PY
27+ chmod 644 "$RUNNER_TEMP"/cfg/*
28+ for tag in 8.0 7.0; do
29+ docker pull -q mongo:$tag
30+ docker image inspect mongo:$tag --format "$tag {{.Id}} {{.Created}}"
31+ docker run -d --name m$tag -v "$RUNNER_TEMP/cfg:/etc/tablepro:ro" -e TABLEPRO_PASSWORD=pw -e TABLEPRO_TLS=0 --entrypoint sh mongo:$tag /etc/tablepro/start.sh
32+ done
33+ sleep 90
34+ for tag in 8.0 7.0; do echo "===== $tag"; docker ps -a --filter name=m$tag --format '{{.Status}}'; docker logs m$tag 2>&1 | grep -v '"c":"NETWORK"' | tail -40 | cut -c1-400; done
35+ docker exec m8.0 sh -c 'mongod --version | head -3; ls -l /usr/bin/mongosh; mongosh --version' || true
36+
1137 flatpak :
12- runs-on : ubuntu-24.04-arm
13- timeout-minutes : 120
38+ strategy :
39+ fail-fast : false
40+ matrix :
41+ include :
42+ - arch : x86_64
43+ runner : ubuntu-24.04
44+ - arch : aarch64
45+ runner : ubuntu-24.04-arm
46+ runs-on : ${{ matrix.runner }}
47+ timeout-minutes : 150
1448 container :
1549 image : ghcr.io/flathub-infra/flatpak-github-actions:gnome-51
1650 options : --privileged
1751 steps :
1852 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1953 with :
2054 persist-credentials : false
21- - name : Build and test with a resource sampler
55+ - name : Build and test with a sampler and Cargo's dirty reasons
56+ env :
57+ ARCH : ${{ matrix.arch }}
2258 run : |
23- nproc; free -m; df -h / /__w; cat /proc/pressure/memory 2>/dev/null || true
59+ flatpak-builder --version || true
60+ python3 -I - <<'PY'
61+ import json
62+ p = "linux/build-aux/flatpak/app.tablepro.TablePro.Devel.json"; m = json.load(open(p))
63+ m["build-options"]["env"]["CARGO_LOG"] = "cargo::core::compiler::fingerprint=info"
64+ json.dump(m, open(p, "w"), indent=4)
65+ PY
2466 (while :; do
2567 m=$(awk '/MemAvailable/{a=$2} /SwapFree/{sf=$2} /SwapTotal/{st=$2} END{printf "avail=%dM swapused=%dM", a/1024, (st-sf)/1024}' /proc/meminfo)
2668 d=$(df -m /__w | awk 'NR==2{print "disk_avail="$4"M"}')
2769 top=$(ps -eo rss=,comm= --sort=-rss | head -4 | awk '{printf "%s:%dM ", $2, $1/1024}')
2870 echo "SAMPLE $(date +%T) $m $d $top"
2971 sleep 15
3072 done) &
73+ status=0
3174 xvfb-run --auto-servernum flatpak-builder --repo=repo --disable-rofiles-fuse \
32- --install-deps-from=flathub --force-clean --default-branch=master --arch=aarch64 \
33- --ccache --state-dir .flatpak-builder flatpak_app \
34- linux/build-aux/flatpak/app.tablepro.TablePro.Devel.json
75+ --install-deps-from=flathub --force-clean --default-branch=master --arch="$ARCH" \
76+ --ccache --keep-build-dirs --state-dir .flatpak-builder flatpak_app \
77+ linux/build-aux/flatpak/app.tablepro.TablePro.Devel.json > "$RUNNER_TEMP/fb.log" 2>&1 || status=$?
78+ echo "flatpak-builder exit $status"
79+ grep -E "^(SAMPLE|[0-9]+/[0-9]+ )|Rust linker|Running tests" "$RUNNER_TEMP/fb.log" | tail -60 || true
80+ log=$(find .flatpak-builder/build -path '*meson-logs/testlog.txt' | head -1)
81+ echo "testlog: $log"
82+ if [ -n "$log" ]; then
83+ grep -iE "dirty|stale|changed" "$log" | grep -iE "libduckdb|aws-lc|libsqlite3|ring" | head -40 | cut -c1-600
84+ echo "--- dirty reasons, counted"
85+ grep -oiE "(dirty|stale)[^:]*: [A-Za-z]+" "$log" | sort | uniq -c | sort -rn | head -20
86+ echo "--- first dirty lines"
87+ grep -iE " dirty| stale" "$log" | head -20 | cut -c1-600
88+ fi
89+ grep -iE "libduckdb" "$RUNNER_TEMP/fb.log" | grep -iE "dirty|stale|fingerprint" | head -10 | cut -c1-600
90+ exit $status
0 commit comments