Skip to content

Commit 08d30db

Browse files
committed
ci(nav3): Update serialization verification version weekly
1 parent 7d85cf6 commit 08d30db

2 files changed

Lines changed: 33 additions & 2 deletions

File tree

‎.github/workflows/update-deps.yml‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
name: Update Dependencies
22

33
on:
4-
# Run every day.
54
schedule:
5+
# Run every day.
66
- cron: '0 3 * * *'
7-
# And on on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict.
7+
# Run weekly (select btw daily or weekly via `if:`).
8+
- cron: '0 4 * * 1'
9+
# Also trigger on pushes to main (individual jobs decide whether to run). E.g., lets us get updated
10+
# dependencies ASAP and make sure the changelog doesn't conflict.
811
push:
912
branches:
1013
- main
@@ -15,11 +18,27 @@ permissions:
1518
actions: write
1619

1720
jobs:
21+
# Update the Sentry Native SDK dependency daily and on pushes to main.
1822
native:
23+
if: github.event.schedule != '0 4 * * 1'
1924
runs-on: ubuntu-latest
2025
steps:
2126
- uses: getsentry/github-workflows/updater@36529d71129a14967bea1fb81bcaf2a5943cf877 # v3
2227
with:
2328
path: scripts/update-sentry-native-ndk.sh
2429
name: Native SDK
2530
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}
31+
32+
# Update weekly the kotlinx.serialization version used by the Nav3 R8 tests. (Verifying a new
33+
# version before the next SDK release is sufficient.)
34+
nav3-kotlinx-serialization:
35+
if: github.event.schedule == '0 4 * * 1'
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: getsentry/github-workflows/updater@36529d71129a14967bea1fb81bcaf2a5943cf877 # v3
39+
with:
40+
path: scripts/update-nav3-kotlinx-serialization.sh
41+
name: Nav3 kotlinx.serialization R8 check
42+
# Only the R8 verification app uses this version; the SDK's dependency doesn't change.
43+
changelog-entry: false
44+
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}

‎scripts/update-nav3-kotlinx-serialization.sh‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ get-version)
1717
# compares upstream changelogs.
1818
perl -ne 'print "v$1\n" if ( m/^defaultLatestKotlinx="([0-9.]+)"/ )' "$SCRIPT_FILEPATH"
1919
;;
20+
get-repo)
21+
echo "https://github.com/Kotlin/kotlinx.serialization.git"
22+
;;
23+
set-version)
24+
# kotlinx.serialization tags are prefixed with "v" (e.g. v1.13.0).
25+
version=${2#v}
26+
27+
echo "Setting defaultLatestKotlinx to '$version'"
28+
29+
PATTERN='^(defaultLatestKotlinx=")[0-9.]+(")'
30+
perl -pi -e "s/$PATTERN/\${1}$version\${2}/" "$SCRIPT_FILEPATH"
31+
;;
2032
*)
2133
echo "Unknown argument $1"
2234
exit 1

0 commit comments

Comments
 (0)