Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antony-jr committed Nov 21, 2023
1 parent a260d68 commit c9b2cc5
Showing 1 changed file with 58 additions and 46 deletions.
104 changes: 58 additions & 46 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

0 comments on commit c9b2cc5

Please sign in to comment.