mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Fix, document, and update npm dependencies and tooling; fix Bezier-rs demos not building (#1857)
Fix, document, and update npm dependencies; fix Bezier-rs demos not building Closes #1853
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# USAGE:
|
||||
# After reviewing the code, core team members may comment on a PR with the exact text:
|
||||
# - `!build-dev` to build with debug symbols and optimizations disabled
|
||||
# - `!build-profiling` to build with debug symbols and optimizations enabled
|
||||
# - `!build` to build without debug symbols and optimizations enabled
|
||||
# The comment may not contain any other text, not even whitespace or newlines.
|
||||
name: "!build PR Command"
|
||||
|
||||
on:
|
||||
@@ -12,7 +18,10 @@ jobs:
|
||||
# Command should be limited to core team members (those in the organization) for security.
|
||||
# From the GitHub Actions docs:
|
||||
# author_association = 'MEMBER': Author is a member of the organization that owns the repository.
|
||||
if: github.event.issue.pull_request && (github.event.comment.body == '!build' || github.event.comment.body == '!build-profiling') && github.event.comment.author_association == 'MEMBER'
|
||||
if: >
|
||||
github.event.issue.pull_request &&
|
||||
github.event.comment.author_association == 'MEMBER' &&
|
||||
(github.event.comment.body == '!build-dev' || github.event.comment.body == '!build-profiling' || github.event.comment.body == '!build')
|
||||
runs-on: self-hosted
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -45,20 +54,22 @@ jobs:
|
||||
continue-on-error: true
|
||||
run: rm -r ~/.cache/.wasm-pack
|
||||
|
||||
- name: 🟢 Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
- name: 🟢 Install the latest Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "16"
|
||||
node-version: "latest"
|
||||
|
||||
- name: 🚧 Install Node dependencies
|
||||
run: |
|
||||
cd frontend
|
||||
npm ci
|
||||
|
||||
- name: 🦀 Update Rust to latest stable
|
||||
- name: 🦀 Install the latest Rust
|
||||
run: |
|
||||
echo "Initial system version:"
|
||||
rustc --version
|
||||
rustup update stable
|
||||
echo "Latest updated version:"
|
||||
rustc --version
|
||||
|
||||
- name: ✂ Replace template in <head> of index.html
|
||||
@@ -70,12 +81,14 @@ jobs:
|
||||
- name: ⌨ Set build command based on comment
|
||||
id: build_command
|
||||
run: |
|
||||
if [[ "${{ github.event.comment.body }}" == "!build" ]]; then
|
||||
echo "command=build" >> $GITHUB_OUTPUT
|
||||
if [[ "${{ github.event.comment.body }}" == "!build-dev" ]]; then
|
||||
echo "command=build-dev" >> $GITHUB_OUTPUT
|
||||
elif [[ "${{ github.event.comment.body }}" == "!build-profiling" ]]; then
|
||||
echo "command=build-profiling" >> $GITHUB_OUTPUT
|
||||
elif [[ "${{ github.event.comment.body }}" == "!build" ]]; then
|
||||
echo "command=build" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "command=print-building-help" >> $GITHUB_OUTPUT
|
||||
echo "Failed to detect if the build command written in the comment should have been '!build-dev', '!build-profiling', or '!build'" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 🌐 Build Graphite web code
|
||||
@@ -30,20 +30,22 @@ jobs:
|
||||
- name: 🗑 Clear wasm-bindgen cache
|
||||
run: rm -r ~/.cache/.wasm-pack || true
|
||||
|
||||
- name: 🟢 Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
- name: 🟢 Install the latest Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "16"
|
||||
node-version: "latest"
|
||||
|
||||
- name: 🚧 Install Node dependencies
|
||||
run: |
|
||||
cd frontend
|
||||
npm ci
|
||||
|
||||
- name: 🦀 Update Rust to latest stable
|
||||
- name: 🦀 Install the latest Rust
|
||||
run: |
|
||||
echo "Initial system version:"
|
||||
rustc --version
|
||||
rustup update stable
|
||||
echo "Latest updated version:"
|
||||
rustc --version
|
||||
|
||||
- name: ✂ Replace template in <head> of index.html
|
||||
@@ -27,20 +27,22 @@ jobs:
|
||||
- name: 🗑 Clear wasm-bindgen cache
|
||||
run: rm -r ~/.cache/.wasm-pack
|
||||
|
||||
- name: 🟢 Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
- name: 🟢 Install the latest Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "16"
|
||||
node-version: "latest"
|
||||
|
||||
- name: 🚧 Install Node dependencies
|
||||
run: |
|
||||
cd frontend
|
||||
npm ci
|
||||
|
||||
- name: 🦀 Update Rust to latest stable
|
||||
- name: 🦀 Install the latest Rust
|
||||
run: |
|
||||
echo "Initial system version:"
|
||||
rustc --version
|
||||
rustup update stable
|
||||
echo "Latest updated version:"
|
||||
rustc --version
|
||||
|
||||
- name: ✂ Replace template in <head> of index.html
|
||||
6
.github/workflows/website.yml
vendored
6
.github/workflows/website.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
zola build
|
||||
|
||||
- name: 🔍 Check if `website/other` directory changed
|
||||
uses: dorny/paths-filter@v2
|
||||
uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
with:
|
||||
filters: |
|
||||
@@ -61,9 +61,9 @@ jobs:
|
||||
|
||||
- name: 🟢 Set up Node only if we are going to build in the next step
|
||||
if: steps.cache-website-other-dist.outputs.cache-hit != 'true'
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "16"
|
||||
node-version: "latest"
|
||||
|
||||
- name: 📁 Build `website/other` directory only if changed or not cached
|
||||
if: steps.cache-website-other-dist.outputs.cache-hit != 'true'
|
||||
|
||||
Reference in New Issue
Block a user