Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cen1 committed Mar 25, 2024
1 parent b50d20e commit 36daa1e
Showing 1 changed file with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,47 +88,58 @@ jobs:
working-directory: ${{github.workspace}}/build
run: "ctest --verbose"

use-qt-zlib-windows:
use-qt6-zlib-windows:
if: true
runs-on: windows-latest
name: use-qt-zlib-windows-${{ matrix.qt_version }}
strategy:
fail-fast: false
matrix:
qt_version: [ 5.15.13, 6.6.2 ]
qt_version: [ 6.6.2 ]

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64

- name: Restore Qt cache
- name: Restore Qt build cache
id: cache-qt-restore
uses: actions/cache@v4
with:
key: windows-qt-${{ matrix.qt_version }}
path: qt-everywhere-src-${{ matrix.qt_version }}

- name: Restore Qt zip
if: steps.cache-qt-restore.outputs.cache-hit != 'true'
id: cache-qt-zip-restore
uses: actions/cache@v4
with:
key: windows-qt-${{ matrix.qt_version }}-zip
path: qt-everywhere-src-${{ matrix.qt_version }}.zip

- name: Download Qt 6
if: steps.cache-qt-restore.outputs.cache-hit != 'true' && startsWith(matrix.qt_version, '6.')
if: steps.cache-qt-restore.outputs.cache-hit != 'true' && steps.cache-qt-zip-restore.outputs.cache-hit != 'true' && startsWith(matrix.qt_version, '6.')
shell: powershell
run: |
Invoke-WebRequest -Uri https://ftp.fau.de/qtproject/archive/qt/6.6/${{ matrix.qt_version }}/single/qt-everywhere-src-${{ matrix.qt_version }}.zip -OutFile qt-everywhere-src-${{ matrix.qt_version }}.zip;
Expand-Archive qt-everywhere-src-${{ matrix.qt_version }}.zip -DestinationPath . ;
Remove-Item qt-everywhere-src-${{ matrix.qt_version }}.zip
- name: Download Qt 5
if: steps.cache-qt-restore.outputs.cache-hit != 'true' && startsWith(matrix.qt_version, '5.')
- name: Save Qt zip
if: steps.cache-qt-restore.outputs.cache-hit != 'true' && steps.cache-qt-zip-restore.outputs.cache-hit != 'true'
id: cache-qt-zip-save
uses: actions/cache/save@v4
with:
path: qt-everywhere-src-${{ matrix.qt_version }}.zip
key: windows-qt-${{ matrix.qt_version }}-zip

- name: Extract Qt zip
if: steps.cache-qt-restore.outputs.cache-hit != 'true'
shell: powershell
run: |
Invoke-WebRequest -Uri https://ftp.fau.de/qtproject/archive/qt/5.15/${{ matrix.qt_version }}/single/qt-everywhere-opensource-src-${{ matrix.qt_version }}.zip -OutFile qt-everywhere-src-${{ matrix.qt_version }}.zip;
Expand-Archive qt-everywhere-opensource-src-${{ matrix.qt_version }}.zip -DestinationPath . ;
Remove-Item qt-everywhere-opensource-src-${{ matrix.qt_version }}.zip
Expand-Archive qt-everywhere-src-${{ matrix.qt_version }}.zip -DestinationPath . ;
dir
- name: Configure Qt
if: steps.cache-qt-restore.outputs.cache-hit != 'true'
shell: cmd
working-directory: qt-everywhere-src-${{ matrix.qt_version }}
run: ./configure.bat -prefix="${{github.workspace}}/Qt" -qt-zlib \
Expand Down Expand Up @@ -190,16 +201,21 @@ jobs:
-skip qtscript

- name: Build Qt
if: steps.cache-qt-restore.outputs.cache-hit != 'true'
shell: cmd
run: cmake --build . --config Release

- name: Cache Qt
if: steps.cache-qt-restore.outputs.cache-hit != 'true'
id: cache-qt
uses: actions/cache/save@v4
with:
path: qt-everywhere-src-${{ matrix.qt_version }}
key: windows-qt-${{ matrix.qt_version }}

- name: Checkout
uses: actions/checkout@v4

- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_SHARED_LIBS=OFF -DQUAZIP_USE_QT_ZLIB=ON -B "${{github.workspace}}/build" -DCMAKE_PREFIX_PATH="${{github.workspace}}/Qt"

Expand Down

0 comments on commit 36daa1e

Please sign in to comment.