File tree 4 files changed +126
-7
lines changed
sketches/TestCompileFlags
4 files changed +126
-7
lines changed Original file line number Diff line number Diff line change 4
4
pull_request :
5
5
paths :
6
6
- ' .github/workflows/test-integration.yml'
7
- - ' .github/workflows/testdata'
7
+ - ' .github/workflows/testdata/** '
8
8
- ' action.yml'
9
9
- ' action-setup.sh'
10
10
- ' compilesketches/**'
11
11
12
12
push :
13
13
paths :
14
14
- ' .github/workflows/test-integration.yml'
15
- - ' .github/workflows/testdata'
15
+ - ' .github/workflows/testdata/** '
16
16
- ' action.yml'
17
17
- ' action-setup.sh'
18
18
- ' compilesketches/**'
@@ -78,18 +78,27 @@ jobs:
78
78
# Use action from local path
79
79
uses : ./
80
80
with :
81
- cli-version : 0.13.0
81
+ cli-version : 0.15.1
82
82
platforms : ${{ matrix.board.platforms }}
83
83
fqbn : ${{ matrix.board.fqbn }}
84
84
libraries : ${{ matrix.board.libraries }}
85
85
sketch-paths : |
86
86
- ${{ env.TESTDATA_SKETCHES_PATH }}/BareMinimum
87
87
- ${{ env.TESTDATA_SKETCHES_PATH }}/ServoLibrary
88
+ - ${{ env.TESTDATA_SKETCHES_PATH }}/TestCompileFlags
89
+ cli-compile-flags : |
90
+ - --build-property
91
+ - compiler.cpp.extra_flags="-DSTRING_MACRO="hello world"" -DINT_MACRO=2 -DFLAG_MACRO
92
+ - --export-binaries
88
93
enable-deltas-report : true
89
94
enable-warnings-report : true
90
95
sketches-report-path : ${{ env.SKETCHES_REPORTS_PATH }}
91
96
verbose : true
92
97
98
+ - name : Verify --export-binaries flag was used by compilation command
99
+ run : |
100
+ [ -d ${{ env.TESTDATA_SKETCHES_PATH }}/BareMinimum/build ]
101
+
93
102
- name : Set report artifact name
94
103
id : report-artifact-name
95
104
run : |
Original file line number Diff line number Diff line change 1
1
{
2
- "commit_hash" : " d4343a2e7d8123726f2c53d2ac186df41b59e946 " ,
3
- "commit_url" : " https://github.com/arduino/compile-sketches/commit/d4343a2e7d8123726f2c53d2ac186df41b59e946 " ,
2
+ "commit_hash" : " d2ed774ec1f37e6e497b6d629963cbc79632e9f9 " ,
3
+ "commit_url" : " https://github.com/arduino/compile-sketches/commit/d2ed774ec1f37e6e497b6d629963cbc79632e9f9 " ,
4
4
"boards" : [
5
5
{
6
6
"board" : " arduino:avr:uno" ,
102
102
"absolute" : 0
103
103
}
104
104
}
105
+ },
106
+ {
107
+ "name" : " .github/workflows/testdata/sketches/TestCompileFlags" ,
108
+ "compilation_success" : true ,
109
+ "sizes" : [
110
+ {
111
+ "name" : " flash" ,
112
+ "maximum" : 32256 ,
113
+ "current" : {
114
+ "absolute" : 444 ,
115
+ "relative" : 1.38
116
+ },
117
+ "previous" : {
118
+ "absolute" : 444 ,
119
+ "relative" : 1.38
120
+ },
121
+ "delta" : {
122
+ "absolute" : 0 ,
123
+ "relative" : 0.0
124
+ }
125
+ },
126
+ {
127
+ "name" : " RAM for global variables" ,
128
+ "maximum" : 2048 ,
129
+ "current" : {
130
+ "absolute" : 9 ,
131
+ "relative" : 0.44
132
+ },
133
+ "previous" : {
134
+ "absolute" : 9 ,
135
+ "relative" : 0.44
136
+ },
137
+ "delta" : {
138
+ "absolute" : 0 ,
139
+ "relative" : 0.0
140
+ }
141
+ }
142
+ ],
143
+ "warnings" : {
144
+ "current" : {
145
+ "absolute" : 1
146
+ },
147
+ "previous" : {
148
+ "absolute" : 1
149
+ },
150
+ "delta" : {
151
+ "absolute" : 0
152
+ }
153
+ }
105
154
}
106
155
],
107
156
"sizes" : [
Original file line number Diff line number Diff line change 1
1
{
2
- "commit_hash" : " d4343a2e7d8123726f2c53d2ac186df41b59e946 " ,
3
- "commit_url" : " https://github.com/arduino/compile-sketches/commit/d4343a2e7d8123726f2c53d2ac186df41b59e946 " ,
2
+ "commit_hash" : " d2ed774ec1f37e6e497b6d629963cbc79632e9f9 " ,
3
+ "commit_url" : " https://github.com/arduino/compile-sketches/commit/d2ed774ec1f37e6e497b6d629963cbc79632e9f9 " ,
4
4
"boards" : [
5
5
{
6
6
"board" : " esp8266:esp8266:huzzah" ,
102
102
"absolute" : 0
103
103
}
104
104
}
105
+ },
106
+ {
107
+ "name" : " .github/workflows/testdata/sketches/TestCompileFlags" ,
108
+ "compilation_success" : true ,
109
+ "sizes" : [
110
+ {
111
+ "name" : " flash" ,
112
+ "maximum" : 1044464 ,
113
+ "current" : {
114
+ "absolute" : 256684 ,
115
+ "relative" : 24.58
116
+ },
117
+ "previous" : {
118
+ "absolute" : 256684 ,
119
+ "relative" : 24.58
120
+ },
121
+ "delta" : {
122
+ "absolute" : 0 ,
123
+ "relative" : 0.0
124
+ }
125
+ },
126
+ {
127
+ "name" : " RAM for global variables" ,
128
+ "maximum" : 81920 ,
129
+ "current" : {
130
+ "absolute" : 26776 ,
131
+ "relative" : 32.69
132
+ },
133
+ "previous" : {
134
+ "absolute" : 26776 ,
135
+ "relative" : 32.69
136
+ },
137
+ "delta" : {
138
+ "absolute" : 0 ,
139
+ "relative" : 0.0
140
+ }
141
+ }
142
+ ],
143
+ "warnings" : {
144
+ "current" : {
145
+ "absolute" : 1
146
+ },
147
+ "previous" : {
148
+ "absolute" : 1
149
+ },
150
+ "delta" : {
151
+ "absolute" : 0
152
+ }
153
+ }
105
154
}
106
155
],
107
156
"sizes" : [
Original file line number Diff line number Diff line change
1
+ #if INT_MACRO != 2
2
+ #error
3
+ #endif
4
+
5
+ #ifndef FLAG_MACRO
6
+ #error
7
+ #endif
8
+
9
+ void setup () {
10
+ char string[]=STRING_MACRO; // Will fail if the macro is not a string literal
11
+ }
12
+ void loop (){}
You can’t perform that action at this time.
0 commit comments