Skip to content

Commit fd2de02

Browse files
committed
ci: Build against oldstable fdsdk too
1 parent d7857bf commit fd2de02

File tree

2 files changed

+43
-7
lines changed

2 files changed

+43
-7
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
exit 1
4444
fi
4545
46-
- name: Build changed manifests
46+
- name: Build changed manifests against stable Freedesktop SDK
4747
if: github.event_name == 'pull_request'
4848
env:
4949
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -62,17 +62,52 @@ jobs:
6262
| sort -V \
6363
| tail -n1)
6464
65-
cat > org.example.test.yml <<EOF
66-
id: org.example.test
65+
cat > org.example.stable.yml <<EOF
66+
id: org.example.stable
6767
runtime: org.freedesktop.Platform
6868
runtime-version: '$RUNTIME_VERSION'
6969
sdk: org.freedesktop.Sdk
7070
modules:
7171
- $f
7272
EOF
7373
74-
cat org.example.test.yml
74+
cat org.example.stable.yml
7575
dbus-run-session flatpak run org.flatpak.Builder --verbose --user --force-clean \
76-
--install-deps-from=flathub builddir org.example.test.yml
76+
--install-deps-from=flathub builddir org.example.stable.yml
7777
fi
7878
done
79+
80+
- name: Build changed manifests against oldstable Freedesktop SDK
81+
if: github.event_name == 'pull_request'
82+
env:
83+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
GH_REPO: ${{ github.repository }}
85+
run: |
86+
set -e
87+
FILES=$(gh pr view "${{ github.event.number }}" --json files --jq '.files[].path')
88+
89+
for f in $FILES; do
90+
if [[ "$f" == *.json && -f "$f" ]]; then
91+
echo "Building manifest for $f"
92+
93+
RUNTIME_VERSION=$(flatpak remote-ls --columns=ref flathub \
94+
| grep "runtime/org.freedesktop.Platform/x86_64/" \
95+
| sed 's|.*/||' \
96+
| sort -V \
97+
| tail -n2|head -1)
98+
99+
cat > org.example.oldstable.yml <<EOF
100+
id: org.example.oldstable
101+
runtime: org.freedesktop.Platform
102+
runtime-version: '$RUNTIME_VERSION'
103+
sdk: org.freedesktop.Sdk
104+
modules:
105+
- $f
106+
EOF
107+
108+
cat org.example.oldstable.yml
109+
dbus-run-session flatpak run org.flatpak.Builder --verbose --user --force-clean \
110+
--install-deps-from=flathub builddir org.example.oldstable.yml
111+
fi
112+
done
113+

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ for your sources and they will be checked for updates in a weekly basis.
6969

7070
- The module manifest must be in JSON format.
7171

72+
- The manifest must be buildable with the latest stable
73+
and oldstable versions of the Freedesktop SDK runtime.
74+
7275
### Inclusion process
7376

7477
Please open a [pull request](https://github.com/flathub/shared-modules/pulls)
7578
with the module manifest and add yourself as a [codeowner](https://github.com/flathub/shared-modules/blob/master/CODEOWNERS)
7679
of that module.
77-
78-
The manifest must be buildable with the latest Freedesktop SDK runtime.

0 commit comments

Comments
 (0)