@@ -16,10 +16,14 @@ jobs:
1616 fail-fast : false
1717 matrix :
1818 include :
19- - label : macos-universal
20- os : macos-latest
21- rust-targets : x86_64-apple-darwin,aarch64-apple-darwin
22- args : --target universal-apple-darwin
19+ - label : macos-x86_64
20+ os : macos-13
21+ rust-targets : x86_64-apple-darwin
22+ args : --target x86_64-apple-darwin
23+ - label : macos-arm64
24+ os : macos-14
25+ rust-targets : aarch64-apple-darwin
26+ args : --target aarch64-apple-darwin
2327 - label : windows-x86_64
2428 os : windows-latest
2529 rust-targets : x86_64-pc-windows-msvc
3943 if : runner.os == 'Linux'
4044 run : |
4145 sudo apt-get update
42- sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf libssl-dev
46+ sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf libssl-dev curl file p7zip-full
47+ - name : Install Windows verification tools
48+ if : runner.os == 'Windows'
49+ shell : pwsh
50+ run : choco install 7zip -y --no-progress
4351 - uses : actions/setup-node@v4
4452 with :
4553 node-version : 22
@@ -48,21 +56,81 @@ jobs:
4856 - uses : dtolnay/rust-toolchain@stable
4957 with :
5058 targets : ${{ matrix.rust-targets }}
59+ - name : Setup Erlang/Elixir for bundled backend
60+ uses : erlef/setup-beam@v1
61+ with :
62+ otp-version : ' 27'
63+ elixir-version : ' 1.18'
5164 - name : Install frontend dependencies
5265 run : npm ci
66+ - name : Build Elixir backend release
67+ shell : bash
68+ working-directory : symphony_elixir
69+ env :
70+ MIX_ENV : prod
71+ run : |
72+ set -euxo pipefail
73+ mix local.hex --force
74+ mix local.rebar --force
75+ mix deps.get --only prod
76+ mix compile
77+ mix release symphony_elixir --overwrite
78+ - name : Stage backend release for Tauri bundle
79+ shell : bash
80+ run : |
81+ set -euxo pipefail
82+ rm -rf src-tauri/resources/symphony_backend
83+ mkdir -p src-tauri/resources
84+ cp -a symphony_elixir/_build/prod/rel/symphony_elixir src-tauri/resources/symphony_backend
85+ test -d src-tauri/resources/symphony_backend/bin
86+ test -d src-tauri/resources/symphony_backend/releases
87+ if [ "${{ runner.os }}" = "Windows" ]; then
88+ test -f src-tauri/resources/symphony_backend/bin/symphony_elixir.bat
89+ else
90+ test -x src-tauri/resources/symphony_backend/bin/symphony_elixir
91+ fi
92+ - name : Smoke-test staged backend release
93+ shell : bash
94+ env :
95+ SYMPHONY_HTTP_PORT : ' 4104'
96+ SYMPHONY_HTTP_HOST : ' 127.0.0.1'
97+ SYMPHONY_HTTP_ENABLED : ' true'
98+ run : |
99+ set -euxo pipefail
100+ cd src-tauri/resources/symphony_backend
101+ if [ "${{ runner.os }}" = "Windows" ]; then
102+ ./bin/symphony_elixir.bat start
103+ else
104+ ./bin/symphony_elixir start
105+ fi
106+ for i in $(seq 1 60); do
107+ if curl -fsS http://127.0.0.1:4104/healthz; then break; fi
108+ sleep 1
109+ done
110+ curl -fsS http://127.0.0.1:4104/healthz
111+ if [ "${{ runner.os }}" = "Windows" ]; then
112+ ./bin/symphony_elixir.bat stop || true
113+ else
114+ ./bin/symphony_elixir stop || true
115+ fi
53116 - name : Regenerate macOS app icon
54117 if : runner.os == 'macOS'
55118 run : |
56119 if [ -d src-tauri/icons/icon.iconset ]; then
57120 iconutil -c icns src-tauri/icons/icon.iconset -o src-tauri/icons/icon.icns
58121 fi
59-
60122 - name : Build Tauri app
61123 uses : tauri-apps/tauri-action@v0
62124 env :
63125 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64126 with :
65127 args : ${{ matrix.args }}
128+ - name : Verify bundled backend files exist
129+ shell : bash
130+ run : |
131+ set -euxo pipefail
132+ find src-tauri/target -type f \( -name '*.dmg' -o -name '*.AppImage' -o -name '*.deb' -o -name '*.exe' -o -name '*.msi' -o -name '*.app.tar.gz' \) -print
133+ find src-tauri/resources/symphony_backend -maxdepth 3 -type f | sort | head -80
66134 - name : Upload bundle artifacts
67135 uses : actions/upload-artifact@v4
68136 with :
0 commit comments