|  | 
|  | 1 | +name: Windows build | 
|  | 2 | + | 
|  | 3 | +on: | 
|  | 4 | + push: | 
|  | 5 | + branches: '*' | 
|  | 6 | + tags: '*' | 
|  | 7 | + pull_request: | 
|  | 8 | + branches: [ "master" ] | 
|  | 9 | + | 
|  | 10 | +jobs: | 
|  | 11 | + build: | 
|  | 12 | + runs-on: windows-latest | 
|  | 13 | + strategy: | 
|  | 14 | + matrix: | 
|  | 15 | + qt-version: ['6.6'] | 
|  | 16 | + qt-target: ['desktop'] | 
|  | 17 | + qt-modules: [''] | 
|  | 18 | + mingw-version: ['11.2.0'] | 
|  | 19 | + steps: | 
|  | 20 | + - uses: actions/checkout@v3 | 
|  | 21 | + with: | 
|  | 22 | + fetch-depth: 0 | 
|  | 23 | + submodules: 'recursive' | 
|  | 24 | + - name: Setup environment | 
|  | 25 | + run: | | 
|  | 26 | + sed -i -e '/^#/d' .github/config.env | 
|  | 27 | + sed -i -e '/^$/d' .github/config.env | 
|  | 28 | + cat .github/config.env >> "${GITHUB_ENV}" | 
|  | 29 | + shell: bash | 
|  | 30 | + - name: Get version | 
|  | 31 | + run: | | 
|  | 32 | + version=$(LC_ALL=en_US.utf8 grep -oP 'project\([^)]*\s+VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) | 
|  | 33 | + echo "Project version: $version" | 
|  | 34 | + echo previous_tag=$version >> "${GITHUB_ENV}" | 
|  | 35 | + shell: bash | 
|  | 36 | + ## Install Qt | 
|  | 37 | + - name: Install Qt | 
|  | 38 | + uses: jurplel/install-qt-action@v3 | 
|  | 39 | + with: | 
|  | 40 | + version: ${{ matrix.qt-version }} | 
|  | 41 | + host: 'windows' | 
|  | 42 | + arch: 'win64_mingw' | 
|  | 43 | + target: ${{ matrix.qt-target }} | 
|  | 44 | + modules: ${{ matrix.qt-modules }} | 
|  | 45 | + - name: Install Qt IFW | 
|  | 46 | + run: | | 
|  | 47 | + curl -o aqt.exe -L https://github.com/miurahr/aqtinstall/releases/download/v2.2.1/aqt.exe | 
|  | 48 | + ./aqt.exe install-tool windows desktop tools_ifw | 
|  | 49 | + mv Tools .. | 
|  | 50 | + echo ${pwd}/../Tools/QtInstallerFramework/*/bin >> "${GITHUB_PATH}" | 
|  | 51 | + shell: bash | 
|  | 52 | + - name: Install MinGW | 
|  | 53 | + uses: egor-tensin/setup-mingw@v2 | 
|  | 54 | + with: | 
|  | 55 | + platform: x64 | 
|  | 56 | + version: ${{ matrix.mingw-version }} | 
|  | 57 | + ## Build | 
|  | 58 | + #- name: Build | 
|  | 59 | + # run: .ci/windows_build.sh | 
|  | 60 | + # shell: bash | 
|  | 61 | + - name: Windows build | 
|  | 62 | + run: .ci/common/build.sh win_build win64 | 
|  | 63 | + shell: bash | 
|  | 64 | + - name: Copy files | 
|  | 65 | + run: | | 
|  | 66 | + mkdir win_release | 
|  | 67 | + robocopy win_build release *.exe /S /MOV | 
|  | 68 | + robocopy win_build release *.dll /S /MOV | 
|  | 69 | + cd win_release | 
|  | 70 | + windeployqt ${{ env.executable_name }}.exe --qmldir ..\win_build\src || exit 5 | 
|  | 71 | + for %%v in (*.dll) do windeployqt "%%v" || exit 5 | 
|  | 72 | + shell: cmd | 
|  | 73 | + #- name: Finalize Windows build | 
|  | 74 | + # run: .ci/windows_build.sh 1 | 
|  | 75 | + # shell: bash | 
|  | 76 | + ## Upload | 
|  | 77 | + - name: Upload artifacts | 
|  | 78 | + uses: actions/upload-artifact@v3 | 
|  | 79 | + with: | 
|  | 80 | + name: build-Qt-${{ matrix.qt-version }} | 
|  | 81 | + path: win_release/ | 
|  | 82 | + ## Build installer | 
|  | 83 | + #- if: env.create_windows_installer == 1 | 
|  | 84 | + # name: Disable repository update | 
|  | 85 | + # run: | | 
|  | 86 | + # echo "update_windows_installer=0" >> "${GITHUB_ENV}" | 
|  | 87 | + # echo "update_windows_repository=0" >> "${GITHUB_ENV}" | 
|  | 88 | + # shell: bash | 
|  | 89 | + #- if: env.create_windows_installer == 1 | 
|  | 90 | + # name: Build installer | 
|  | 91 | + # run: .ci/windows-repo.sh | 
|  | 92 | + # shell: bash | 
|  | 93 | + ## Upload installer | 
|  | 94 | + #- name: Upload installer | 
|  | 95 | + # uses: actions/upload-artifact@v3 | 
|  | 96 | + # with: | 
|  | 97 | + # name: installer-Qt-${{ matrix.qt-version }} | 
|  | 98 | + # path: '*.exe' | 
0 commit comments