29
29
# Ubuntu steps
30
30
#
31
31
- name : ' Set reusable strings (Ubuntu)'
32
- id : strings
32
+ id : strings-linux
33
33
if : runner.os == 'Linux'
34
34
shell : bash
35
35
run : |
@@ -46,14 +46,14 @@ jobs:
46
46
- name : ' Build project (Ubuntu)'
47
47
if : runner.os == 'Linux'
48
48
run : |
49
- dpkg-buildpackage -us -uc -j${{ steps.strings.outputs.cpu-count }}
49
+ dpkg-buildpackage -us -uc -j${{ steps.strings-linux .outputs.cpu-count }}
50
50
51
51
#
52
52
# Window steps
53
53
#
54
54
- name : ' Set reusable strings (Windows)'
55
- id : strings
56
55
if : runner.os == 'Windows'
56
+ id : strings-windows
57
57
shell : bash
58
58
run : |
59
59
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
@@ -92,69 +92,69 @@ jobs:
92
92
- name : ' Configure project (Windows)'
93
93
if : runner.os == 'Windows'
94
94
run : |
95
- ${{ steps.strings.outputs.cmake-dir }}/bin/cmake `
95
+ ${{ steps.strings-windows .outputs.cmake-dir }}/bin/cmake `
96
96
-S ${{ github.workspace }} `
97
- -B ${{ steps.strings.outputs.build-dir }} `
97
+ -B ${{ steps.strings-windows .outputs.build-dir }} `
98
98
-G Ninja `
99
99
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
100
- -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.qt-dir }} `
101
- -DCMAKE_C_COMPILER=${{ steps.strings.outputs.mingw-dir }}/bin/gcc.exe `
102
- -DCMAKE_CXX_COMPILER=${{ steps.strings.outputs.mingw-dir }}/bin/g++.exe `
103
- -DCMAKE_MAKE_PROGRAM=${{ steps.strings.outputs.ninja-dir }}/ninja.exe `
104
- -DBUILD_PROJECT_VERSION="${{ steps.strings.outputs.build-version }}"
100
+ -DCMAKE_PREFIX_PATH=${{ steps.strings-windows .outputs.qt-dir }} `
101
+ -DCMAKE_C_COMPILER=${{ steps.strings-windows .outputs.mingw-dir }}/bin/gcc.exe `
102
+ -DCMAKE_CXX_COMPILER=${{ steps.strings-windows .outputs.mingw-dir }}/bin/g++.exe `
103
+ -DCMAKE_MAKE_PROGRAM=${{ steps.strings-windows .outputs.ninja-dir }}/ninja.exe `
104
+ -DBUILD_PROJECT_VERSION="${{ steps.strings-windows .outputs.build-version }}"
105
105
106
106
- name : ' Build project (Windows)'
107
107
if : runner.os == 'Windows'
108
108
run : |
109
- ${{ steps.strings.outputs.cmake-dir }}/bin/cmake `
110
- --build ${{ steps.strings.outputs.build-dir }} `
111
- --target nfc-lab --parallel ${{ steps.strings.outputs.cpu-count }}
109
+ ${{ steps.strings-windows .outputs.cmake-dir }}/bin/cmake `
110
+ --build ${{ steps.strings-windows .outputs.build-dir }} `
111
+ --target nfc-lab --parallel ${{ steps.strings-windows .outputs.cpu-count }}
112
112
113
113
- name : ' Create installer (Windows)'
114
114
if : runner.os == 'Windows'
115
115
run : |
116
116
# create installer folders
117
- New-Item -Force -ItemType "directory" -Path ${{ steps.strings.outputs.package-data-dir }}
118
- New-Item -Force -ItemType "directory" -Path ${{ steps.strings.outputs.package-meta-dir }}
117
+ New-Item -Force -ItemType "directory" -Path ${{ steps.strings-windows .outputs.package-data-dir }}
118
+ New-Item -Force -ItemType "directory" -Path ${{ steps.strings-windows .outputs.package-meta-dir }}
119
119
120
120
# copy executable and libraries
121
- Copy-Item -Force ${{ steps.strings.outputs.build-dir }}/src/nfc-app/app-qt/nfc-lab.exe ${{ steps.strings.outputs.package-data-dir }}
122
- Copy-Item -Force ${{ steps.strings.outputs.mingw-dir }}/bin/*.dll ${{ steps.strings.outputs.package-data-dir }}
123
- Copy-Item -Force ${{ github.workspace }}/dll/airspy/x86_64/bin/*.dll ${{ steps.strings.outputs.package-data-dir }}
124
- Copy-Item -Force ${{ github.workspace }}/dll/openssl/x86_64/bin/*.dll ${{ steps.strings.outputs.package-data-dir }}
125
- Copy-Item -Force ${{ github.workspace }}/dll/rtlsdr/x86_64/bin/*.dll ${{ steps.strings.outputs.package-data-dir }}
126
- Copy-Item -Force ${{ github.workspace }}/dll/usb/x86_64/bin/*.dll ${{ steps.strings.outputs.package-data-dir }}
121
+ Copy-Item -Force ${{ steps.strings-windows .outputs.build-dir }}/src/nfc-app/app-qt/nfc-lab.exe ${{ steps.strings-windows .outputs.package-data-dir }}
122
+ Copy-Item -Force ${{ steps.strings-windows .outputs.mingw-dir }}/bin/*.dll ${{ steps.strings-windows .outputs.package-data-dir }}
123
+ Copy-Item -Force ${{ github.workspace }}/dll/airspy/x86_64/bin/*.dll ${{ steps.strings-windows .outputs.package-data-dir }}
124
+ Copy-Item -Force ${{ github.workspace }}/dll/openssl/x86_64/bin/*.dll ${{ steps.strings-windows .outputs.package-data-dir }}
125
+ Copy-Item -Force ${{ github.workspace }}/dll/rtlsdr/x86_64/bin/*.dll ${{ steps.strings-windows .outputs.package-data-dir }}
126
+ Copy-Item -Force ${{ github.workspace }}/dll/usb/x86_64/bin/*.dll ${{ steps.strings-windows .outputs.package-data-dir }}
127
127
128
128
# copy drivers and firmware
129
- Copy-Item -Force -Recurse ${{ github.workspace }}/dat/config ${{ steps.strings.outputs.package-data-dir }}
130
- Copy-Item -Force -Recurse ${{ github.workspace }}/dat/drivers ${{ steps.strings.outputs.package-data-dir }}
131
- Copy-Item -Force -Recurse ${{ github.workspace }}/dat/firmware ${{ steps.strings.outputs.package-data-dir }}
129
+ Copy-Item -Force -Recurse ${{ github.workspace }}/dat/config ${{ steps.strings-windows .outputs.package-data-dir }}
130
+ Copy-Item -Force -Recurse ${{ github.workspace }}/dat/drivers ${{ steps.strings-windows .outputs.package-data-dir }}
131
+ Copy-Item -Force -Recurse ${{ github.workspace }}/dat/firmware ${{ steps.strings-windows .outputs.package-data-dir }}
132
132
133
133
# copy installer resources
134
- Copy-Item -Force ${{ steps.strings.outputs.build-dir }}/installer/config/*.* ${{ steps.strings.outputs.package-meta-dir }}
134
+ Copy-Item -Force ${{ steps.strings-windows .outputs.build-dir }}/installer/config/*.* ${{ steps.strings-windows .outputs.package-meta-dir }}
135
135
136
136
# create deployment
137
- ${{ steps.strings.outputs.qt-dir }}/bin/windeployqt `
137
+ ${{ steps.strings-windows .outputs.qt-dir }}/bin/windeployqt `
138
138
--verbose 1 `
139
139
--compiler-runtime `
140
140
--no-translations `
141
141
--no-system-d3d-compiler `
142
142
--no-opengl-sw `
143
- ${{ steps.strings.outputs.package-data-dir }}/nfc-lab.exe
143
+ ${{ steps.strings-windows .outputs.package-data-dir }}/nfc-lab.exe
144
144
145
145
# create installer
146
- ${{ steps.strings.outputs.installer-dir }}/bin/binarycreator `
146
+ ${{ steps.strings-windows .outputs.installer-dir }}/bin/binarycreator `
147
147
--verbose `
148
- -c ${{ steps.strings.outputs.build-dir }}/installer/config/config.xml `
149
- -p ${{ steps.strings.outputs.package-dir }} `
150
- ${{ steps.strings.outputs.build-dir }}/nfc-lab-${{ steps.strings.outputs.build-name }}-installer-x86_64.exe
148
+ -c ${{ steps.strings-windows .outputs.build-dir }}/installer/config/config.xml `
149
+ -p ${{ steps.strings-windows .outputs.package-dir }} `
150
+ ${{ steps.strings-windows .outputs.build-dir }}/nfc-lab-${{ steps.strings-windows .outputs.build-name }}-installer-x86_64.exe
151
151
152
152
- name : ' Upload artifact (Windows)'
153
153
if : runner.os == 'Windows'
154
154
uses : actions/upload-artifact@v4
155
155
with :
156
- name : nfc-lab-${{ steps.strings.outputs.build-name }}-installer-x86_64.exe
157
- path : ${{ steps.strings.outputs.build-dir }}/nfc-lab-${{ steps.strings.outputs.build-name }}-installer-x86_64.exe
156
+ name : nfc-lab-${{ steps.strings-windows .outputs.build-name }}-installer-x86_64.exe
157
+ path : ${{ steps.strings-windows .outputs.build-dir }}/nfc-lab-${{ steps.strings-windows .outputs.build-name }}-installer-x86_64.exe
158
158
159
159
#
160
160
# Final steps
@@ -178,8 +178,8 @@ jobs:
178
178
uses : actions/upload-release-asset@v1
179
179
with :
180
180
upload_url : ${{ steps.create-release.outputs.upload_url }}
181
- asset_name : nfc-lab-${{ steps.strings.outputs.build-name }}-installer-x86_64.exe
182
- asset_path : ${{ steps.strings.outputs.build-dir }}/nfc-lab-${{ steps.strings.outputs.build-name }}-installer-x86_64.exe
181
+ asset_name : nfc-lab-${{ steps.strings-windows .outputs.build-name }}-installer-x86_64.exe
182
+ asset_path : ${{ steps.strings-windows .outputs.build-dir }}/nfc-lab-${{ steps.strings-windows .outputs.build-name }}-installer-x86_64.exe
183
183
asset_content_type : application/octet-stream
184
184
env :
185
185
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments