Skip to content

Commit 9d96e62

Browse files
committed
Merge main branch and resolve conflicts
2 parents 0be5a33 + 6f84d47 commit 9d96e62

File tree

509 files changed

+19589
-2735
lines changed

Some content is hidden

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

509 files changed

+19589
-2735
lines changed

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 9 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,7 @@ defaults:
1717

1818
jobs:
1919
test:
20-
# Why Mac and Windows?
21-
# I can't run electron playwright on ubuntu-latest and
22-
# Linux support for Dyad is experimental so not as important
23-
# as Mac + Windows
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
os: [
28-
# npm install is very slow
29-
# { name: "windows-arm", image: "windows-11-arm" },
30-
{ name: "windows", image: "windows-latest" },
31-
{ name: "macos", image: "macos-latest" },
32-
]
33-
shard: [1, 2, 3, 4]
34-
shardTotal: [4]
35-
runs-on: ${{ matrix.os.image }}
20+
runs-on: macos-latest
3621
steps:
3722
- name: Checkout code
3823
uses: actions/checkout@v4
@@ -47,7 +32,7 @@ jobs:
4732
rm -rf node_modules
4833
npm cache clean --force
4934
- name: Install node modules
50-
run: npm ci --no-audit --no-fund --progress=false
35+
run: npm install --no-audit --no-fund --progress=false
5136
- name: Presubmit check (e.g. lint, format)
5237
# do not run this on Windows (it fails and not necessary)
5338
# Only run on shard 1 to avoid redundant execution
@@ -65,10 +50,6 @@ jobs:
6550
run: npm run test
6651
- name: Setup pnpm
6752
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
68-
with:
69-
version: latest
70-
- name: Clone nextjs-template
71-
run: git clone --depth 1 https://github.com/SFARPak/nextjs-template.git nextjs-template
7253
- name: Get pnpm store directory
7354
id: pnpm-cache
7455
shell: bash
@@ -84,8 +65,8 @@ jobs:
8465
# Not strictly needed but makes the e2e tests faster (and less flaky)
8566
- name: Install scaffold dependencies
8667
run: cd scaffold && pnpm install
87-
- name: Install nextjs-template dependencies
88-
run: cd nextjs-template && pnpm install
68+
- name: Install scaffold-3d dependencies
69+
run: cd scaffold-3d && pnpm install
8970
- name: Install Chromium browser for Playwright
9071
run: npx playwright install chromium --with-deps
9172
- name: Build
@@ -94,60 +75,15 @@ jobs:
9475
run: npm run pre:e2e
9576
- name: Prep test server
9677
run: cd testing/fake-llm-server && npm install && npm run build && cd -
97-
- name: E2E tests (Shard ${{ matrix.shard }}/4)
78+
- name: E2E tests
9879
# You can add debug logging to make it easier to see what's failing
9980
# by adding "DEBUG=pw:browser" in front.
100-
# Use blob reporter for sharding and merge capabilities
101-
run: DEBUG=pw:browser npx playwright test --shard=${{ matrix.shard }}/${{ matrix.shardTotal }}
102-
- name: Upload shard results
81+
run: DEBUG=pw:browser npx playwright test
82+
- name: Upload test results
10383
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
10484
if: ${{ !cancelled() }}
10585
with:
106-
name: blob-report-${{ matrix.os.name }}-shard-${{ matrix.shard }}
107-
path: blob-report
86+
name: test-results
87+
path: test-results
10888
retention-days: 1
10989

110-
merge-reports:
111-
# Merge reports after playwright-tests, even if some shards have failed
112-
if: ${{ !cancelled() }}
113-
needs: [test]
114-
115-
runs-on: ubuntu-latest
116-
steps:
117-
- uses: actions/checkout@v4
118-
- uses: actions/setup-node@v4
119-
with:
120-
node-version: lts/*
121-
- name: Install dependencies
122-
run: npm ci --no-audit --no-fund --progress=false
123-
124-
- name: Download blob reports from GitHub Actions Artifacts
125-
uses: actions/download-artifact@v4
126-
with:
127-
path: all-blob-reports
128-
pattern: blob-report-*
129-
merge-multiple: true
130-
131-
- name: Debug - List downloaded blob reports
132-
run: |
133-
echo "Contents of all-blob-reports directory:"
134-
ls -la all-blob-reports/
135-
echo "File sizes and details:"
136-
find all-blob-reports/ -type f -exec ls -lh {} \; || echo "No files found"
137-
138-
- name: Merge into HTML Report
139-
run: PLAYWRIGHT_HTML_OUTPUT_DIR=playwright-report npx playwright merge-reports --config=merge.config.ts ./all-blob-reports
140-
141-
- name: Debug - List playwright-report contents
142-
run: |
143-
echo "Contents of playwright-report directory:"
144-
ls -la playwright-report/ || echo "playwright-report directory does not exist"
145-
echo "Current directory contents:"
146-
ls -la
147-
148-
- name: Upload HTML report
149-
uses: actions/upload-artifact@v4
150-
with:
151-
name: html-report--attempt-${{ github.run_attempt }}
152-
path: playwright-report
153-
retention-days: 3
Lines changed: 66 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,119 @@
11
# .github/workflows/release.yml
2-
# -------------------------------------------------------
3-
# GitHub Actions workflow to build, sign (if configured),
4-
# and publish Electron apps for all major OS platforms.
5-
# -------------------------------------------------------
62

7-
name: Release app
3+
# Need to write to repo contents to upload the app to GitHub Release
4+
# See: https://www.electronforge.io/config/publishers/github#authentication
5+
permissions:
6+
contents: write
87

8+
name: Release app
99
on:
1010
workflow_dispatch:
1111
push:
12-
branches: [ main, release/** ]
13-
14-
# Required for publishing release assets
15-
permissions:
16-
contents: write
17-
12+
branches: [main, release/**]
1813
jobs:
1914
build:
20-
name: Build & Publish App
2115
environment: release
16+
permissions:
17+
contents: write
2218
strategy:
23-
# Prevent race conditions during concurrent release creation
24-
max-parallel: 1
19+
# Uncomment max-parallel to prevent race condition (where multiple releases are
20+
# created concurrently). Typically though, we'll create a release manually ahead of time
21+
# which prevents the race.
22+
# max-parallel: 1
2523
matrix:
24+
# See https://github.com/SFARPak/dyad/issues/96
2625
os:
27-
- { name: "windows", image: "windows-latest" }
28-
- { name: "linux", image: "ubuntu-22.04" }
29-
- { name: "macos-intel", image: "macos-13" }
30-
- { name: "macos", image: "macos-latest" }
31-
26+
[
27+
{ name: "windows", image: "windows-latest" },
28+
{ name: "linux", image: "ubuntu-22.04" },
29+
{ name: "macos-intel", image: "macos-13" },
30+
{ name: "macos", image: "macos-latest" },
31+
]
3232
runs-on: ${{ matrix.os.image }}
33-
33+
# env:
34+
# CSC_LINK: ${{ secrets.CSC_LINK }}
35+
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
3436
steps:
35-
- name: πŸ›ŽοΈ Checkout repository
36-
uses: actions/checkout@v4
37-
38-
- name: 🧩 Setup Node.js
39-
uses: actions/setup-node@v4
37+
- name: Github checkout
38+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
39+
- name: Use Node.js
40+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
4041
with:
4142
node-version: 20
42-
43-
- name: 🧹 Clean up environment
44-
shell: bash
43+
- name: Clean up
4544
run: |
4645
rm -rf node_modules
4746
rm -f package-lock.json
4847
npm cache clean --force
49-
50-
- name: πŸ“¦ Install dependencies
51-
run: npm install --include=optional
52-
53-
# Rebuild rollup for the appropriate platform
54-
- name: πŸ› οΈ Rebuild Rollup (Linux)
48+
shell: bash
49+
- run: npm install --include=optional
50+
- run: npm rebuild @rollup/rollup-linux-x64-gnu || true
5551
if: contains(matrix.os.name, 'linux')
56-
run: npm rebuild @rollup/rollup-linux-x64-gnu || true
57-
58-
- name: πŸ› οΈ Rebuild Rollup (macOS Intel)
52+
- run: npm rebuild @rollup/rollup-darwin-x64 || true
5953
if: contains(matrix.os.name, 'macos-intel')
60-
run: npm rebuild @rollup/rollup-darwin-x64 || true
61-
62-
- name: πŸ› οΈ Rebuild Rollup (macOS ARM)
54+
- run: npm rebuild @rollup/rollup-darwin-arm64 || true
6355
if: contains(matrix.os.name, 'macos')
64-
run: npm rebuild @rollup/rollup-darwin-arm64 || true
65-
66-
- name: πŸ› οΈ Rebuild Rollup (Windows)
56+
- run: npm rebuild @rollup/rollup-win32-x64-msvc || true
6757
if: contains(matrix.os.name, 'windows')
68-
run: npm rebuild @rollup/rollup-win32-x64-msvc || true
69-
70-
# Optional macOS signing setup (commented out)
71-
# - name: Add macOS certificate
72-
# if: contains(matrix.os.name, 'macos') && env.MACOS_CERT_P12 != ''
58+
# - name: add macos cert
59+
# if: contains(matrix.os.name, 'macos') && secrets.MACOS_CERT_P12
7360
# env:
7461
# MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
7562
# MACOS_CERT_PASSWORD: ${{ secrets.MACOS_CERT_PASSWORD }}
76-
# run: chmod +x tools/add-macos-cert.sh && ./tools/add-macos-cert.sh
77-
78-
# Optional Windows signing setup (commented out)
79-
# - name: Set up Windows certificate
63+
# run: chmod +x tools/add-macos-cert.sh && . ./tools/add-macos-cert.sh
64+
# Windows only
65+
# - name: Set up certificate
8066
# if: contains(matrix.os.name, 'windows')
67+
# run: |
68+
# echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
8169
# shell: bash
70+
# - name: Set variables
71+
# if: contains(matrix.os.name, 'windows')
72+
# id: variables
8273
# run: |
83-
# echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > D:/Certificate_pkcs12.p12
74+
# echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
75+
# echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
8476
# echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
85-
86-
- name: πŸš€ Publish App to GitHub Releases
77+
# echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
78+
# shell: bash
79+
# - name: Code signing with Software Trust Manager
80+
# if: contains(matrix.os.name, 'windows')
81+
# uses: digicert/[email protected]
82+
# - name: Sync certificate (Windows)
83+
# if: contains(matrix.os.name, 'windows')
84+
# run: |
85+
# smctl windows certsync --keypair-alias=${{ secrets.DIGICERT_KEYPAIR_ALIAS }}
86+
# shell: bash
87+
# Publish (all platforms)
88+
- name: Publish app
8789
env:
8890
NODE_OPTIONS: "--max-old-space-size=4096"
91+
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}
8992
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9093
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
9194
APPLE_ID: ${{ secrets.APPLE_ID }}
9295
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
93-
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}
96+
# CSC_LINK: ${{ secrets.CSC_LINK }}
97+
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
9498
run: npm run publish
9599

96100
verify-assets:
97-
name: βœ… Verify Release Assets
101+
name: Verify Release Assets
98102
needs: build
99103
runs-on: ubuntu-latest
100-
101104
permissions:
102105
contents: read
103106
packages: read
104107
actions: read
105108
id-token: write
106-
107109
steps:
108-
- name: πŸ›ŽοΈ Checkout repository
109-
uses: actions/checkout@v4
110-
111-
- name: 🧩 Setup Node.js
112-
uses: actions/setup-node@v4
110+
- name: Github checkout
111+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
112+
- name: Use Node.js
113+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
113114
with:
114115
node-version: 20
115-
116-
- name: πŸ” Check GITHUB_TOKEN permissions
117-
env:
118-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119-
run: |
120-
echo "πŸ” Verifying GitHub token access..."
121-
response=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/SFARPak/AliFullStack")
122-
if [ "$response" != "200" ]; then
123-
echo "❌ GITHUB_TOKEN invalid or lacks 'contents' permission. Response code: $response"
124-
exit 1
125-
fi
126-
echo "βœ… GITHUB_TOKEN verified successfully."
127-
128-
- name: πŸ“¦ Verify release assets
116+
- name: Verify all release assets are uploaded
129117
env:
130118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131119
run: node scripts/verify-release-assets.js

0 commit comments

Comments
Β (0)