diff --git a/.branding b/.branding new file mode 100644 index 000000000..2c4bb8aab --- /dev/null +++ b/.branding @@ -0,0 +1,2 @@ +https://github.com/Keavon/graphite-branded-assets/archive/f8b02e68c92f5bbd27626bdd7a51102303b70a40.tar.gz +d06fd7b79fa9b7509c23072fa56745415fdc6eb98575d15214b0acc47ea4dd42 diff --git a/.cargo/config.toml b/.cargo/config.toml index 4087f77f9..b6ad2fee2 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -10,3 +10,6 @@ rustflags = [ "link-arg=--max-memory=4294967296", "--cfg=web_sys_unstable_apis", ] + +[env] +CARGO_WORKSPACE_DIR = { value = "", relative = true } diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6b4ee383f..bddfffaf1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -23,7 +23,6 @@ "streetsidesoftware.code-spell-checker", // Helpful "mhutchie.git-graph", - "waderyan.gitblame", "qezhu.gitlink", "wmaurer.change-case" ] diff --git a/.github/workflows/build-dev-and-ci.yml b/.github/workflows/build-dev-and-ci.yml index 016d42cbb..365eb76fe 100644 --- a/.github/workflows/build-dev-and-ci.yml +++ b/.github/workflows/build-dev-and-ci.yml @@ -7,7 +7,7 @@ on: pull_request: {} env: CARGO_TERM_COLOR: always - INDEX_HTML_HEAD_REPLACEMENT: + INDEX_HTML_HEAD_REPLACEMENT: jobs: build: @@ -34,10 +34,10 @@ jobs: with: node-version: "latest" - - name: ๐ง Install Node dependencies + - name: ๐ง Install build dependencies run: | cd frontend - npm ci + npm run setup - name: ๐ฆ Install the latest Rust run: | @@ -47,6 +47,11 @@ jobs: echo "Latest updated version:" rustc --version + - name: ๐ฆ Fetch Rust dependencies + run: | + echo "If it fails here, the committed Cargo.lock may be out of date" + cargo fetch --locked + - name: โ Replace template in
of index.html run: | # Remove the INDEX_HTML_HEAD_REPLACEMENT environment variable for build links (not master deploys) @@ -103,7 +108,7 @@ jobs: - name: ๐งช Run Rust tests run: | - mold -run cargo test --all-features --workspace + mold -run cargo test --all-features - name: ๐ Generate code documentation info for website if: github.ref == 'refs/heads/master' diff --git a/.github/workflows/build-nix-package.yml b/.github/workflows/build-nix-package.yml new file mode 100644 index 000000000..2da86b2d3 --- /dev/null +++ b/.github/workflows/build-nix-package.yml @@ -0,0 +1,17 @@ +name: Build Nix Package + +on: + workflow_dispatch: {} + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Build Nix Package Dev + run: nix build .nix#graphite-dev --print-build-logs diff --git a/.github/workflows/build-production.yml b/.github/workflows/build-production.yml index fa58e1865..1be2e3e94 100644 --- a/.github/workflows/build-production.yml +++ b/.github/workflows/build-production.yml @@ -18,7 +18,7 @@ jobs: RUSTC_WRAPPER: /usr/bin/sccache CARGO_INCREMENTAL: 0 SCCACHE_DIR: /var/lib/github-actions/.cache - INDEX_HTML_HEAD_REPLACEMENT: + INDEX_HTML_HEAD_REPLACEMENT: steps: - name: ๐ฅ Clone and checkout repository @@ -32,10 +32,10 @@ jobs: with: node-version: "latest" - - name: ๐ง Install Node dependencies + - name: ๐ง Install build dependencies run: | cd frontend - npm ci + npm run setup - name: ๐ฆ Install the latest Rust run: | diff --git a/.github/workflows/comment-!build-commands.yml b/.github/workflows/comment-!build-commands.yml index 8d8a0ae09..87b8581b1 100644 --- a/.github/workflows/comment-!build-commands.yml +++ b/.github/workflows/comment-!build-commands.yml @@ -59,10 +59,10 @@ jobs: with: node-version: "latest" - - name: ๐ง Install Node dependencies + - name: ๐ง Install build dependencies run: | cd frontend - npm ci + npm run setup - name: ๐ฆ Install the latest Rust run: | diff --git a/.github/workflows/comment-profiling-changes.yaml b/.github/workflows/comment-profiling-changes.yaml index e51341538..76b12265a 100644 --- a/.github/workflows/comment-profiling-changes.yaml +++ b/.github/workflows/comment-profiling-changes.yaml @@ -2,6 +2,10 @@ name: Profiling Changes on: pull_request: + paths: + - 'node-graph/**' + - 'Cargo.toml' + - 'Cargo.lock' env: CARGO_TERM_COLOR: always @@ -9,6 +13,7 @@ env: jobs: profile: runs-on: ubuntu-latest + continue-on-error: true steps: - uses: actions/checkout@v4 with: @@ -33,12 +38,12 @@ jobs: uses: actions/cache@v4 with: path: ~/.cargo/bin/iai-callgrind-runner - key: ${{ runner.os }}-iai-callgrind-runner-0.12.3 + key: ${{ runner.os }}-iai-callgrind-runner-0.16.1 - name: Install iai-callgrind if: steps.cache-iai.outputs.cache-hit != 'true' run: | - cargo install iai-callgrind-runner@0.12.3 + cargo install iai-callgrind-runner@0.16.1 - name: Checkout master branch run: | @@ -49,21 +54,30 @@ jobs: id: master-sha run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + - name: Get CPU info + id: cpu-info + run: | + # Get CPU model and create a short hash for cache key + CPU_MODEL=$(cat /proc/cpuinfo | grep "model name" | head -1 | cut -d: -f2 | xargs) + CPU_HASH=$(echo "$CPU_MODEL" | sha256sum | cut -c1-8) + echo "cpu-hash=$CPU_HASH" >> $GITHUB_OUTPUT + echo "CPU: $CPU_MODEL (hash: $CPU_HASH)" + - name: Cache benchmark baselines id: cache-benchmark-baselines uses: actions/cache@v4 with: path: target/iai - key: ${{ runner.os }}-benchmark-baselines-master-${{ steps.master-sha.outputs.sha }} + key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-benchmark-baselines-master-${{ steps.master-sha.outputs.sha }} restore-keys: | - ${{ runner.os }}-benchmark-baselines-master- + ${{ runner.os }}-${{ runner.arch }}-${{ steps.cpu-info.outputs.cpu-hash }}-benchmark-baselines-master- - name: Run baseline benchmarks if: steps.cache-benchmark-baselines.outputs.cache-hit != 'true' run: | # Compile benchmarks cargo bench --bench compile_demo_art_iai -- --save-baseline=master - + # Runtime benchmarks cargo bench --bench update_executor_iai -- --save-baseline=master cargo bench --bench run_once_iai -- --save-baseline=master @@ -74,34 +88,18 @@ jobs: git checkout ${{ github.event.pull_request.head.sha }} - name: Run PR benchmarks - id: benchmark run: | # Compile benchmarks - COMPILE_OUTPUT=$(cargo bench --bench compile_demo_art_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g') - - # Runtime benchmarks - UPDATE_OUTPUT=$(cargo bench --bench update_executor_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g') - RUN_ONCE_OUTPUT=$(cargo bench --bench run_once_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g') - RUN_CACHED_OUTPUT=$(cargo bench --bench run_cached_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g') - - # Store outputs - echo "COMPILE_OUTPUT<