Skip to content

Commit eddddd6

Browse files
authored
Foundry (#1024)
1 parent 6f1168d commit eddddd6

14 files changed

Lines changed: 51 additions & 686 deletions

File tree

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
src/lib
22
troll
3-
flatpak
43
demos

.foundry/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tmp/
2+
user/
3+
cache/

.github/workflows/CI.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
CI:
12-
runs-on: ubuntu-24.04
12+
runs-on: ubuntu-26.04
1313
steps:
1414
- uses: actions/checkout@v3
1515
with:
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install host dependencies
2424
run: |
2525
sudo apt-get update
26-
sudo apt-get install flatpak mutter flatpak-builder
26+
sudo apt-get install flatpak mutter flatpak-builder foundry
2727
2828
# Restore caches
2929
- name: Restore Flatpak dependencies
@@ -40,6 +40,13 @@ jobs:
4040
key: ${{ runner.os }}-flatpak-builder-${{ github.run_id }}
4141
restore-keys: |
4242
${{ runner.os }}-flatpak-builder-
43+
- name: Restore .foundry
44+
uses: actions/cache/restore@v3
45+
with:
46+
path: .foundry
47+
key: ${{ runner.os }}-foundry-${{ github.run_id }}
48+
restore-keys: |
49+
${{ runner.os }}-foundry-
4350
4451
- run: mutter --wayland --no-x11 --headless --wayland-display=wayland-0 --virtual-monitor 1280x720 > /tmp/mutter.log 2>&1 &
4552
- run: make ci
@@ -58,3 +65,9 @@ jobs:
5865
with:
5966
path: .flatpak-builder
6067
key: ${{ runner.os }}-flatpak-builder-${{ github.run_id }}
68+
- name: Save .foundry
69+
uses: actions/cache/save@v3
70+
if: always()
71+
with:
72+
path: .foundry
73+
key: ${{ runner.os }}-foundry-${{ github.run_id }}

.gitignore

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1 @@
1-
.flatpak
2-
.flatpak-builder
3-
build
4-
builddir
5-
/flatpak
61
node_modules
7-
repo
8-
install
9-
.eslintcache
10-
*~
11-
*.compiled
12-
*.flatpak
13-
.fenv
14-
.venv
15-
__pycache__
16-
*.pyc
17-
*.gresource
18-
.frun
19-
20-
# IDEs / editors
21-
.idea
22-
23-
target
24-
.foundry

CONTRIBUTING.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ See also
6565

6666
Workbench doesn't currently support translations for its user interface. GNOME documentation is only available in English and we do not want to mislead non-English speakers.
6767

68-
<!--
69-
If you'd like to help translating Workbench into your language, please head over to [Weblate](https://hosted.weblate.org/engage/workbench/).
70-
71-
<a href="https://hosted.weblate.org/engage/workbench/">
72-
<img src="https://hosted.weblate.org/widgets/workbench/-/workbench/multi-auto.svg" alt="Translation status" />
73-
</a>
74-
75-
Thank you for your help!
76-
-->
77-
7868
## Troubleshooting
7969

8070
### The app won't build/run anymore - even on clean `main`

Makefile

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SHELL:=/bin/bash -O globstar
2+
ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
23
.PHONY: setup build lint unit test ci sandbox flatpak
34
.DEFAULT_GOAL := setup
45

@@ -13,41 +14,38 @@ setup:
1314
@echo "✅ You can use "make build" to build Workbench"
1415

1516
stable:
16-
# flatpak --user run org.flatpak.Builder --delete-build-dirs --disable-updates --build-only --ccache --force-clean flatpak build-aux/re.sonny.Workbench.json
17-
flatpak-builder --delete-build-dirs --disable-updates --build-only --ccache --force-clean flatpak build-aux/re.sonny.Workbench.json
17+
foundry build build-aux/re.sonny.Workbench.json
1818

1919
devel:
20-
# flatpak --user run org.flatpak.Builder --delete-build-dirs --disable-updates --build-only --ccache --force-clean flatpak build-aux/re.sonny.Workbench.Devel.json
21-
flatpak-builder --delete-build-dirs --disable-updates --build-only --ccache --force-clean flatpak build-aux/re.sonny.Workbench.Devel.json
22-
20+
foundry build build-aux/re.sonny.Workbench.Devel.json
2321

2422
build: devel
2523

2624
cli:
2725
./troll/gjspack/bin/gjspack src/cli/main.js --appid=re.sonny.Workbench.cli --prefix=/re/sonny/Workbench --resource-root=src/ --no-executable flatpak/files/share/re.sonny.Workbench.cli/
28-
cp src/cli/bin.js flatpak/files/bin/workbench-cli
26+
cp src/cli/bin.js flatpak/files/bin/workbench-cli # FIXME
2927

3028
lint:
3129
# JavaScript
3230
./node_modules/.bin/eslint --max-warnings=0 src
3331
# Rust
34-
./build-aux/fun rustfmt --check --edition 2021 src/**/*.rs
32+
foundry devenv -- rustfmt --check --edition 2021 $(ROOT)/src/**/*.rs
3533
# Python
36-
./build-aux/fun ruff check --config=src/langs/python/ruff.toml src/**/*.py
37-
./build-aux/fun ruff format --config=src/langs/python/ruff.toml --check src/**/*.py
34+
foundry devenv -- ruff check --config=$(ROOT)/src/langs/python/ruff.toml $(ROOT)/src/**/*.py
35+
foundry devenv -- ruff format --config=$(ROOT)/src/langs/python/ruff.toml --check $(ROOT)/src/**/*.py
3836
# Blueprint
39-
./build-aux/fun blueprint-compiler format src/**/*.blp
40-
./build-aux/fun workbench-cli check blueprint src/**/*.blp
37+
foundry devenv -- blueprint-compiler format $(ROOT)/src/**/*.blp
38+
foundry run -- workbench-cli check blueprint $(ROOT)/src/**/*.blp
4139
# Vala
42-
# ./build-aux/fun workbench-cli check vala src/**/*.vala
40+
# foundry run -- workbench-cli check vala $(ROOT)/src/**/*.vala
4341
# CSS
44-
./build-aux/fun workbench-cli check css src/**/*.css
42+
foundry run -- workbench-cli check css $(ROOT)/src/**/*.css
4543
# Flatpak manifests
4644
flatpak run --user --command=flatpak-builder-lint org.flatpak.Builder manifest --exceptions --user-exceptions ./build-aux/exceptions.json build-aux/re.sonny.Workbench.json
4745
flatpak run --user --command=flatpak-builder-lint org.flatpak.Builder manifest --exceptions --user-exceptions ./build-aux/exceptions.json build-aux/re.sonny.Workbench.Devel.json
4846

4947
unit:
50-
./build-aux/fun gjs -m ./troll/tst/bin.js test/*.test.js
48+
foundry run -- gjs -m $(ROOT)/troll/tst/bin.js $(ROOT)/test/*.test.js
5149
#./build-aux/wip/run.js build-aux/re.sonny.Workbench.Devel.json -- gjs -m ./troll/tst/bin.js test/*.test.js
5250

5351
# https://github.com/ximion/appstream/issues/398#issuecomment-1129454985
@@ -61,20 +59,13 @@ unit:
6159
# flatpak run --env=G_DEBUG=fatal-criticals --command=appstream-util org.flatpak.Builder validate data/app.metainfo.xml
6260

6361
test: unit lint
64-
./build-aux/fun workbench-cli ci demos/src/Welcome
62+
foundry run -- workbench-cli ci $(ROOT)/demos/src/Welcome
6563
# ./build-aux/wip/run.js build-aux/re.sonny.Workbench.Devel.json -- workbench-cli ci demos/src/Welcome/
6664

6765
ci: setup build test
6866
# See Permissions.js
6967
# flatpak override --user --share=network --socket=pulseaudio --device=input re.sonny.Workbench.Devel
70-
./build-aux/fun workbench-cli ci demos/src/*
71-
72-
# Note that if you have Sdk extensions installed they will be used
73-
# make sure to test without the sdk extensions installed
74-
sandbox: setup
75-
flatpak run org.flatpak.Builder --ccache --user --install --force-clean flatpak build-aux/re.sonny.Workbench.Devel.json
76-
# flatpak remove --noninteractive org.freedesktop.Sdk.Extension.rust-stable//25.08 org.freedesktop.Sdk.Extension.vala//25.08 org.freedesktop.Sdk.Extension.llvm20//25.08
77-
flatpak run --command="bash" re.sonny.Workbench.Devel
68+
foundry run -- workbench-cli ci $(ROOT)/demos/src/*
7869

7970
flatpak:
8071
flatpak run org.flatpak.Builder --ccache --force-clean flatpak build-aux/re.sonny.Workbench.Devel.json
@@ -83,14 +74,3 @@ flatpak:
8374
flatpak run --command="desktop-file-validate" --filesystem=host:ro org.freedesktop.Sdk//25.08 flatpak/files/share/applications/re.sonny.Workbench.Devel.desktop
8475
# appstreamcli validate --override=release-time-missing=info /path/to/your/app.metainfo.xml
8576
flatpak run org.flatpak.Builder --run flatpak build-aux/re.sonny.Workbench.Devel.json bash
86-
87-
# Sync with .gitignore
88-
clean:
89-
rm -f re.sonny.Workbench.Devel.flatpak
90-
rm -f re.sonny.Workbench.flatpak
91-
rm -rf _build
92-
rm -rf .flatpak
93-
rm -rf .flatpak-builder
94-
rm -rf flatpak
95-
rm -rf flatpak-builder
96-
rm -rf repo

Workbench.doap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<maintainer>
2424
<foaf:Person>
2525
<foaf:name>Sonny Piers</foaf:name>
26-
<foaf:mbox rdf:resource="mailto:sonnyp@gnome.org" />
26+
<foaf:mbox rdf:resource="mailto:workbench@sonny.re" />
2727
<gnome:userid>sonnyp</gnome:userid>
2828
<foaf:account>
2929
<foaf:OnlineAccount>

build-aux/fun

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)