Skip to content

Commit f8ed61f

Browse files
committed
feat: workflow for debugging
1 parent 97a01b1 commit f8ed61f

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

.github/workflows/debug_build.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Debugging Binaries
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
CARGO_TERM_COLOR: always
8+
RUST_BACKTRACE: "full"
9+
10+
jobs:
11+
ci:
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
matrix:
16+
os: [windows-2022, macos-13, ubuntu-22.04]
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
- name: Cache
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.cargo
29+
target
30+
key: ${{ matrix.os }}
31+
32+
- name: Install dependencies
33+
run: |
34+
if [ "$RUNNER_OS" == "Linux" ]; then
35+
sudo apt update
36+
sudo apt install -y libgtk-3-dev mingw-w64
37+
elif [ "$RUNNER_OS" == "macOS" ]; then
38+
cargo install cargo-bundle
39+
rustup target install aarch64-apple-darwin
40+
rustup target install x86_64-apple-darwin
41+
fi
42+
shell: bash
43+
44+
45+
- name: Build
46+
run: |
47+
if [ "$RUNNER_OS" == "macOS" ]; then
48+
cargo bundle --target x86_64-apple-darwin
49+
cargo bundle --target aarch64-apple-darwin
50+
mv target/x86_64-apple-darwin/debug/bundle/osx/Gupaxx.app Gupaxx-debug-macos-x64.app
51+
mv target/aarch64-apple-darwin/debug/bundle/osx/Gupaxx.app Gupaxx-debug-macos-arm64.app
52+
tar -cf macos.tar Gupaxx-debug-macos-arm64.app Gupaxx-debug-macos-x64.app
53+
elif [ "$RUNNER_OS" == "Linux" ]; then
54+
cargo build --target x86_64-unknown-linux-gnu
55+
mv target/x86_64-unknown-linux-gnu/debug/gupaxx gupaxx-debug
56+
tar -cf linux.tar gupaxx-debug
57+
elif [ "$RUNNER_OS" == "Windows" ]; then
58+
# For very old cpu
59+
cargo build
60+
mv target/debug/gupaxx.exe gupaxx-debug.exe
61+
tar -cf windows_old_cpu.tar gupaxx-debug.exe
62+
# For normal cpu
63+
cargo build --features=wgpu
64+
mv target/debug/gupaxx.exe gupaxx-debug.exe
65+
tar -cf windows.tar gupaxx-debug.exe
66+
fi
67+
shell: bash
68+
69+
- name: Archive (Windows)
70+
if: ${{ runner.os == 'Windows' }}
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: windows
74+
path: windows.tar
75+
76+
- name: Archive (Windows) Old CPU
77+
if: ${{ runner.os == 'Windows' }}
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: windows_old_cpu
81+
path: windows_old_cpu.tar
82+
83+
- name: Archive
84+
if: ${{ runner.os == 'macOS' }}
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: macos
88+
path: macos.tar
89+
90+
- name: Archive (Linux)
91+
if: ${{ runner.os == 'Linux' }}
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: linux
95+
path: linux.tar

0 commit comments

Comments
 (0)