-
Notifications
You must be signed in to change notification settings - Fork 124
168 lines (161 loc) · 4.91 KB
/
pyinstaller-build.yml
File metadata and controls
168 lines (161 loc) · 4.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Pyinstaller build
on:
workflow_call:
inputs:
version:
description: 'Release version'
required: false
type: string
default: 'master'
jobs:
build:
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- ubuntu-24.04-arm
- windows-2022
- macos-15-intel
- macos-15
fail-fast: false
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.version }}
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies (Ubuntu)
run: |
sudo apt-get update;
sudo apt-get install -y \
libfuse2 \
libegl1 \
libxkbcommon-x11-0 \
libxcb-cursor0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-shape0
if: startsWith(matrix.os, 'ubuntu')
- name: Install dependencies (macOS)
run: brew install flatcc flatbuffers
if: startsWith(matrix.os, 'macos')
- name: Run nightly build on Windows
run: |
del "C:\Program Files\Git\usr\bin\link.exe"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
bash .github\workflows\nightly-build.sh ${{ inputs.version }}
shell: cmd
if: startsWith(matrix.os, 'windows')
- name: Run nightly build on Ubuntu/MacOS
run: bash .github/workflows/nightly-build.sh
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
- name: Build AppImage
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04-arm'
run: |
./scripts/build-appimage.sh
mv angr-management*.AppImage upload/
- uses: actions/upload-artifact@v4
with:
name: angr-management-${{ matrix.os }}
path: upload/*
compression-level: 0
test_ubuntu:
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- ubuntu-24.04-arm
artifact:
- onedir
- appimage
fail-fast: false
name: Test ${{ matrix.artifact }} on ${{ matrix.os }}
needs: build
runs-on: ${{ matrix.os }}
steps:
- name: Install X11 app testing utilities
run: |
sudo apt-get update
sudo apt-get install -y xvfb x11-utils libegl1
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- run: |
set -x
. /etc/os-release
if [[ "${{ matrix.artifact }}" == "onedir" ]]; then
tar xf angr-management-*-ubuntu-$VERSION_ID-$(uname -m).tar.gz
export binary="./angr-management/angr-management"
else
export binary=$(find . -name "angr-management*-$(uname -m).AppImage")
fi
export QT_DEBUG_PLUGINS=1
chmod +x $binary
xvfb-run bash -x -c '
$binary &
sleep 30 && output=$(xwininfo -tree -root)
[[ "$output" == *"angr management"* ]] || exit 1
'
test_windows:
strategy:
matrix:
os:
- windows-2022
artifact:
- "angr-management-*-win64-x86_64-setup.exe"
- "angr-management-*-win64-x86_64.zip"
fail-fast: false
name: Test on ${{ matrix.os }} (${{ matrix.artifact }})
needs: build
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.version }}
- uses: astral-sh/setup-uv@v5
with:
python-version: 3.13
- uses: actions/download-artifact@v4
with:
name: angr-management-${{ matrix.os }}
- name: Check installation story
shell: bash
run: uv run tests/installation/check_windows_install.py ${{ matrix.artifact }}
test_macos:
strategy:
matrix:
os:
- macos-15-intel
- macos-15
fail-fast: false
name: Test on ${{ matrix.os }}
needs: build
runs-on: ${{ matrix.os }}
steps:
- uses: actions/download-artifact@v4
with:
name: angr-management-${{ matrix.os }}
- run: |
set -x
unzip -o ./angr-management-*-macOS-$(uname -m).zip
open *.app
for i in {0..7}; do
sleep 15
windows=$(osascript -e '
tell application "System Events" to get (name of every window of processes whose name contains "angr management") as string
')
if [ "$windows" != "" ]; then
exit 0
fi
done
exit 1
continue-on-error: ${{ startsWith(matrix.os, 'macos-15') }}