Skip to content

Commit

Permalink
chore: use projen to manage the wing repository (#7250)
Browse files Browse the repository at this point in the history
This pull request adds projen to manage the repository root. Only the root is managed by projen for now, although some workspaces packages already use projen.

In order to fix some cache problems in the CI, the turbo cache is now forced to miss, and the e2e workflows will compile everything (previously, they relied on the turbo cache).

Colateral changes include adding root editorconfig and prettier config files, which in turn amended 100+ source files.

Future pull requests will gradually move workspace packages to projen, standardizing dependency management and code styling in the process.
  • Loading branch information
skyrpex authored Jan 23, 2025
1 parent 0dca2e2 commit 06454c9
Show file tree
Hide file tree
Showing 293 changed files with 2,465 additions and 1,833 deletions.
13 changes: 13 additions & 0 deletions .editorconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 28 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ env:
CARGO_TERM_COLOR: always
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_FORCE: true # force a cache miss until we fix the turbo cache config
IS_SAME_REPO_PR: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}

jobs:
Expand Down Expand Up @@ -66,14 +67,14 @@ jobs:
# Don't save cache here, to avoid thrashing with test job
save-if: false

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Derive appropriate SHAs for base and head
id: shas
uses: nrwl/nx-set-shas@v3
Expand All @@ -88,6 +89,9 @@ jobs:
GENERATE_VERSION: ${{ github.event_name != 'push' || github.repository != 'winglang/wing' }}
run: pnpm bump-pack

- name: Run Projen
run: pnpm projen

- name: Build and Package
run: pnpm package:ci
env:
Expand Down Expand Up @@ -246,6 +250,23 @@ jobs:
cache: "pnpm"
node-version: ${{ matrix.node }}

- name: Install Rust
uses: moonrepo/setup-rust@v1
with:
inherit-toolchain: true
cache: false

- name: Setup Cargo Cache
uses: Swatinem/rust-cache@v2
with:
# Don't save cache here, to avoid thrashing with test job
save-if: false

- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false

- name: Download Dist Artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -254,8 +275,10 @@ jobs:

- name: Install dependencies
run: |
pnpm install --frozen-lockfile --ignore-scripts --filter hangar --filter examples-valid --filter examples-invalid
pnpm run compile --filter jsii-fixture
pnpm install --frozen-lockfile
- name: Build and Package
run: pnpm package:ci

- name: Run Hangar Tests
working-directory: tools/hangar
Expand Down
36 changes: 16 additions & 20 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .prettierrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 06454c9

Please sign in to comment.