1
1
name : Tests
2
- on : push
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+
9
+ concurrency :
10
+ group : ${{ github.head_ref || github.run_id }}
11
+ cancel-in-progress : true
12
+
3
13
jobs :
4
- tests :
5
- runs-on : ${{ matrix.os }}
14
+ tests-linux :
15
+ runs-on : ubuntu-latest
6
16
strategy :
7
17
fail-fast : false
8
18
matrix :
9
- os : [macos-latest, ubuntu-latest, windows-latest ]
10
- python-version : ["3.7", "3.8", "3.9", "3.10"]
11
- name : Tests on ${{ matrix.os }} with Python ${{ matrix.python-version }}
19
+ python-version : ["3.7", "3.8", "3.9", "3.10", "3.11" ]
20
+
21
+ name : Tests with Python ${{ matrix.python-version }} on Linux
12
22
steps :
13
23
- uses : actions/checkout@v2
14
24
with :
15
25
path : main
16
26
17
- - uses : actions/setup-python@v2
27
+ - uses : actions/setup-python@v4
18
28
with :
19
- python-version : ${{ matrix.python-version }}
20
- architecture : x64
29
+ python-version : ${{ matrix.python-version }}-dev
21
30
22
31
- name : Checkout Austin development branch
23
32
uses : actions/checkout@master
@@ -26,51 +35,106 @@ jobs:
26
35
ref : devel
27
36
path : austin
28
37
29
- - name : Compile Austin on Linux
38
+ - name : Compile Austin
30
39
run : |
31
40
cd $GITHUB_WORKSPACE/austin
32
41
gcc -Wall -O3 -Os -s -pthread src/*.c -o src/austin
33
- if : startsWith(matrix.os, 'ubuntu')
34
42
35
- - name : Compile Austin on Windows
43
+ - name : Install dependencies
36
44
run : |
37
- cd $env:GITHUB_WORKSPACE/austin
38
- gcc.exe -O3 -o src/austin.exe src/*.c -lpsapi -lntdll -Wall -Os -s
39
- if : startsWith(matrix.os, 'windows')
45
+ sudo apt-get update -y
46
+ sudo apt-get install -y binutils binutils-common
47
+ addr2line -V
48
+
49
+ - name : Run tests
50
+ run : |
51
+ cd $GITHUB_WORKSPACE/main
52
+ export PATH="$GITHUB_WORKSPACE/austin/src:$PATH"
53
+ pip install hatch
54
+ hatch -e "tests.py${{ matrix.python-version }}" run tests
55
+
56
+ - name : Publish coverage metrics
57
+ run : |
58
+ cd $GITHUB_WORKSPACE/main
59
+ hatch -e coverage run cov
60
+ hatch -e coverage run codecov
61
+ if : matrix.python-version == '3.10'
62
+ env :
63
+ CODECOV_TOKEN : ${{secrets.CODECOV_TOKEN}}
64
+
65
+ tests-macos :
66
+ runs-on : macos-latest
67
+ strategy :
68
+ fail-fast : false
69
+ matrix :
70
+ python-version : ["3.7", "3.8", "3.9", "3.10", "3.11"]
71
+
72
+ name : Tests with Python ${{ matrix.python-version }} on MacOS
73
+ steps :
74
+ - uses : actions/checkout@v2
75
+ with :
76
+ path : main
77
+
78
+ - uses : actions/setup-python@v4
79
+ with :
80
+ python-version : ${{ matrix.python-version }}-dev
81
+
82
+ - name : Checkout Austin development branch
83
+ uses : actions/checkout@master
84
+ with :
85
+ repository : P403n1x87/austin
86
+ ref : devel
87
+ path : austin
40
88
41
- - name : Compile Austin on macOS
89
+ - name : Compile Austin
42
90
run : |
43
91
cd $GITHUB_WORKSPACE/austin
44
92
gcc -Wall -O3 -Os src/*.c -o src/austin
45
- if : startsWith(matrix.os, 'macos')
46
93
47
- - run : pip install nox poetry
94
+ - name : Remove signature from the Python binary
95
+ run : |
96
+ codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/bin/python3 || true
97
+ codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/Resources/Python.app/Contents/MacOS/Python || true
48
98
49
- - name : Run nox on Linux
99
+ - name : Run tests
50
100
run : |
51
101
cd $GITHUB_WORKSPACE/main
52
102
export PATH="$GITHUB_WORKSPACE/austin/src:$PATH"
53
- nox
54
- if : " startsWith(matrix.os, 'ubuntu')"
103
+ pip install hatch
104
+ sudo hatch -e "tests.py${{ matrix.python-version }}" run tests
105
+
106
+ tests-win :
107
+ runs-on : windows-latest
108
+ strategy :
109
+ fail-fast : false
110
+ matrix :
111
+ python-version : ["3.7", "3.8", "3.9", "3.10", "3.11"]
112
+
113
+ name : Tests with Python ${{ matrix.python-version }} on Windows
114
+ steps :
115
+ - uses : actions/checkout@v2
116
+ with :
117
+ path : main
55
118
56
- - name : Run nox on macOS
119
+ - uses : actions/setup-python@v4
120
+ with :
121
+ python-version : ${{ matrix.python-version }}-dev
122
+
123
+ - name : Checkout Austin development branch
124
+ uses : actions/checkout@master
125
+ with :
126
+ repository : P403n1x87/austin
127
+ ref : devel
128
+ path : austin
129
+
130
+ - name : Compile Austin on Windows
57
131
run : |
58
- cd $GITHUB_WORKSPACE/main
59
- export PATH="$GITHUB_WORKSPACE/austin/src:$PATH"
60
- sudo nox
61
- if : startsWith(matrix.os, 'macos')
132
+ cd $env:GITHUB_WORKSPACE/austin
133
+ gcc.exe -O3 -o src/austin.exe src/*.c -lpsapi -lntdll -Wall -Os -s
62
134
63
- - name : Run nox on Windows
135
+ - name : Run tests on Windows
64
136
run : |
65
137
cd $env:GITHUB_WORKSPACE/main
66
- $env:PATH="$env:GITHUB_WORKSPACE/austin/src;$env:PATH"
67
- nox
68
- if : " startsWith(matrix.os, 'windows')"
69
-
70
- # - name: Publish coverage metrics
71
- # run: |
72
- # cd $GITHUB_WORKSPACE/main
73
- # nox -rs coverage
74
- # if: startsWith(matrix.os, 'ubuntu')
75
- # env:
76
- # CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
138
+ $env:PATH="$env:GITHUB_WORKSPACE\austin\src;$env:PATH"
139
+ pip install hatch
140
+ hatch -e "tests.py${{ matrix.python-version }}" run tests
0 commit comments