11name : CI
22
3+ # See also https://github.com/flatpak/flatpak-github-actions
4+
35on :
46 pull_request :
57 branches : [main]
911 CI :
1012 runs-on : ubuntu-latest
1113
12- env :
13- FOUNDRY_DIR : ${{ github.workspace }}/.foundry
14+ container :
15+ image : fedora:44
1416
1517 steps :
16- - uses : actions/checkout@v3
18+ - uses : actions/checkout@v4
1719 with :
1820 submodules : recursive
1921
@@ -22,57 +24,26 @@ jobs:
2224 node-version : 20
2325 cache : " npm"
2426
25- # -----------------------------
26- # System dependencies
27- # -----------------------------
2827 - name : Install host dependencies
2928 run : |
30- sudo apt-get update
31- sudo apt-get install -y \
32- flatpak flatpak-builder mutter \
33- git meson ninja-build gcc pkg-config \
34- libglib2.0-dev libgtk-4-dev
35-
36- # -----------------------------
37- # Build GNOME Foundry from source (Option B)
38- # -----------------------------
39- - name : Clone and build GNOME Foundry
40- run : |
41- if [ ! -d "$FOUNDRY_DIR/install/bin" ]; then
42- echo "Building Foundry from source..."
43-
44- git clone https://gitlab.gnome.org/GNOME/foundry.git "$FOUNDRY_DIR/src"
45-
46- meson setup "$FOUNDRY_DIR/build" "$FOUNDRY_DIR/src" \
47- --prefix="$FOUNDRY_DIR/install"
48-
49- ninja -C "$FOUNDRY_DIR/build"
50- ninja -C "$FOUNDRY_DIR/build" install
51- else
52- echo "Foundry already built (cache hit)"
53- fi
54-
55- echo "$FOUNDRY_DIR/install/bin" >> $GITHUB_PATH
29+ sudo dnf -y update
30+ sudo dnf -y install flatpak mutter flatpak-builder foundry
5631
57- # -----------------------------
5832 # Restore caches
59- # -----------------------------
6033 - name : Restore Flatpak dependencies
6134 uses : actions/cache/restore@v3
6235 with :
6336 path : ~/.local/share/flatpak
6437 key : ${{ runner.os }}-flatpak-dependencies-${{ github.run_id }}
6538 restore-keys : |
6639 ${{ runner.os }}-flatpak-dependencies-
67-
6840 - name : Restore .flatpak-builder
6941 uses : actions/cache/restore@v3
7042 with :
7143 path : .flatpak-builder
7244 key : ${{ runner.os }}-flatpak-builder-${{ github.run_id }}
7345 restore-keys : |
7446 ${{ runner.os }}-flatpak-builder-
75-
7647 - name : Restore .foundry
7748 uses : actions/cache/restore@v3
7849 with :
@@ -81,38 +52,23 @@ jobs:
8152 restore-keys : |
8253 ${{ runner.os }}-foundry-
8354
84- # -----------------------------
85- # Headless GNOME runtime
86- # -----------------------------
87- - run : |
88- mutter --wayland --no-x11 --headless \
89- --wayland-display=wayland-0 \
90- --virtual-monitor 1280x720 > /tmp/mutter.log 2>&1 &
91-
92- # -----------------------------
93- # CI
94- # -----------------------------
55+ - run : mutter --wayland --no-x11 --headless --wayland-display=wayland-0 --virtual-monitor 1280x720 > /tmp/mutter.log 2>&1 &
9556 - run : make ci
96-
9757 - run : cat /tmp/mutter.log
9858
99- # -----------------------------
10059 # Save caches
101- # -----------------------------
10260 - name : Save Flatpak dependencies
10361 uses : actions/cache/save@v3
10462 if : always()
10563 with :
10664 path : ~/.local/share/flatpak
10765 key : ${{ runner.os }}-flatpak-dependencies-${{ github.run_id }}
108-
10966 - name : Save .flatpak-builder
11067 uses : actions/cache/save@v3
11168 if : always()
11269 with :
11370 path : .flatpak-builder
11471 key : ${{ runner.os }}-flatpak-builder-${{ github.run_id }}
115-
11672 - name : Save .foundry
11773 uses : actions/cache/save@v3
11874 if : always()
0 commit comments