Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.

Commit b6e4191

Browse files
committed
Add cross-platform CI workflow for Windows, Linux, and macOS
- Extend GitHub Actions workflow to build for multiple operating systems - Configure separate jobs for Windows, Linux, and macOS builds - Add Qt installation and CMake build steps for each platform - Create macOS app bundle and DMG for macOS artifact - Update workflow name to reflect multi-platform support
1 parent a752f23 commit b6e4191

File tree

1 file changed

+114
-2
lines changed

1 file changed

+114
-2
lines changed

.github/workflows/build-windows.yml

Lines changed: 114 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Windows
1+
name: Build for Windows, Linux and macOS
22

33
on:
44
push:
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
build:
11+
build-windows:
1212
runs-on: windows-latest
1313

1414
steps:
@@ -43,3 +43,115 @@ jobs:
4343
with:
4444
name: psio-assist-windows
4545
path: build/Release/*.exe
46+
47+
build-linux:
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Install dependencies
54+
run: |
55+
sudo apt-get update
56+
sudo apt-get install -y build-essential cmake libgl1-mesa-dev
57+
58+
- name: Install Qt
59+
uses: jurplel/install-qt-action@v3
60+
with:
61+
version: '6.5.3'
62+
host: 'linux'
63+
target: 'desktop'
64+
arch: 'gcc_64'
65+
cache: true
66+
67+
- name: Create Build Directory
68+
run: mkdir -p build
69+
70+
- name: Configure and Build
71+
run: |
72+
cd build
73+
cmake ..
74+
cmake --build . -j$(nproc)
75+
76+
- name: Upload Artifact
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: psio-assist-linux
80+
path: build/psio-assist
81+
82+
build-macos:
83+
runs-on: macos-latest
84+
85+
steps:
86+
- uses: actions/checkout@v4
87+
88+
- name: Install Qt
89+
uses: jurplel/install-qt-action@v3
90+
with:
91+
version: '6.5.3'
92+
host: 'mac'
93+
target: 'desktop'
94+
arch: 'clang_64'
95+
cache: true
96+
97+
- name: Create Build Directory
98+
run: mkdir -p build
99+
100+
- name: Configure and Build
101+
run: |
102+
cd build
103+
cmake ..
104+
cmake --build . -j$(sysctl -n hw.ncpu)
105+
106+
- name: Create App Bundle
107+
working-directory: ./build
108+
run: |
109+
# Criar diretório para o app bundle se não existir
110+
mkdir -p psio-assist.app/Contents/MacOS
111+
mkdir -p psio-assist.app/Contents/Resources
112+
113+
# Copiar o executável
114+
cp psio-assist psio-assist.app/Contents/MacOS/
115+
116+
# Criar arquivo Info.plist básico
117+
cat > psio-assist.app/Contents/Info.plist << EOF
118+
<?xml version="1.0" encoding="UTF-8"?>
119+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
120+
<plist version="1.0">
121+
<dict>
122+
<key>CFBundleExecutable</key>
123+
<string>psio-assist</string>
124+
<key>CFBundleIconFile</key>
125+
<string>icon.icns</string>
126+
<key>CFBundleIdentifier</key>
127+
<string>com.yourcompany.psio-assist</string>
128+
<key>CFBundleInfoDictionaryVersion</key>
129+
<string>6.0</string>
130+
<key>CFBundleName</key>
131+
<string>PSIO Assist</string>
132+
<key>CFBundlePackageType</key>
133+
<string>APPL</string>
134+
<key>CFBundleShortVersionString</key>
135+
<string>1.0</string>
136+
<key>CFBundleVersion</key>
137+
<string>1</string>
138+
<key>NSHighResolutionCapable</key>
139+
<true/>
140+
</dict>
141+
</plist>
142+
EOF
143+
144+
# Criar um arquivo DMG
145+
hdiutil create -volname "PSIO Assist" -srcfolder psio-assist.app -ov -format UDZO psio-assist.dmg
146+
147+
- name: Upload App Bundle
148+
uses: actions/upload-artifact@v4
149+
with:
150+
name: psio-assist-macos-app
151+
path: build/psio-assist.app
152+
153+
- name: Upload DMG
154+
uses: actions/upload-artifact@v4
155+
with:
156+
name: psio-assist-macos-dmg
157+
path: build/psio-assist.dmg

0 commit comments

Comments
 (0)