Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: call on_change when slider is modified via text input #7

fix: call on_change when slider is modified via text input

fix: call on_change when slider is modified via text input #7

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
build-type: [Release]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Add GCC repository
if: runner.os == 'Linux'
run: |
for i in {1..5}; do
sudo apt-get update && sudo apt-get install -y software-properties-common && break || sleep 10
done
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libx11-dev \
libxcursor-dev \
libxinerama-dev \
libxi-dev \
libxrandr-dev \
libgl1-mesa-dev \
libncurses6 \
gcc-13 g++-13 \
libfontconfig1-dev \
autoconf automake libtool pkg-config libltdl-dev \
libnotify-dev
- name: Install GCC
if: runner.os == 'Linux'
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
sudo update-alternatives --set gcc /usr/bin/gcc-13
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
with:
version: 1.12.1
# - name: Cache dependencies (macOS)
# uses: actions/cache@v4
# if: runner.os == 'macOS'
# with:
# path: dependencies
# key: ${{ runner.os }}-dependencies
- name: Collect dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install ffmpeg libass zimg imagemagick autoconf automake libtool gcc ffmpeg llvm@20 meson xxhash vapoursynth fftw dylibbundler
cd ci
bash build-dependencies-macos.sh
- name: Collect dependencies (Windows)
if: runner.os == 'Windows'
run: |
cd ci
pwsh build-dependencies-windows.ps1
- name: Collect dependencies (Linux)
if: runner.os == 'Linux'
run: |
cd ci
bash build-dependencies-linux.sh
- name: Set up vcpkg
shell: bash
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
- name: Cache vcpkg packages
uses: actions/cache@v4
with:
path: |
vcpkg_installed/
vcpkg/downloads/
vcpkg/packages/
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build-type }}-${{ steps.vcpkg-commit.outputs.hash }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build-type }}-${{ steps.vcpkg-commit.outputs.hash }}-
vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build-type }}-
- name: Determine CMake Preset
id: select-preset
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
prefix="win"
elif [ "${{ runner.os }}" == "Linux" ]; then
prefix="linux"
elif [ "${{ runner.os }}" == "macOS" ]; then
prefix="mac"
fi
preset="${prefix}-$(echo "${{ matrix.build-type }}" | tr '[:upper:]' '[:lower:]')"
echo "preset=$preset" >> $GITHUB_OUTPUT
shell: bash
- name: Use Developer Command Prompt for Microsoft Visual C++
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
run: cmake --preset ${{ steps.select-preset.outputs.preset }}
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
- name: Build
run: cmake --build . --preset ${{ steps.select-preset.outputs.preset }}
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
- name: Prepare Binaries
id: prep
shell: bash
run: |
# Set up configuration variables
build_dir="bin/${{ matrix.build-type }}"
os="${{ runner.os }}"
build_type="${{ matrix.build-type }}"
arch="$(echo "${{ runner.arch }}" | tr '[:upper:]' '[:lower:]')"
configuration="$os-$build_type-$arch"
cd "$build_dir"
# Determine source and binary names
if [[ "$os" == "Windows" ]]; then
cli_source="blur-cli.exe"
gui_source="blur.exe"
cli_binary="blur-cli-$configuration.exe"
gui_binary="blur-$configuration.exe"
mv "$cli_source" "$cli_binary"
mv "$gui_source" "$gui_binary"
gui_path="$gui_binary"
cli_path="$cli_binary"
elif [[ "$os" == "Linux" ]]; then
cli_source="blur-cli"
gui_source="blur"
cli_binary="blur-cli-$configuration"
gui_binary="blur-$configuration"
# rename binaries
mv "$cli_source" "$cli_binary"
mv "$gui_source" "$gui_binary"
# copy dependencies
cp -r ../../ci/out/* .
# note: vapoursynth already copied
# create archive
package_name="blur-$configuration.tar.gz"
tar -czvf $package_name *
# clean up everything except the archive
find . -mindepth 1 -not -name "$package_name" -exec rm -rf {} +
cli_path="" # empty - cli & gui are combined
gui_path="$package_name"
elif [[ "$os" == "macOS" ]]; then
cli_source="blur-cli"
gui_source="blur.app"
cli_binary="blur-cli-$configuration"
gui_binary="blur-$configuration.dmg"
mv "$cli_source" "$cli_binary"
tar -cvf "$cli_binary.tar.gz" "$cli_binary"
cli_path="$cli_binary.tar.gz"
brew install create-dmg
mkdir source_folder
mv "$gui_source" source_folder
create-dmg \
--volname "Blur Installer" \
--window-pos 200 120 \
--window-size 600 400 \
--icon-size 100 \
--icon "Blur.app" 175 120 \
--hide-extension "Blur.app" \
--app-drop-link 425 120 \
"$gui_binary" \
"source_folder"
gui_path="$gui_binary"
fi
# Output for subsequent steps
echo "build_dir=$build_dir" >> $GITHUB_OUTPUT
echo "cli_path=$cli_path" >> $GITHUB_OUTPUT
echo "gui_path=$gui_path" >> $GITHUB_OUTPUT
echo "configuration=$configuration" >> $GITHUB_OUTPUT
- name: Copy installer requirements (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
cp -r ci/out/* installer/dependencies/lib
curl -L https://aka.ms/vs/17/release/vc_redist.x64.exe -o installer/redist/vc_redist.x64.exe
cp ${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.gui_path }} installer/resources/blur.exe
cp ${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.cli_path }} installer/resources/blur-cli.exe
- name: Build installer (Windows)
if: runner.os == 'Windows'
uses: Minionguyjpro/[email protected]
with:
path: installer/setup.iss
options: /O+
- name: Rename Installer (Windows)
if: runner.os == 'Windows'
run: |
mv installer/output/blur-installer.exe installer/output/blur-Windows-Installer-x64.exe
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Blur-${{ steps.prep.outputs.configuration }}
path: |
${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.cli_path }}
${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.gui_path }}
${{ runner.os == 'Windows' && 'installer/output/blur-Windows-Installer-x64.exe' || '' }}
- name: Release
uses: softprops/action-gh-release@v2
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
with:
files: |
${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.cli_path }}
${{ steps.prep.outputs.build_dir }}/${{ steps.prep.outputs.gui_path }}
${{ runner.os == 'Windows' && 'installer/output/blur-Windows-Installer-x64.exe' || '' }}