Skip to content

Commit baa0aee

Browse files
authored
Merge pull request #9270 from ever-co/develop
Stage
2 parents b229557 + 4c3c829 commit baa0aee

27 files changed

+877
-264
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ aliases:
4040
sudo apt install -y curl gnupg git libappindicator3-1 ca-certificates binutils icnsutils graphicsmagick
4141
python3 -m pip install packaging setuptools
4242
sudo npm install --quiet [email protected] -g
43+
sudo npm install --quiet [email protected] -g
4344
sudo npm config set python /usr/bin/python
4445
4546
- &install-yarn

.deploy/api/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ RUN apk --update add bash && npm i -g npm@9 \
126126
# Verify installed versions
127127
RUN node --version && npm --version && python3 --version
128128

129-
RUN npm install --quiet [email protected] -g && npm install yarn -g --force
129+
RUN npm install --quiet [email protected] -g && npm install yarn -g --force && npm install --quiet [email protected] -g
130130
RUN mkdir /srv/gauzy && chown -R node:node /srv/gauzy
131131

132132
COPY wait .deploy/api/entrypoint.prod.sh .deploy/api/entrypoint.compose.sh /
@@ -192,7 +192,7 @@ RUN apk --update add bash && npm i -g npm@9 \
192192
# Verify installed versions
193193
RUN node --version && npm --version && python3 --version
194194

195-
RUN npm install --quiet [email protected] -g && npm install yarn -g --force
195+
RUN npm install --quiet [email protected] -g && npm install yarn -g --force && npm install --quiet [email protected] -g
196196
RUN mkdir /srv/gauzy && chown -R node:node /srv/gauzy
197197

198198
USER node:node

.deploy/mcp-auth/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN apk add --no-cache python3 python3-dev py3-pip py3-setuptools build-base gcc
4646
&& npm install --quiet [email protected] -g \
4747
&& npm install yarn -g --force \
4848
&& npm install --quiet [email protected] -g
49+
4950
RUN mkdir /srv/gauzy-mcp-auth && chown -R node:node /srv/gauzy-mcp-auth
5051

5152
USER node:node
@@ -105,6 +106,7 @@ FROM node:20.18.1-alpine3.19 AS proddependencies
105106

106107
RUN apk add --no-cache python3 python3-dev py3-pip py3-setuptools build-base gcc g++ make autoconf automake git \
107108
&& npm install --quiet [email protected] -g \
109+
&& npm install yarn -g --force \
108110
&& npm install --quiet [email protected] -g
109111

110112
USER node:node

.deploy/mcp/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ FROM node:20.18.1-alpine3.19 AS proddependencies
150150

151151
RUN apk add --no-cache python3 python3-dev py3-pip py3-setuptools build-base gcc g++ make autoconf automake git \
152152
&& npm install --quiet [email protected] -g \
153+
&& npm install yarn -g --force \
153154
&& npm install --quiet [email protected] -g
154155

155156
USER node:node

.github/workflows/agent-prod.yml

Lines changed: 66 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Node.js, NPM and Yarn
2727
uses: buildjet/setup-node@v4
2828
with:
29-
node-version: 20.18.1
29+
node-version: 22.21.1
3030
cache: "yarn"
3131

3232
- name: Change permissions
@@ -39,10 +39,10 @@ jobs:
3939
run: python3 -m pip install packaging setuptools
4040

4141
- name: Install latest version of NPM
42-
run: "sudo npm install -g npm@9"
42+
run: "sudo npm install -g npm@10.9.4"
4343

44-
- name: Install node-gyp package
45-
run: "sudo npm install --quiet -g [email protected]"
44+
- name: Install globally node-gyp, ts-node and nx packages
45+
run: "sudo npm install --quiet -g [email protected] [email protected] [email protected]"
4646

4747
- name: Install Yarn dependencies
4848
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
@@ -93,17 +93,17 @@ jobs:
9393
- name: Install Node.js, NPM and Yarn
9494
uses: actions/setup-node@v4
9595
with:
96-
node-version: 20.18.1
96+
node-version: 22.21.1
9797
cache: "yarn"
9898

9999
- name: Fix node-gyp and Python
100100
run: python3 -m pip install --break-system-packages packaging setuptools
101101

102102
- name: Install latest version of NPM
103-
run: "sudo npm install -g npm@9"
103+
run: "sudo npm install -g npm@10.9.4"
104104

105-
- name: Install node-gyp package
106-
run: "sudo npm install --quiet -g [email protected]"
105+
- name: Install globally node-gyp, ts-node and nx packages
106+
run: "sudo npm install --quiet -g [email protected] [email protected] [email protected]"
107107

108108
- name: Install Yarn dependencies
109109
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
@@ -157,17 +157,49 @@ jobs:
157157
- name: Install Node.js, NPM and Yarn
158158
uses: actions/setup-node@v4
159159
with:
160-
node-version: 20.18.1
160+
node-version: 22.21.1
161161
cache: "yarn"
162162

163+
- name: Install Visual Studio 2022 Build Tools (VCTools)
164+
shell: powershell
165+
run: |
166+
choco install -y visualstudio2022buildtools --execution-timeout=21600 --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive --norestart"
167+
168+
- name: Configure node-gyp to use VS 2022
169+
shell: powershell
170+
run: |
171+
"GYP_MSVS_VERSION=2022" | Out-File -FilePath $env:GITHUB_ENV -Append
172+
"npm_config_msvs_version=2022" | Out-File -FilePath $env:GITHUB_ENV -Append
173+
163174
- name: Fix node-gyp and Python
164175
run: python3 -m pip install packaging setuptools
165176

177+
- name: Setup MSVC (VS 2022 dev env)
178+
uses: ilammy/msvc-dev-cmd@v1
179+
with:
180+
arch: x64
181+
166182
- name: Install latest version of NPM
167-
run: "npm install -g npm@9"
183+
run: "npm install -g npm@10.9.4"
168184

169-
- name: Install node-gyp package
170-
run: "npm install --quiet -g [email protected]"
185+
- name: Install globally node-gyp, ts-node and nx packages
186+
187+
188+
- name: Configure npm python for node-gyp
189+
shell: powershell
190+
run: |
191+
$py = (Get-Command python.exe).Source
192+
Write-Host "python is: $py"
193+
"npm_config_python=$py" | Out-File -FilePath $env:GITHUB_ENV -Append
194+
"PYTHON=$py" | Out-File -FilePath $env:GITHUB_ENV -Append
195+
196+
- name: Show tool versions
197+
shell: powershell
198+
run: |
199+
node -v
200+
npm -v
201+
python --version
202+
python -c "import sys; print(sys.executable)"
171203
172204
- name: Install Yarn dependencies
173205
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
@@ -188,8 +220,30 @@ jobs:
188220
AGENT_APP_DESCRIPTION: "Ever Gauzy Agent"
189221
AGENT_APP_ID: "com.ever.gauzyagent"
190222

223+
- name: Add Yarn/Node/npm-global/node_modules to GITHUB_PATH
224+
shell: powershell
225+
run: |
226+
$yarnPath = (Get-Command yarn).Source | Split-Path -Parent
227+
$nodePath = (Get-Command node).Source | Split-Path -Parent
228+
$npmGlobalBin = npm config get prefix
229+
$localBin = Join-Path $PWD "node_modules\.bin"
230+
echo $localBin >> $env:GITHUB_PATH
231+
echo $npmGlobalBin >> $env:GITHUB_PATH
232+
echo $yarnPath >> $env:GITHUB_PATH
233+
if ($nodePath -ne $yarnPath) { echo $nodePath >> $env:GITHUB_PATH }
234+
Write-Host "Added to GITHUB_PATH: $localBin, $npmGlobalBin, $yarnPath, $nodePath"
235+
191236
- name: Build Agent
237+
shell: powershell
192238
run: |
239+
Write-Host "=== Command locations ==="
240+
Write-Host "Node: $((Get-Command node -ErrorAction SilentlyContinue).Source)"
241+
Write-Host "Yarn: $((Get-Command yarn -ErrorAction SilentlyContinue).Source)"
242+
Write-Host "ts-node: $((Get-Command ts-node -ErrorAction SilentlyContinue).Source)"
243+
Write-Host "cross-env: $((Get-Command cross-env -ErrorAction SilentlyContinue).Source)"
244+
Write-Host "nx: $((Get-Command nx -ErrorAction SilentlyContinue).Source)"
245+
Write-Host ""
246+
Write-Host "=== Starting build ==="
193247
yarn build:agent:windows:release:gh
194248
env:
195249
USE_HARD_LINKS: false

.github/workflows/agent-stage.yml

Lines changed: 66 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Node.js, NPM and Yarn
2727
uses: buildjet/setup-node@v4
2828
with:
29-
node-version: 20.18.1
29+
node-version: 22.21.1
3030
cache: "yarn"
3131

3232
- name: Change permissions
@@ -39,10 +39,10 @@ jobs:
3939
run: python3 -m pip install packaging setuptools
4040

4141
- name: Install latest version of NPM
42-
run: "sudo npm install -g npm@9"
42+
run: "sudo npm install -g npm@10.9.4"
4343

44-
- name: Install node-gyp package
45-
run: "sudo npm install --quiet -g [email protected]"
44+
- name: Install globally node-gyp, ts-node and nx packages
45+
run: "sudo npm install --quiet -g [email protected] [email protected] [email protected]"
4646

4747
- name: Install Yarn dependencies
4848
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
@@ -93,17 +93,17 @@ jobs:
9393
- name: Install Node.js, NPM and Yarn
9494
uses: actions/setup-node@v4
9595
with:
96-
node-version: 20.18.1
96+
node-version: 22.21.1
9797
cache: "yarn"
9898

9999
- name: Fix node-gyp and Python
100100
run: python3 -m pip install --break-system-packages packaging setuptools
101101

102102
- name: Install latest version of NPM
103-
run: "sudo npm install -g npm@9"
103+
run: "sudo npm install -g npm@10.9.4"
104104

105-
- name: Install node-gyp package
106-
run: "sudo npm install --quiet -g [email protected]"
105+
- name: Install globally node-gyp, ts-node and nx packages
106+
run: "sudo npm install --quiet -g [email protected] [email protected] [email protected]"
107107

108108
- name: Install Yarn dependencies
109109
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
@@ -157,17 +157,49 @@ jobs:
157157
- name: Install Node.js, NPM and Yarn
158158
uses: actions/setup-node@v4
159159
with:
160-
node-version: 20.18.1
160+
node-version: 22.21.1
161161
cache: "yarn"
162162

163+
- name: Install Visual Studio 2022 Build Tools (VCTools)
164+
shell: powershell
165+
run: |
166+
choco install -y visualstudio2022buildtools --execution-timeout=21600 --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive --norestart"
167+
168+
- name: Configure node-gyp to use VS 2022
169+
shell: powershell
170+
run: |
171+
"GYP_MSVS_VERSION=2022" | Out-File -FilePath $env:GITHUB_ENV -Append
172+
"npm_config_msvs_version=2022" | Out-File -FilePath $env:GITHUB_ENV -Append
173+
163174
- name: Fix node-gyp and Python
164175
run: python3 -m pip install packaging setuptools
165176

177+
- name: Setup MSVC (VS 2022 dev env)
178+
uses: ilammy/msvc-dev-cmd@v1
179+
with:
180+
arch: x64
181+
166182
- name: Install latest version of NPM
167-
run: "npm install -g npm@9"
183+
run: "npm install -g npm@10.9.4"
168184

169-
- name: Install node-gyp package
170-
run: "npm install --quiet -g [email protected]"
185+
- name: Install globally node-gyp, ts-node and nx packages
186+
187+
188+
- name: Configure npm python for node-gyp
189+
shell: powershell
190+
run: |
191+
$py = (Get-Command python.exe).Source
192+
Write-Host "python is: $py"
193+
"npm_config_python=$py" | Out-File -FilePath $env:GITHUB_ENV -Append
194+
"PYTHON=$py" | Out-File -FilePath $env:GITHUB_ENV -Append
195+
196+
- name: Show tool versions
197+
shell: powershell
198+
run: |
199+
node -v
200+
npm -v
201+
python --version
202+
python -c "import sys; print(sys.executable)"
171203
172204
- name: Install Yarn dependencies
173205
run: "yarn install --network-timeout 1000000 --frozen-lockfile --ignore-scripts"
@@ -188,8 +220,30 @@ jobs:
188220
AGENT_APP_DESCRIPTION: "Ever Gauzy Agent"
189221
AGENT_APP_ID: "com.ever.gauzyagent"
190222

223+
- name: Add Yarn/Node/npm-global/node_modules to GITHUB_PATH
224+
shell: powershell
225+
run: |
226+
$yarnPath = (Get-Command yarn).Source | Split-Path -Parent
227+
$nodePath = (Get-Command node).Source | Split-Path -Parent
228+
$npmGlobalBin = npm config get prefix
229+
$localBin = Join-Path $PWD "node_modules\.bin"
230+
echo $localBin >> $env:GITHUB_PATH
231+
echo $npmGlobalBin >> $env:GITHUB_PATH
232+
echo $yarnPath >> $env:GITHUB_PATH
233+
if ($nodePath -ne $yarnPath) { echo $nodePath >> $env:GITHUB_PATH }
234+
Write-Host "Added to GITHUB_PATH: $localBin, $npmGlobalBin, $yarnPath, $nodePath"
235+
191236
- name: Build Agent
237+
shell: powershell
192238
run: |
239+
Write-Host "=== Command locations ==="
240+
Write-Host "Node: $((Get-Command node -ErrorAction SilentlyContinue).Source)"
241+
Write-Host "Yarn: $((Get-Command yarn -ErrorAction SilentlyContinue).Source)"
242+
Write-Host "ts-node: $((Get-Command ts-node -ErrorAction SilentlyContinue).Source)"
243+
Write-Host "cross-env: $((Get-Command cross-env -ErrorAction SilentlyContinue).Source)"
244+
Write-Host "nx: $((Get-Command nx -ErrorAction SilentlyContinue).Source)"
245+
Write-Host ""
246+
Write-Host "=== Starting build ==="
193247
yarn build:agent:windows:release:gh
194248
env:
195249
USE_HARD_LINKS: false

0 commit comments

Comments
 (0)