Skip to content

Commit aeda7aa

Browse files
authored
Merge pull request #4 from openSVM/copilot/fix-3
Implement comprehensive build system for all platforms with CI/CD support
2 parents aa46433 + 8192247 commit aeda7aa

File tree

71 files changed

+3497
-1
lines changed

Some content is hidden

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

71 files changed

+3497
-1
lines changed
Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
name: Build All Platforms
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
release:
9+
types: [ published ]
10+
11+
jobs:
12+
build-web:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version-file: '.nvmrc'
22+
cache: 'yarn'
23+
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- name: Build web application
28+
run: ./scripts/build-web.sh
29+
30+
- name: Upload web artifacts
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: web-build
34+
path: deploy_*/
35+
retention-days: 30
36+
37+
build-extensions:
38+
runs-on: ubuntu-latest
39+
needs: build-web
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version-file: '.nvmrc'
48+
cache: 'yarn'
49+
50+
- name: Install dependencies
51+
run: yarn install --frozen-lockfile
52+
53+
- name: Build browser extensions
54+
run: ./scripts/build-extensions.sh
55+
56+
- name: Upload extension artifacts
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: browser-extensions
60+
path: |
61+
extension/*.zip
62+
extension/extension-build-info.txt
63+
retention-days: 30
64+
65+
build-android:
66+
runs-on: ubuntu-latest
67+
needs: build-web
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v4
71+
72+
- name: Setup Node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version-file: '.nvmrc'
76+
cache: 'yarn'
77+
78+
- name: Setup Java
79+
uses: actions/setup-java@v4
80+
with:
81+
distribution: 'temurin'
82+
java-version: '17'
83+
84+
- name: Install dependencies
85+
run: yarn install --frozen-lockfile
86+
87+
- name: Build mobile applications
88+
run: ./scripts/build-mobile.sh
89+
90+
- name: Upload Android artifacts
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: android-builds
94+
path: |
95+
android/app/build/outputs/apk/**/*.apk
96+
android/app/build/outputs/bundle/**/*.aab
97+
retention-days: 30
98+
99+
build-native-linux:
100+
runs-on: ubuntu-latest
101+
needs: build-web
102+
steps:
103+
- name: Checkout code
104+
uses: actions/checkout@v4
105+
106+
- name: Setup Node.js
107+
uses: actions/setup-node@v4
108+
with:
109+
node-version-file: '.nvmrc'
110+
cache: 'yarn'
111+
112+
- name: Install system dependencies
113+
run: |
114+
sudo apt-get update
115+
sudo apt-get install -y libnss3-dev libatk-bridge2.0-dev libdrm2 libxkbcommon-dev libgtk-3-dev libgbm-dev libasound2-dev rpm fakeroot dpkg
116+
117+
- name: Install dependencies
118+
run: yarn install --frozen-lockfile
119+
120+
- name: Build web application
121+
run: yarn build
122+
123+
- name: Build Linux native applications
124+
run: ./scripts/build-native-linux.sh
125+
126+
- name: Upload Linux native artifacts
127+
uses: actions/upload-artifact@v4
128+
with:
129+
name: linux-native-builds
130+
path: |
131+
native-builds/linux/
132+
retention-days: 30
133+
134+
build-native-windows:
135+
runs-on: windows-latest
136+
needs: build-web
137+
steps:
138+
- name: Checkout code
139+
uses: actions/checkout@v4
140+
141+
- name: Setup Node.js
142+
uses: actions/setup-node@v4
143+
with:
144+
node-version-file: '.nvmrc'
145+
cache: 'yarn'
146+
147+
- name: Install dependencies
148+
run: yarn install --frozen-lockfile
149+
150+
- name: Build web application
151+
run: yarn build
152+
153+
- name: Build Windows native applications
154+
run: ./scripts/build-native-windows.sh
155+
shell: bash
156+
157+
- name: Upload Windows native artifacts
158+
uses: actions/upload-artifact@v4
159+
with:
160+
name: windows-native-builds
161+
path: |
162+
native-builds/windows/
163+
retention-days: 30
164+
165+
build-native-macos:
166+
runs-on: macos-latest
167+
needs: build-web
168+
steps:
169+
- name: Checkout code
170+
uses: actions/checkout@v4
171+
172+
- name: Setup Node.js
173+
uses: actions/setup-node@v4
174+
with:
175+
node-version-file: '.nvmrc'
176+
cache: 'yarn'
177+
178+
- name: Install dependencies
179+
run: yarn install --frozen-lockfile
180+
181+
- name: Build web application
182+
run: yarn build
183+
184+
- name: Build macOS native applications
185+
run: ./scripts/build-native-macos.sh
186+
187+
- name: Upload macOS native artifacts
188+
uses: actions/upload-artifact@v4
189+
with:
190+
name: macos-native-builds
191+
path: |
192+
native-builds/macos/
193+
retention-days: 30
194+
195+
build-all-platforms:
196+
runs-on: ubuntu-latest
197+
if: github.event_name == 'release'
198+
steps:
199+
- name: Checkout code
200+
uses: actions/checkout@v4
201+
202+
- name: Setup Node.js
203+
uses: actions/setup-node@v4
204+
with:
205+
node-version-file: '.nvmrc'
206+
cache: 'yarn'
207+
208+
- name: Setup Java
209+
uses: actions/setup-java@v4
210+
with:
211+
distribution: 'temurin'
212+
java-version: '17'
213+
214+
- name: Install dependencies
215+
run: yarn install --frozen-lockfile
216+
217+
- name: Build all platforms
218+
run: ./scripts/build-all-platforms.sh
219+
220+
- name: Upload complete build artifacts
221+
uses: actions/upload-artifact@v4
222+
with:
223+
name: complete-build-${{ github.sha }}
224+
path: |
225+
artifacts_*/
226+
svmseek-wallet-*.tar.gz
227+
retention-days: 90
228+
229+
- name: Upload to release
230+
if: github.event_name == 'release'
231+
uses: actions/upload-release-asset@v1
232+
env:
233+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
234+
with:
235+
upload_url: ${{ github.event.release.upload_url }}
236+
asset_path: ./svmseek-wallet-*.tar.gz
237+
asset_name: svmseek-wallet-all-platforms.tar.gz
238+
asset_content_type: application/gzip
239+
240+
test:
241+
runs-on: ubuntu-latest
242+
steps:
243+
- name: Checkout code
244+
uses: actions/checkout@v4
245+
246+
- name: Setup Node.js
247+
uses: actions/setup-node@v4
248+
with:
249+
node-version-file: '.nvmrc'
250+
cache: 'yarn'
251+
252+
- name: Install dependencies
253+
run: yarn install --frozen-lockfile
254+
255+
- name: Run tests
256+
run: yarn test --watchAll=false --coverage
257+
258+
- name: Install Playwright
259+
run: yarn playwright:install
260+
261+
- name: Run E2E tests
262+
run: yarn test:e2e
263+
264+
- name: Upload test results
265+
uses: actions/upload-artifact@v4
266+
if: always()
267+
with:
268+
name: test-results
269+
path: |
270+
coverage/
271+
playwright-report/
272+
retention-days: 7

0 commit comments

Comments
 (0)