Skip to content

0. Build CaptureStream for macOS and Windows #21

0. Build CaptureStream for macOS and Windows

0. Build CaptureStream for macOS and Windows #21

Workflow file for this run

name: 0. Build CaptureStream for macOS and Windows
on:
workflow_dispatch:
inputs:
yyyymmdd:
description: 'Release date (yyyymmdd)'
required: true
jobs:
mac_build:
runs-on: macos-14
outputs:
tag: ${{ steps.setvars.outputs.tag }}
title: ${{ steps.setvars.outputs.title }}
steps:
- name: Set release variables
id: setvars
run: |
tag=${{ github.event.inputs.yyyymmdd }}
title="${tag:0:4}/${tag:4:2}/${tag:6:2}版リリース"
echo "tag=$tag" >> $GITHUB_OUTPUT
echo "title=$title" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.11.0
extra: '--external 7z'
- name: Configure CMake
run: |
mkdir build
cmake -S ./ -B build -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
- name: Build with Make
run: cmake --build build --parallel
- name: Prepare CaptureStream executable
run: |
wget -qO FFmpeg.tar.gz https://github.com/CSReviser/ffmpeg-build/releases/download/7.1.1/ffmpeg-macos-universal.tar.gz || { echo "Failed to download FFmpeg"; exit 1; }
tar -xzvf FFmpeg.tar.gz ffmpeg
cp ffmpeg ./build/CaptureStream.app/Contents/MacOS/
cp ./icon.icns ./build/CaptureStream.app/Contents/Resources/
cp ./qss_files/stylesheet-mac.qss ./build/CaptureStream.app/Contents/MacOS/
- name: Create MacCaptureStream directory
run: |
mkdir -p build/tmp/MacCaptureStream
mv build/CaptureStream.app build/tmp/MacCaptureStream/
cp -r ./qss_files/License build/tmp/MacCaptureStream/
- name: Create DMG file
run: |
cd build
hdiutil create -volname MacCaptureStream \
-srcfolder tmp \
-ov -format UDZO \
"CaptureStream-MacOS-${{ github.event.inputs.yyyymmdd }}.dmg"
- name: Format release title
id: format_date
run: |
yyyy=${{ github.event.inputs.yyyymmdd }}
echo "title=${yyyy:0:4}/${yyyy:4:2}/${yyyy:6:2}版リリース" >> "$GITHUB_OUTPUT"
- name: Upload DMG to GitHub Release
uses: softprops/action-gh-release@v2.2.2
with:
files: build/CaptureStream-MacOS-${{ github.event.inputs.yyyymmdd }}.dmg
tag_name: ${{ github.event.inputs.yyyymmdd }}
name: ${{ steps.format_date.outputs.title }}
body: "2026年度更新 Qt 6.11 build test"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
win_build:
runs-on: ubuntu-latest
needs: mac_build
container:
image: ghcr.io/csreviser/qt6-mxe-static:6.9.0
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Mark repo as safe
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Create build directory
run: mkdir -p build
- name: Configure with CMake
run: >
/opt/mxe/usr/x86_64-w64-mingw32.static/qt6/bin/qt-cmake
-S ./
-B build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_PREFIX_PATH="/opt/mxe/usr/x86_64-w64-mingw32.static/qt6/bin"
-DCMAKE_FIND_ROOT_PATH="/opt/mxe/usr/x86_64-w64-mingw32.static"
-DCMAKE_SYSTEM_NAME=Windows
-DCMAKE_INSTALL_PREFIX=install
-DQT_HOST_PATH="/opt/mxe/usr/x86_64-w64-mingw32.static/qt6"
- name: Build
run: cmake --build build --parallel
- name: Create WinCaptureStream directory and move exe
shell: bash
run: |
mkdir -p build/WinCaptureStream
mv build/CaptureStream.exe build/WinCaptureStream/
cp ./qss_files/stylesheet-win.qss build/WinCaptureStream/
cp -r ./qss_files/License build/WinCaptureStream/
cp /opt/mxe/usr/x86_64-w64-mingw32.static/bin/ffmpeg.exe build/WinCaptureStream/
- name: Install GitHub CLI
run: |
apt-get update
apt-get install -y curl
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | \
tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt-get update
apt-get install -y gh
- name: Create ZIP file
run: |
cd build
zip -r "CaptureStream-Windows-x64-${{ github.event.inputs.yyyymmdd }}.zip" WinCaptureStream
- name: Upload Windows binary to existing release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build
gh release upload "${{ needs.mac_build.outputs.tag }}" \
"CaptureStream-Windows-x64-${{ github.event.inputs.yyyymmdd }}.zip" \
--clobber
win32_build:
runs-on: ubuntu-latest
needs: mac_build
container:
image: ghcr.io/csreviser/qt6-mxe-x86-static:6.9.0
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Mark repo as safe
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Install GitHub CLI
run: |
apt-get update
apt-get install -y curl
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | \
tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt-get update
apt-get install -y gh
- name: Clone CaptureStream
run: |
git clone https://github.com/CSReviser/CaptureStream.git
cd CaptureStream
git submodule update --init --recursive
- name: Create build directory
run: mkdir -p build
- name: Configure with CMake
run: >
/opt/mxe/usr/i686-w64-mingw32.static/qt6/bin/qt-cmake
-S CaptureStream
-B build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_PREFIX_PATH="/opt/mxe/usr/i686-w64-mingw32.static/qt6/bin"
-DCMAKE_FIND_ROOT_PATH="/opt/mxe/usr/i686-w64-mingw32.static"
-DCMAKE_SYSTEM_NAME=Windows
-DCMAKE_INSTALL_PREFIX=install
-DQT_HOST_PATH="/opt/mxe/usr/i686-w64-mingw32.static/qt6"
- name: Build
run: cmake --build build --parallel
- name: Create WinCaptureStream directory and move exe
shell: bash
run: |
mkdir -p build/WinCaptureStream
mv build/CaptureStream.exe build/WinCaptureStream/
cp ./CaptureStream/qss_files/stylesheet-win.qss build/WinCaptureStream/
cp -r ./CaptureStream/qss_files/License build/WinCaptureStream/
cp /opt/mxe/usr/i686-w64-mingw32.static/bin/ffmpeg.exe build/WinCaptureStream/
- name: Create ZIP file
run: |
cd build
zip -r "CaptureStream-Windows-x86-${{ github.event.inputs.yyyymmdd }}.zip" WinCaptureStream
- name: Upload Windows binary to existing release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build
gh release upload "${{ needs.mac_build.outputs.tag }}" \
"CaptureStream-Windows-x86-${{ github.event.inputs.yyyymmdd }}.zip" \
--clobber
wim_qt5_build:
runs-on: ubuntu-latest
needs: mac_build
container:
image: ghcr.io/csreviser/qt5-mxe-static:5.15.18
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Mark repo as safe
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Clone CaptureStream
run: |
git clone https://github.com/CSReviser/CaptureStream.git
cd CaptureStream
git checkout feature
git submodule update --init --recursive
- name: Create build directory
run: mkdir -p build
- name: Configure with CMake
run: >
/opt/mxe/usr/x86_64-w64-mingw32.static/qt5/bin/qmake
CaptureStream/CaptureStream.pro
- name: Build
run: make
- name: Create WinCaptureStream directory and move exe
shell: bash
run: |
mkdir -p build/WinCaptureStream
mv ./release/CaptureStream.exe build/WinCaptureStream/
cp ./CaptureStream/qss_files/stylesheet-win.qss build/WinCaptureStream/
cp -r ./CaptureStream/qss_files/License build/WinCaptureStream/
cp /opt/mxe/usr/x86_64-w64-mingw32.static/bin/ffmpeg.exe build/WinCaptureStream/
- name: Create ZIP file
run: |
cd build
zip -r "CaptureStream-Windows-x64-qt5-${{ github.event.inputs.yyyymmdd }}.zip" WinCaptureStream
- name: Install GitHub CLI
run: |
apt-get update
apt-get install -y curl
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | \
tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt-get update
apt-get install -y gh
- name: Upload Windows binary to existing release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build
gh release upload "${{ needs.mac_build.outputs.tag }}" \
"CaptureStream-Windows-x64-qt5-${{ github.event.inputs.yyyymmdd }}.zip" \
--clobber
wim_x68_qt5_build:
runs-on: ubuntu-latest
needs: mac_build
container:
image: ghcr.io/csreviser/qt5-mxe-x86-static:5.15.18
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Mark repo as safe
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Clone CaptureStream
run: |
git clone https://github.com/CSReviser/CaptureStream.git
cd CaptureStream
git checkout feature
git submodule update --init --recursive
- name: Create build directory
run: mkdir -p build
- name: Configure with CMake
run: >
/opt/mxe/usr/i686-w64-mingw32.static/qt5/bin/qmake
CaptureStream/CaptureStream.pro
- name: Build
run: make
- name: Create WinCaptureStream2 directory and move exe
shell: bash
run: |
mkdir -p build/WinCaptureStream
mv ./release/CaptureStream.exe build/WinCaptureStream/
cp ./CaptureStream/qss_files/stylesheet-win.qss build/WinCaptureStream/
cp -r ./CaptureStream/qss_files/License build/WinCaptureStream/
cp /opt/mxe/usr/i686-w64-mingw32.static/bin/ffmpeg.exe build/WinCaptureStream/
- name: Create ZIP file
run: |
cd build
zip -r "CaptureStream-Windows-x86-qt5-${{ github.event.inputs.yyyymmdd }}.zip" WinCaptureStream
- name: Install GitHub CLI
run: |
apt-get update
apt-get install -y curl
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | \
tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt-get update
apt-get install -y gh
- name: Upload Windows binary to existing release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build
gh release upload "${{ needs.mac_build.outputs.tag }}" \
"CaptureStream-Windows-x86-qt5-${{ github.event.inputs.yyyymmdd }}.zip" \
--clobber
ubuntu_build:
runs-on: ubuntu-latest
needs: mac_build
container:
image: ghcr.io/csreviser/qt6-static:6.9.0-ubuntu22.04
# ghcr.io/csreviser/qt6-static:6.9.0-ubuntu22.04
# ghcr.io/csreviser/qt6-ubuntu-static:latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Install GitHub CLI
run: |
apt-get update
apt-get install -y curl zip
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | \
tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt-get update
apt-get install -y gh p7zip-full lzip bzip2
- name: Mark repo as safe
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Clone CaptureStream
run: |
git clone https://github.com/CSReviser/CaptureStream.git
cd CaptureStream
git submodule update --init --recursive
- name: Build using Docker container with Qt static
run: |
cd CaptureStream
mkdir -p build && cd build
qt-cmake .. -DQT_DEBUG_FIND_PACKAGE=ON
cmake --build . --parallel
mkdir -p LinCaptureStream
mv CaptureStream ./LinCaptureStream/
cp ../qss_files/stylesheet-ubu.qss ./LinCaptureStream
cp -r ../qss_files/License ./LinCaptureStream
wget -qO ffmpeg-static-ubuntu.zip https://github.com/CSReviser/ffmpeg-build/releases/download/7.1.1/ffmpeg-static-ubuntu.zip
7z e ffmpeg-static-ubuntu.zip ffmpeg -o./LinCaptureStream
chmod -R 755 ./LinCaptureStream
- name: Create ZIP file
run: |
cd CaptureStream2/build
zip -r "CaptureStream-ubuntu-${{ github.event.inputs.yyyymmdd }}.zip" LinCaptureStream
- name: Upload zip to GitHub Release
uses: softprops/action-gh-release@v2.2.2
with:
files: CaptureStream/build/CaptureStream-ubuntu-${{ github.event.inputs.yyyymmdd }}.zip
tag_name: ${{ needs.mac_build.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mac_qt5_build:
runs-on: macos-14
needs: mac_build
steps:
- name: Set release variables
id: setvars
run: |
tag=${{ github.event.inputs.yyyymmdd }}
title="${tag:0:4}/${tag:4:2}/${tag:6:2}版リリース"
echo "tag=$tag" >> $GITHUB_OUTPUT
echo "title=$title" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Mark repo as safe
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Update GitHub CLI
run: |
brew install gh || brew upgrade gh
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 5.15.*
modules: 'qtcharts qtscript qtwebengine'
extra: '--external 7z'
- name: Clone CaptureStream
run: |
git clone https://github.com/CSReviser/CaptureStream.git
cd CaptureStream
git submodule update --init --recursive
- name: qmake
run: |
cd CaptureStream
qmake -makefile CaptureStream.pro QMAKE_APPLE_DEVICE_ARCHS="x86_64"
make
wget -qO FFmpeg.7z https://evermeet.cx/ffmpeg/ffmpeg-7.1.1.7z
7z e FFmpeg.7z ffmpeg -o./CaptureStream.app/Contents/MacOS/
chmod -R 755 ./CaptureStream.app
mkdir -p ./build/tmp/MacCaptureStream
cp ./icon.icns ./CaptureStream.app/Contents/Resources/
cp ./qss_files/stylesheet-mac.qss ./CaptureStream.app/Contents/MacOS/
mv ./CaptureStream.app ./build/tmp/MacCaptureStream/
cp -r ./qss_files/License ./build/tmp/MacCaptureStream/
- name: Create DMG file
run: |
cd CaptureStream/build
hdiutil create -volname MacCaptureStream \
-srcfolder tmp \
-ov -format UDZO \
"CaptureStream-MacOS-qt5-${{ github.event.inputs.yyyymmdd }}.dmg"
- name: Upload DMG to GitHub Release
uses: softprops/action-gh-release@v2.2.2
with:
files: CaptureStream/build/CaptureStream-MacOS-qt5-${{ github.event.inputs.yyyymmdd }}.dmg
tag_name: ${{ needs.mac_build.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mac_universal_build:
runs-on: macos-14
needs: mac_build
steps:
- name: Set release variables
id: setvars
run: |
tag=${{ github.event.inputs.yyyymmdd }}
title="${tag:0:4}/${tag:4:2}/${tag:6:2}版リリース"
echo "tag=$tag" >> $GITHUB_OUTPUT
echo "title=$title" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.5.*
modules: 'qtcharts'
extra: '--external 7z'
- name: Configure CMake
run: |
mkdir build
cmake -S ./ -B build -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
- name: Build with Make
run: cmake --build build --parallel
- name: Prepare CaptureStream executable
run: |
wget -qO FFmpeg.7z https://evermeet.cx/ffmpeg/ffmpeg-7.1.1.7z || { echo "Failed to download FFmpeg"; exit 1; }
7z e FFmpeg.7z ffmpeg -o./build/CaptureStream.app/Contents/MacOS/ || { echo "Failed to extract FFmpeg"; exit 1; }
cp ./icon.icns ./build/CaptureStream.app/Contents/Resources/
cp ./qss_files/stylesheet-mac.qss ./build/CaptureStream.app/Contents/MacOS/
- name: Create MacCaptureStream2 directory
run: |
mkdir -p build/tmp/MacCaptureStream
mv build/CaptureStream.app build/tmp/MacCaptureStream/
cp -r ./qss_files/License build/tmp/MacCaptureStream/
- name: Create DMG file
run: |
cd build
hdiutil create -volname MacCaptureStream \
-srcfolder tmp \
-ov -format UDZO \
"CaptureStream-MacOS-qt65-${{ github.event.inputs.yyyymmdd }}.dmg"
- name: Upload DMG to GitHub Release
uses: softprops/action-gh-release@v2.2.2
with:
files: build/CaptureStream-MacOS-qt65-${{ github.event.inputs.yyyymmdd }}.dmg
tag_name: ${{ needs.mac_build.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}