File tree Expand file tree Collapse file tree 7 files changed +76
-10
lines changed
actions/install-dependencies Expand file tree Collapse file tree 7 files changed +76
-10
lines changed Original file line number Diff line number Diff line change 1
1
name : ' Install Dependencies'
2
2
description : ' Install qt environment and compile dependencies'
3
3
inputs :
4
- os_name :
5
- description : ' os name'
6
- required : true
7
- type : string
8
4
qt_modules :
9
5
description : ' qt modules'
10
6
required : false
Original file line number Diff line number Diff line change 42
42
fetch-depth : 1
43
43
44
44
- uses : ./.github/actions/install-dependencies
45
- with :
46
- os_name : ${{ matrix.os }}
47
45
48
46
- name : Configure and build windows
49
47
if : startsWith(matrix.os, 'windows')
Original file line number Diff line number Diff line change
1
+ name : CodeQL
2
+
3
+ on :
4
+ push :
5
+ paths-ignore :
6
+ - ' **/picture/**'
7
+ - ' packaging/**'
8
+ - ' .clang-*'
9
+ - ' .gitignore'
10
+ - ' LICENSE'
11
+ - ' *.pro'
12
+ - ' README*'
13
+ pull_request :
14
+ paths-ignore :
15
+ - ' **/picture/**'
16
+ - ' packaging/**'
17
+ - ' .clang-*'
18
+ - ' .gitignore'
19
+ - ' LICENSE'
20
+ - ' *.pro'
21
+ - ' README*'
22
+
23
+ schedule :
24
+ - cron : ' 0 0 1 * *'
25
+ workflow_dispatch :
26
+
27
+
28
+ jobs :
29
+ CodeQL :
30
+ runs-on : ubuntu-latest
31
+
32
+ steps :
33
+ - uses : actions/checkout@v4
34
+ with :
35
+ fetch-depth : 1
36
+
37
+ - uses : ./.github/actions/install-dependencies
38
+
39
+ - name : Initialize CodeQL
40
+ uses : github/codeql-action/init@v3
41
+ with :
42
+ languages : cpp
43
+
44
+ - name : Autobuild
45
+ uses : github/codeql-action/autobuild@v3
46
+
47
+ - name : Perform CodeQL Analysis
48
+ uses : github/codeql-action/analyze@v3
49
+
Original file line number Diff line number Diff line change 40
40
fetch-depth : 1
41
41
42
42
- uses : ./.github/actions/install-dependencies
43
- with :
44
- os_name : ${{ matrix.os }}
45
43
46
44
- uses : RealChuan/install-jom@main
47
45
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -ex
2
+
3
+ VENV_NAME=" venv" # 定义虚拟环境目录名
4
+
5
+ # 检查虚拟环境是否存在
6
+ if [ ! -d " $VENV_NAME " ]; then
7
+ echo " 创建虚拟环境 '$VENV_NAME '..."
8
+ python3 -m venv " $VENV_NAME " || {
9
+ echo " 创建失败"
10
+ exit 1
11
+ }
12
+ else
13
+ echo " 检测到虚拟环境 '$VENV_NAME ' 已存在"
14
+ fi
15
+
16
+ # 自动激活虚拟环境(需通过 source 执行脚本)
17
+ echo " 激活虚拟环境..."
18
+ source " $VENV_NAME /bin/activate"
19
+
20
+ # 提示用户后续操作
21
+ echo " 虚拟环境已激活,当前 Python 路径: $( which python) "
22
+
23
+ cd " $( dirname " $0 " ) "
24
+ pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env python3
2
1
# -*- coding: utf-8 -*-
3
2
4
3
import os
Original file line number Diff line number Diff line change @@ -92,5 +92,7 @@ cp -f -v ${project_root}/packaging/macos/dmg.json ${release_dir}/dmg.json
92
92
appdmg ${release_dir} /dmg.json ${out_dmg_path}
93
93
notarize_app " ${out_dmg_path} "
94
94
95
+ source ${project_root} /packaging/activate_venv.sh
95
96
cd " $( dirname " $0 " ) "
96
- ./package.py
97
+ python ./package.py
98
+ deactivate
You can’t perform that action at this time.
0 commit comments