2. Windows mxe C/C++ CI #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 2. Windows Qt 6.8 CMake C/C++ CI | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| # MSYS2をセットアップ | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: mingw64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-toolchain | |
| git | |
| make | |
| pacboy: >- | |
| toolchain:p | |
| cmake:p | |
| ninja:p | |
| # Qtをインストール | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: 6.8.0 | |
| modules: 'qtcharts' | |
| host: 'windows' | |
| target: 'desktop' | |
| arch: 'win64_mingw' | |
| tools: 'tools_mingw,qt.tools.win64_mingw810' | |
| install-deps: 'true' | |
| # リポジトリをチェックアウト | |
| - uses: actions/checkout@v4 | |
| # FFmpegをセットアップ | |
| - name: Setup FFmpeg | |
| uses: AnimMouse/setup-ffmpeg@v1 | |
| with: | |
| version: 7.1 | |
| # CMakeでビルド構成を生成 | |
| - name: Configure and Build with CMake | |
| env: | |
| CMAKE_PREFIX_PATH: ${{ env.Qt6_Dir }} | |
| run: | | |
| mkdir -p build | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build --parallel | |
| # 実行可能ファイルを準備 | |
| - name: Deploy Qt Dependencies | |
| run: | | |
| ../Qt/6.8.0/mingw_64/bin/windeployqt.exe build/CaptureStream2.exe --libdir build/lib --plugindir build/plugins --no-system-d3d-compiler --no-quick-import | |
| # 必要なファイルをコピー | |
| - name: Copy Additional Files | |
| run: | | |
| mkdir -p build/WinCaptureStream2 | |
| cp ./qss_files/stylesheet-win.qss build/WinCaptureStream2/ | |
| cp build/CaptureStream2.exe build/WinCaptureStream2/ | |
| cp -r build/lib/*.dll build/WinCaptureStream2/ | |
| cp -r build/plugins build/WinCaptureStream2/ | |
| cp "C:/hostedtoolcache/windows/FFmpeg/ffmpeg.exe" build/WinCaptureStream2/ | |
| # アーティファクトをアップロード | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: CaptureStream2-windows | |
| path: build/WinCaptureStream2/ |