Skip to content

Commit 66a6d7e

Browse files
authored
[hermes] Move to repository root (#3192)
This allows `.github/workflows/Dockerfile` to avoid copying the Hermes source into the container when it copies `tools`, which means that Hermes changes will not force a full container re-build, instead allowing more layers of the container to be cached in CI. gherrit-pr-id: Gcc4q572sgyiglnf43z6by36ux4scgqec
1 parent 3e07da2 commit 66a6d7e

File tree

21,012 files changed

+1608817
-127862
lines changed

Some content is hidden

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

21,012 files changed

+1608817
-127862
lines changed

.dockerignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
# This file may not be copied, modified, or distributed except according to
88
# those terms.
99

10-
**/target/
10+
/target/
11+
/hermes/target/
1112
**/.git/
1213
tools/vendor
1314
tools/.cargo/
15+
16+
# FIXME: This is just a symlink to `../hermes`, intended to ensure that old
17+
# links to `tools/hermes` are less confusing since we've moved that directory to
18+
# `hermes` in the repo root. We should get rid of that symlink at some point.
19+
tools/hermes/

.github/auto-approvers.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{
2-
"tools/hermes/": [
3-
"joshlf"
4-
],
5-
"tools/Cargo.lock": [
6-
"joshlf"
7-
],
8-
"tools/vendor/": [
2+
"hermes/": [
93
"joshlf"
104
],
115
".github/workflows/hermes.yml": [

.github/workflows/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ RUN cargo install cargo-nextest --locked && \
3737

3838
WORKDIR /setup
3939

40-
# FIXME: Don't copy `tools/hermes` so that changes there don't invalidate the
41-
# Docker cache.
4240
COPY Cargo.toml ./
4341
COPY cargo.sh ./
4442
COPY tools ./tools

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ jobs:
611611
# for checking compatibility (rather than the most recent published version),
612612
# which will make it unnecessary to remove `.cargo/config.toml`.
613613
- name: Remove Cargo config and vendored dependencies
614-
run: rm -rf .cargo/config.toml tools/vendor
614+
run: rm -rf .cargo/config.toml tools/vendor hermes/vendor
615615

616616
# Check semver compatibility with the most recently-published version on
617617
# crates.io. We do this in the matrix rather than in its own job so that it

.github/workflows/hermes.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
- name: Build and cache Docker image
4141
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
4242
with:
43-
context: tools
44-
file: tools/hermes/Dockerfile
43+
context: hermes
44+
file: hermes/Dockerfile
4545
target: base
4646
load: true
4747
tags: hermes-ci:local
@@ -53,14 +53,14 @@ jobs:
5353
# easier to skim (in particular, it's clear at a glance whether a failure
5454
# is due to unit or integration tests).
5555
- name: Run unit tests
56-
run: docker run --rm -v $GITHUB_WORKSPACE/tools:/workspace hermes-ci:local cargo test --verbose --bin cargo-hermes
56+
run: docker run --rm -v $GITHUB_WORKSPACE/hermes:/workspace hermes-ci:local cargo test --verbose --bin cargo-hermes
5757

5858
# We duplicate running unit tests since they're very cheap compared to
5959
# integration tests, and this way it's easier to be sure that we run all
6060
# tests instead of specifically trying to carve out unit tests and risk
6161
# missing test categories.
6262
- name: Run all tests
63-
run: docker run --rm -v $GITHUB_WORKSPACE/tools:/workspace hermes-ci:local cargo test --verbose
63+
run: docker run --rm -v $GITHUB_WORKSPACE/hermes:/workspace hermes-ci:local cargo test --verbose
6464

6565
# Used to signal to branch protections that all other jobs have succeeded.
6666
all-jobs-succeed:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ lcov.info
1717
# previous rules)
1818
!vendor/**
1919
!tools/vendor/**
20+
!hermes/vendor/**

ci/check_fmt.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,18 @@ else
1616
FMT_FLAGS="--check"
1717
fi
1818

19-
find . -iname '*.rs' -type f -not -path './target/*' -not -iname '*.expected.rs' -not -path './vendor/*' -not -path './tools/vendor/*' -not -path './tools/hermes/*' -print0 | xargs -0 --no-run-if-empty ./cargo.sh +nightly fmt $FMT_FLAGS -- >&2
20-
find ./tools/hermes -iname '*.rs' -type f -not -path './tools/hermes/target/*' -not -iname '*.expected.rs' -not -path './tools/hermes/tests/fixtures/*' -not -path './tools/hermes/tests/ui/*' -print0 | xargs -0 --no-run-if-empty ./cargo.sh +nightly fmt $FMT_FLAGS --manifest-path tools/hermes/Cargo.toml -- >&2
19+
find . -iname '*.rs' -type f \
20+
-not -path './hermes/*' \
21+
-not -path './target/*' \
22+
-not -path './tools/target/*' \
23+
-not -iname '*.expected.rs' \
24+
-not -path './vendor/*' \
25+
-not -path './tools/vendor/*' \
26+
-print0 | xargs -0 --no-run-if-empty ./cargo.sh +nightly fmt $FMT_FLAGS -- >&2
27+
28+
find ./hermes -iname '*.rs' -type f \
29+
-not -path './hermes/target/*' \
30+
-not -path './hermes/vendor/*' \
31+
-not -path './hermes/tests/fixtures/*' \
32+
-not -path './hermes/tests/ui/*' \
33+
-print0 | xargs -0 --no-run-if-empty ./cargo.sh +nightly fmt $FMT_FLAGS --manifest-path hermes/Cargo.toml -- >&2

hermes/.cargo/config.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[env]
2+
__ZEROCOPY_LOCAL_DEV = "1"
3+
4+
[source.crates-io]
5+
replace-with = "vendored-sources"
6+
7+
[source.vendored-sources]
8+
directory = "vendor"
File renamed without changes.

0 commit comments

Comments
 (0)