Skip to content

Commit 423fd69

Browse files
authored
fix: add_include can not incremental (#9423)
1 parent 2b45815 commit 423fd69

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

.github/actions/download-artifact/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ runs:
2525
steps:
2626
- name: Download artifact
2727
uses: actions/download-artifact@v4.1.7
28-
if: ${{ startsWith(runner.name, 'GitHub Actions') || inputs.try-local-cache == 'false' }}
28+
if: ${{ runner.environment == 'github-hosted' || inputs.try-local-cache == 'false' }}
2929
with:
3030
name: ${{ inputs.name }}
3131
path: ${{ inputs.path }}
3232
- name: Download local
33-
if: ${{ !startsWith(runner.name, 'GitHub Actions') && inputs.try-local-cache == 'true' }}
33+
if: ${{ runner.environment == 'self-hosted' && inputs.try-local-cache == 'true' }}
3434
shell: bash
3535
run: |
3636
set -e

.github/actions/pnpm-cache/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ runs:
6767
6868
- name: Restore pnpm cache
6969
id: restore
70-
if: ${{ inputs.run-install == 'true' && startsWith(runner.name, 'GitHub Actions') }}
70+
if: ${{ inputs.run-install == 'true' && runner.environment == 'github-hosted' }}
7171
uses: actions/cache/restore@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
7272
with:
7373
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
@@ -87,7 +87,7 @@ runs:
8787
8888
- name: Save pnpm cache
8989
uses: actions/cache/save@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
90-
if: ${{ inputs.run-install == 'true' && startsWith(runner.name, 'GitHub Actions') && inputs.save-if == 'true' && steps.restore.outputs.cache-hit != 'true' }}
90+
if: ${{ inputs.run-install == 'true' && runner.environment == 'github-hosted' && inputs.save-if == 'true' && steps.restore.outputs.cache-hit != 'true' }}
9191
with:
9292
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
9393
key: node-cache-${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}

.github/actions/rustup/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ runs:
8686

8787
- name: Cache on ${{ github.ref_name }}
8888
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
89-
if: ${{ startsWith(runner.name, 'GitHub Actions') }}
89+
if: ${{ runner.environment == 'github-hosted' }}
9090
with:
91-
shared-key: ${{ inputs.shared-key }}
91+
shared-key: ${{ inputs.shared-key }}

.github/actions/upload-artifact/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ runs:
3030
steps:
3131
- name: Upload artifact
3232
uses: actions/upload-artifact@v4
33-
if: ${{ startsWith(runner.name, 'GitHub Actions') || inputs.try-local-cache == 'false' }}
33+
if: ${{ runner.environment == 'github-hosted' || inputs.try-local-cache == 'false' }}
3434
with:
3535
name: ${{ inputs.name }}
3636
path: ${{ inputs.path }}
3737
if-no-files-found: error
3838
overwrite: true
3939
- name: Upload local
4040
id: upload-local
41-
if: ${{ !startsWith(runner.name, 'GitHub Actions') && inputs.try-local-cache == 'true' }}
41+
if: ${{ runner.environment == 'self-hosted' && inputs.try-local-cache == 'true' }}
4242
shell: bash
4343
run: |
4444
set -e

.github/workflows/reusable-build.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ jobs:
5656
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
5757
with:
5858
ref: ${{ inputs.ref }}
59-
clean: ${{ startsWith(runner.name, 'GitHub Actions') }}
59+
clean: ${{ runner.environment == 'github-hosted' }}
6060

6161
- name: Clean
62-
if: ${{ !inputs.skipable && !startsWith(runner.name, 'GitHub Actions') }}
62+
if: ${{ !inputs.skipable && runner.environment == 'self-hosted' }}
6363
uses: ./.github/actions/clean
6464
with:
6565
target: ${{ inputs.target }}
@@ -94,7 +94,7 @@ jobs:
9494
9595
- name: Check local cache
9696
id: check_cache
97-
if: ${{ inputs.profile == 'ci' && !startsWith(runner.name, 'GitHub Actions') && !inputs.skipable }}
97+
if: ${{ inputs.profile == 'ci' && runner.environment == 'self-hosted' && !inputs.skipable }}
9898
shell: bash
9999
run: |
100100
set -e
@@ -107,7 +107,7 @@ jobs:
107107
108108
# Fix: Resolve disk space error "ENOSPC: no space left on device" on GitHub Actions runners
109109
- name: Free disk cache
110-
if: ${{ startsWith(runner.name, 'GitHub Actions') && inputs.target == 'x86_64-unknown-linux-gnu' && steps.check_cache.outputs.exists != 'true' && !inputs.skipable }}
110+
if: ${{ runner.environment == 'github-hosted' && inputs.target == 'x86_64-unknown-linux-gnu' && steps.check_cache.outputs.exists != 'true' && !inputs.skipable }}
111111
uses: xc2/free-disk-space@fbe203b3788f2bebe2c835a15925da303eaa5efe # v1.0.0
112112
with:
113113
tool-cache: false
@@ -188,7 +188,7 @@ jobs:
188188
- name: Build aarch64-apple-darwin
189189
if: ${{ inputs.target == 'aarch64-apple-darwin' && steps.check_cache.outputs.files_exists != 'true' && !inputs.skipable }}
190190
run: |
191-
if [[ "${{ startsWith(runner.name, 'GitHub Actions') }}" == "true" ]]; then
191+
if [[ "${{ runner.environment == 'github-hosted' }}" == "true" ]]; then
192192
# Github runner
193193
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
194194
fi
@@ -218,10 +218,10 @@ jobs:
218218
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
219219
with:
220220
ref: ${{ inputs.ref }}
221-
clean: ${{ startsWith(runner.name, 'GitHub Actions') }}
221+
clean: ${{ runner.environment == 'github-hosted' }}
222222

223223
- name: Clean
224-
if: ${{ !startsWith(runner.name, 'GitHub Actions') }}
224+
if: ${{ runner.environment == 'self-hosted' }}
225225
uses: ./.github/actions/clean
226226
with:
227227
target: ${{ inputs.target }}
@@ -280,10 +280,10 @@ jobs:
280280
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
281281
with:
282282
ref: ${{ inputs.ref }}
283-
clean: ${{ startsWith(runner.name, 'GitHub Actions') }}
283+
clean: ${{ runner.environment == 'github-hosted' }}
284284

285285
- name: Clean
286-
if: ${{ !inputs.skipable && !startsWith(runner.name, 'GitHub Actions') }}
286+
if: ${{ !inputs.skipable && runner.environment == 'self-hosted' }}
287287
uses: ./.github/actions/clean
288288
with:
289289
target: ${{ inputs.target }}
@@ -379,10 +379,10 @@ jobs:
379379
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
380380
with:
381381
ref: ${{ inputs.ref }}
382-
clean: ${{ startsWith(runner.name, 'GitHub Actions') }}
382+
clean: ${{ runner.environment == 'github-hosted' }}
383383

384384
- name: Clean
385-
if: ${{ !startsWith(runner.name, 'GitHub Actions') }}
385+
if: ${{ runner.environment == 'self-hosted' }}
386386
uses: ./.github/actions/clean
387387
with:
388388
target: ${{ inputs.target }}

crates/rspack_core/src/compiler/compilation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ impl Compilation {
612612
self.make_artifact = update_module_graph(
613613
self,
614614
make_artifact,
615-
vec![MakeParam::BuildEntryAndClean(
615+
vec![MakeParam::BuildEntry(
616616
self
617617
.entries
618618
.values()

0 commit comments

Comments
 (0)