From c9b2cc5aca8744b433c3a26d11fcd67f0212f873 Mon Sep 17 00:00:00 2001 From: antony-jr Date: Tue, 21 Nov 2023 20:44:53 +0530 Subject: [PATCH] try fix --- .github/workflows/deploy.yml | 104 +++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 46 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1c10311..24eca58 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -73,53 +73,65 @@ jobs: windows-mingw: runs-on: windows-2019 - name: windows-${{matrix.platform}}-qt-${{matrix.qt_version}} + name: windows-mingw${{ matrix.arch }}-qt-${{ matrix.qt_version }}-${{ matrix.build_type }} strategy: + fail-fast: false matrix: qt_version: [5.15.2] - platform: ['MINGW64'] - build_type: [Release] - defaults: - run: - shell: msys2 {0} + arch: [x64, x86] + build_type: [Release, Debug] + steps: - - uses: actions/checkout@v3 - - - uses: msys2/setup-msys2@v2 - with: - msystem: ${{matrix.platform}} - pacboy: >- - cc:p - ninja:p - pkgconf:p - cmake:p - python:p - python-pip:p - install: >- - p7zip - wget - - - name: Make Output Directory - run: | - mkdir -p ${{github.workspace}}/output/QArchive - - - name: Build and Upload - run: | - pip install conan==1.62.0 - QT_VERSION=${{ matrix.qt_version }} python scripts/write_conan.py - - mkdir build - cd build - cmake -DQARCHIVE_QT_VERSION_MAJOR=5 -DQARCHIVE_CONAN_BUILD=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. - cmake --build . --config ${{ matrix.build_type }} - cmake --install . --prefix=${{ github.workspace }}/output/QArchive --config ${{ matrix.build_type }} - cd .. - cd output - mkdir upload - - 7z a windows-${{matrix.platform}}-qt-${{matrix.qt_version}}-${{matrix.build_type}}.zip QArchive - cp windows-${{matrix.platform}}-qt-${{matrix.qt_version}}-${{matrix.build_type}}.zip upload/ - - wget "https://github.com/tcnksm/ghr/releases/download/v0.16.2/ghr_v0.16.2_windows_amd64.zip" - 7z x ghr_v0.16.2_windows_amd64.zip - ghr_v0.16.2_windows_amd64/ghr.exe -u antony-jr -r QArchive -t ${{ secrets.GITHUB_TOKEN }} -replace -prerelease prebuilt upload/ + - name: Checkout + uses: actions/checkout@v3 + + - name: CMake + uses: lukka/get-cmake@latest + + - name: Set up MinGW + uses: egor-tensin/setup-mingw@v2 + with: + platform: ${{ matrix.arch }} + + - name: Install Conan + id: conan + uses: turtlebrowser/get-conan@main + with: + version: 1.62.0 + + - name: Make Output Directory + run: | + mkdir -p ${{github.workspace}}/output/QArchive + mkdir -p ${{github.workspace}}/upload + + - name: Build + run: | + set QT_VERSION=${{ matrix.qt_version }} + python3 scripts/write_conan.py + + mkdir build + cd build + cmake -DQARCHIVE_QT_VERSION_MAJOR=5 -DQARCHIVE_CONAN_BUILD=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. + cmake --build . --config ${{ matrix.build_type }} + cmake --install . --prefix=${{ github.workspace }}/output/QArchive --config ${{ matrix.build_type }} + cd .. + + - name: Check Contents + working-directory: ${{github.workspace}} + run: ls -R ${{ github.workspace }}/output + + - name: Zip Files + run: | + cd ${{ github.workspace }}/output/ + 7z a ${{ github.workspace }}/upload/windows-mingw-qt-${{ matrix.qt_version }}-${{ matrix.arch }}-${{ matrix.build_type }}.zip QArchive + + - name: Upload Bundles + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.workspace }}/upload/windows-mingw-qt-${{ matrix.qt_version }}-${{ matrix.arch }}-${{ matrix.build_type }}.zip + tag: prebuilt + overwrite: true + prerelease: true + release_name: "Prebuilt Library" + body: "Prebuilt binaries for QArchive, to use with Qt prebuilds. (Work in Progress)"