diff --git a/.github/workflows/cmake-tier1.yml b/.github/workflows/cmake-tier1.yml index 6be36c5..93596d8 100644 --- a/.github/workflows/cmake-tier1.yml +++ b/.github/workflows/cmake-tier1.yml @@ -6,6 +6,8 @@ on: [push] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: RelWithDebInfo + SMARTMONTOOLS_INSTALLER: smartmontools-7.2-1.win32-setup.exe + SMARTMONTOOLS_URL: https://nav.dl.sourceforge.net/project/smartmontools/smartmontools/7.2/$SMARTMONTOOLS_INSTALLER jobs: @@ -90,18 +92,33 @@ jobs: working-directory: ${{runner.workspace}}/build run: cmake --build . --config $BUILD_TYPE - - name: Install Package Requirements + - name: Download Package Requirements shell: msys2 {0} working-directory: ${{runner.workspace}}/build - run: > + run: | mkdir smartmontools - cd smartmontools + wget $SMARTMONTOOLS_URL - wget https://nav.dl.sourceforge.net/project/smartmontools/smartmontools/7.2/smartmontools-7.2-1.win32-setup.exe + - name: Extract Package Requirements (64-bit) + if: ${{ matrix.msystem == 'MINGW64' }} + shell: msys2 {0} + working-directory: ${{runner.workspace}}/build/smartmontools + run: > + 7z -bb1 e $SMARTMONTOOLS_INSTALLER + bin64/smartctl.exe + bin64/smartctl-nc.exe + bin/update-smart-drivedb.exe + bin/drivedb.h - 7z e smartmontools-7.2-1.win32-setup.exe - bin64/smartctl.exe bin64/smartctl-nc.exe + - name: Extract Package Requirements (32-bit) + if: ${{ matrix.msystem == 'MINGW32' }} + shell: msys2 {0} + working-directory: ${{runner.workspace}}/build/smartmontools + run: > + 7z -bb1 e $SMARTMONTOOLS_INSTALLER + bin/smartctl.exe + bin/smartctl-nc.exe bin/update-smart-drivedb.exe bin/drivedb.h diff --git a/packaging/cpack_options.cmake b/packaging/cpack_options.cmake index e3ca368..1edd9b5 100644 --- a/packaging/cpack_options.cmake +++ b/packaging/cpack_options.cmake @@ -182,12 +182,12 @@ if (WIN32) # Smartmontools if ("$ENV{CI}") - # GitHub download location + # GitHub extract location. The files are extracted without relative paths in archive (7z e). install(FILES - "${CMAKE_BINARY_DIR}/smartmontools/bin/drivedb.h" - "${CMAKE_BINARY_DIR}/smartmontools/bin/update-smart-drivedb.exe" - "${CMAKE_BINARY_DIR}/smartmontools/${SMARTCTL_EXTRACED_BIN_DIR}/smartctl-nc.exe" - "${CMAKE_BINARY_DIR}/smartmontools/${SMARTCTL_EXTRACED_BIN_DIR}/smartctl.exe" + "${CMAKE_BINARY_DIR}/smartmontools/drivedb.h" + "${CMAKE_BINARY_DIR}/smartmontools/update-smart-drivedb.exe" + "${CMAKE_BINARY_DIR}/smartmontools/smartctl-nc.exe" + "${CMAKE_BINARY_DIR}/smartmontools/smartctl.exe" DESTINATION . ) else()