Skip to content

Commit de37c96

Browse files
authored
Merge branch 'master' into add-median-filter-blur
2 parents 1927925 + e88db02 commit de37c96

387 files changed

Lines changed: 11908 additions & 7704 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
<!-- Please reference any relevant issue number below, optionally with a "Closes"/"Resolves"/"Fixes" prefix -->
1+
<!--
2+
Graphite has ZERO-TOLERANCE for contributing undisclosed AI-generated content.
3+
If your PR involves AI, you must read our AI contribution policy (it's short):
4+
https://graphite.art/volunteer/guide/guide/starting-a-task/ai-contribution-policy
25
3-
Closes #
6+
REMEMBER:
7+
- You are responsible for thoroughly testing the successful implementation of your changes and ensuring no obvious regressions occur.
8+
- Egregiously dysfunctional PRs may be assumed to be undisclosed AI slop. If in doubt, ask on Discord before attempting a PR.
9+
- You are highly recommended to include a video showing the before-and-after behavior of your changes and screenshots of any new or modified UI.
10+
- Remember that Graphite maintains high standards for quality and the project is not a classroom for inexperienced developers to gain industry experience.
11+
- In this PR description, reference any relevant tasks by writing "Closes", "Resolves", or "Fixes" with the issue # or the URL of a Discord message documenting the task.
12+
- To acknowledge that you've read this, you must delete these rules and fill in the (strictly human-written) PR description in its place.
13+
-->

.github/workflows/build-dev-and-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request: {}
88
env:
99
CARGO_TERM_COLOR: always
10-
INDEX_HTML_HEAD_REPLACEMENT: <script defer data-domain="dev.graphite.rs" data-api="https://graphite.rs/visit/event" src="https://graphite.rs/visit/script.hash.js"></script>
10+
INDEX_HTML_HEAD_REPLACEMENT: <script defer data-domain="dev.graphite.art" data-api="https://graphite.art/visit/event" src="https://graphite.art/visit/script.hash.js"></script>
1111

1212
jobs:
1313
build:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build Linux Bundle
2+
3+
on:
4+
workflow_dispatch: {}
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: DeterminateSystems/nix-installer-action@main
17+
- uses: DeterminateSystems/magic-nix-cache-action@main
18+
19+
- name: Free disk space
20+
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache
21+
22+
- name: Build Linux Bundle
23+
run: nix build .nix#graphite-bundle.tar.xz && cp ./result ./graphite-bundle.tar.xz
24+
25+
- name: Upload Linux Bundle
26+
uses: actions/upload-artifact@v4
27+
with:
28+
path: graphite-bundle.tar.xz

.github/workflows/build-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
RUSTC_WRAPPER: /usr/bin/sccache
1919
CARGO_INCREMENTAL: 0
2020
SCCACHE_DIR: /var/lib/github-actions/.cache
21-
INDEX_HTML_HEAD_REPLACEMENT: <script defer data-domain="editor.graphite.rs" data-api="https://graphite.rs/visit/event" src="https://graphite.rs/visit/script.hash.js"></script>
21+
INDEX_HTML_HEAD_REPLACEMENT: <script defer data-domain="editor.graphite.art" data-api="https://graphite.art/visit/event" src="https://graphite.art/visit/script.hash.js"></script>
2222

2323
steps:
2424
- name: 📥 Clone and checkout repository

.github/workflows/cargo-deny.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
cargo-deny:
10+
if: github.repository == 'GraphiteEditor/Graphite' # Don't run on forks by default
1011
runs-on: ubuntu-latest
1112

1213
steps:

.github/workflows/library-rawkit.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ jobs:
3838
3939
- name: 📦 Run sccache-cache
4040
uses: mozilla-actions/sccache-action@v0.0.6
41+
continue-on-error: true
42+
43+
- name: 🔧 Fallback if sccache fails
44+
if: failure()
45+
run: |
46+
echo "sccache failed, disabling it"
47+
echo "RUSTC_WRAPPER=" >> $GITHUB_ENV
4148
4249
- name: 🔬 Check Rust formatting
4350
run: |
@@ -56,4 +63,4 @@ jobs:
5663
5764
- name: 📈 Run sccache stat for check
5865
shell: bash
59-
run: sccache --show-stats
66+
run: sccache --show-stats || echo "sccache stats unavailable"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Provide Shaders
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch: {}
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: DeterminateSystems/nix-installer-action@main
17+
- uses: DeterminateSystems/magic-nix-cache-action@main
18+
19+
- name: Build graphene raster nodes shaders
20+
run: nix build .nix#raster-nodes-shaders && cp result raster_nodes_shaders_entrypoint.wgsl
21+
22+
- name: Upload graphene raster nodes shaders to artifacts repository
23+
run: |
24+
bash .github/workflows/scripts/artifact-upload.bash \
25+
${{ vars.ARTIFACTS_REPO_OWNER }} \
26+
${{ vars.ARTIFACTS_REPO_NAME }} \
27+
${{ vars.ARTIFACTS_REPO_BRANCH }} \
28+
rev/${{ github.sha }}/raster_nodes_shaders_entrypoint.wgsl \
29+
raster_nodes_shaders_entrypoint.wgsl \
30+
"${{ github.sha }} raster_nodes_shaders_entrypoint.wgsl" \
31+
${{ secrets.ARTIFACTS_REPO_TOKEN }}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
usage() {
5+
cat <<EOF
6+
Usage: $0 <owner> <repo> <branch> <target-path> <artifact-file> <commit-message> <github-token>
7+
8+
Arguments:
9+
owner : GitHub user or organization of the target repo
10+
repo : Target repo name
11+
branch : Branch name (e.g. main)
12+
target-path : Full path (including folders + filename) in the target repo where to upload
13+
artifact-file : Local file path to upload
14+
commit-message : Commit message for creating/updating the file
15+
github-token : GitHub token (PAT or equivalent) with write access to the target repo
16+
17+
This will perform a GitHub API PUT to /repos/{owner}/{repo}/contents/{target-path}.
18+
If a file already exists at that path, it will auto-detect the SHA and update; otherwise it will create a new one.
19+
EOF
20+
exit 1
21+
}
22+
23+
if [ $# -ne 7 ]; then
24+
usage
25+
fi
26+
27+
OWNER="$1"
28+
REPO="$2"
29+
BRANCH="$3"
30+
TARGET_PATH="$4"
31+
ARTIFACT_PATH="$5"
32+
COMMIT_MSG="$6"
33+
TOKEN="$7"
34+
35+
if [ ! -f "$ARTIFACT_PATH" ]; then
36+
echo "Error: artifact file not found: $ARTIFACT_PATH" >&2
37+
exit 1
38+
fi
39+
40+
LOCAL_SHA=$(git hash-object "$ARTIFACT_PATH")
41+
echo "Local blob SHA: $LOCAL_SHA"
42+
43+
GET_URL="https://api.github.com/repos/${OWNER}/${REPO}/contents/${TARGET_PATH}?ref=${BRANCH}"
44+
GET_RESPONSE=$(curl -s -H "Authorization: token ${TOKEN}" "$GET_URL")
45+
46+
REMOTE_SHA=$(echo "$GET_RESPONSE" | jq -r .sha 2>/dev/null || echo "")
47+
48+
if [ "$REMOTE_SHA" != "null" ] && [ -n "$REMOTE_SHA" ]; then
49+
echo "Remote blob SHA: $REMOTE_SHA"
50+
if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
51+
echo "The remote file is identical. Skipping upload."
52+
exit 0
53+
else
54+
echo "Remote file differs. Preparing to upload."
55+
fi
56+
else
57+
echo "No existing remote file or no SHA found. Creating."
58+
fi
59+
60+
CONTENT_TMP_BASE64=$(mktemp)
61+
if base64 --help 2>&1 | grep -q -- "-w"; then
62+
base64 -w 0 "$ARTIFACT_PATH" > "$CONTENT_TMP_BASE64"
63+
else
64+
base64 "$ARTIFACT_PATH" | tr -d '\n' > "$CONTENT_TMP_BASE64"
65+
fi
66+
67+
PAYLOAD_TMP=$(mktemp)
68+
jq -n \
69+
--arg message "$COMMIT_MSG" \
70+
--arg branch "$BRANCH" \
71+
--arg sha "$REMOTE_SHA" \
72+
--rawfile content "$CONTENT_TMP_BASE64" \
73+
'{
74+
message: $message,
75+
content: $content,
76+
branch: $branch
77+
} + (if ($sha != "" and $sha != "null") then { sha: $sha } else {} end)' \
78+
> "$PAYLOAD_TMP"
79+
80+
UPLOAD_RESPONSE=$(curl -s -X PUT \
81+
-H "Authorization: token ${TOKEN}" \
82+
-H "Content-Type: application/json" \
83+
-d @"$PAYLOAD_TMP" \
84+
"https://api.github.com/repos/${OWNER}/${REPO}/contents/${TARGET_PATH}")
85+
86+
echo "Upload Response:"
87+
echo "$UPLOAD_RESPONSE"
88+
89+
rm -f "$CONTENT_TMP_BASE64" "$PAYLOAD_TMP"

.github/workflows/website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
workflow_dispatch: {}
1313
env:
1414
CARGO_TERM_COLOR: always
15-
INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.rs" data-api="/visit/event" src="/visit/script.hash.js"></script>
15+
INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.art" data-api="/visit/event" src="/visit/script.hash.js"></script>
1616

1717
jobs:
1818
build:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
branding/
22
target/
33
result/
4+
.flatpak-builder/
45
*.spv
56
*.exrc
67
perf.data*
@@ -9,5 +10,6 @@ profile.json.gz
910
flamegraph.svg
1011
.idea/
1112
.direnv
13+
.DS_Store
1214
hierarchical_message_system_tree.txt
1315
hierarchical_message_system_tree.html

0 commit comments

Comments
 (0)