Skip to content

Handle file extensions case insensitively #107

Handle file extensions case insensitively

Handle file extensions case insensitively #107

Workflow file for this run

name: Build
on:
push:
paths-ignore:
- "**/**.md"
pull_request:
branches:
- master
paths-ignore:
- "**/**.md"
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
actions: none
checks: none
contents: write
deployments: none
issues: none
packages: read
pull-requests: none
repository-projects: none
security-events: none
statuses: read
env:
VCPKG_COMMITTISH: 53bef8994c541b6561884a8395ea35715ece75db
jobs:
build_windows:
name: Windows
runs-on: windows-2022
strategy:
fail-fast: false
env:
CMAKE_BUILD_TYPE: ${{startsWith(github.ref, 'refs/tags/') && 'Release' || 'RelWithDebInfo'}}
CMAKE_GENERATOR: Visual Studio 17 2022
VCPKG_TRIPLET: x64-windows
NSIS_INSTALLER: ${{startsWith(github.ref, 'refs/tags/') && 'ON' || 'OFF'}}
PKG_EXTENSION: ${{startsWith(github.ref, 'refs/tags/') && '.exe' || '.zip'}}
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: ${{env.VCPKG_COMMITTISH}}
- name: Setup Overlays
uses: actions/checkout@v4
with:
repository: complexlogic/vcpkg
ref: refs/heads/easyaudiosync
path: build/overlays
- name: Configure
run: |
mkdir C:/vcpkg_buildtrees
cmake -S . -B build \
-G "${{env.CMAKE_GENERATOR}}" \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_OVERLAY_PORTS=build/overlays/ports \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TRIPLET}} \
-DNSIS_INSTALLER=${{env.NSIS_INSTALLER}} \
-DVCPKG_INSTALL_OPTIONS="--x-buildtrees-root=c:/vcpkg_buildtrees"
- name: Build
run: cmake --build build --target package --config ${{env.CMAKE_BUILD_TYPE}}
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: Windows build
path: build/*${{env.PKG_EXTENSION}}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*${{env.PKG_EXTENSION}}
build_macos:
name: macOS
runs-on: macos-11
strategy:
fail-fast: false
matrix:
config:
- name: Intel
OSX_ARCH: x86_64
VCPKG_TRIPLET: x64-osx
- name: Apple Silicon
OSX_ARCH: arm64
VCPKG_TRIPLET: arm64-osx
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: ${{env.VCPKG_COMMITTISH}}
cache-key: vcpkg-macOS-${{matrix.config.OSX_ARCH}}-${{github.sha}}
cache-restore-keys: vcpkg-macOS-${{matrix.config.OSX_ARCH}}-
- name: Setup Overlays
uses: actions/checkout@v3
with:
repository: complexlogic/vcpkg
ref: refs/heads/easyaudiosync
path: build/overlays
- name: Install Dependencies
run: brew install nasm automake autoconf-archive ninja
- name: Configure
run: cmake -S . -B build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_OSX_ARCHITECTURES=${{matrix.config.OSX_ARCH}}
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_OVERLAY_PORTS=build/overlays/ports
-DVCPKG_TARGET_TRIPLET=${{matrix.config.VCPKG_TRIPLET}}
-DDMG=ON
- name: Build
run: cmake --build build --target dmg
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: macOS (${{matrix.config.name}}) build
path: build/*.dmg
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*.dmg
build_linux:
name: Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- name: Debian
docker_image: debian:bookworm
package_type: DEB
package_ext: .deb
- name: Fedora
docker_image: fedora:39
package_type: RPM
package_ext: .rpm
env:
VCPKG_TRIPLET: x64-linux
CMAKE_BUILD_TYPE: Release
container:
image: ${{matrix.config.docker_image}}
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Install dependencies"
run: |
if [[ "${{matrix.config.name}}" == "Debian" ]]; then
export DEBIAN_FRONTEND=noninteractive
apt update && apt install -y curl zip unzip tar build-essential git cmake pkg-config python3 nasm qtbase5-dev qttools5-dev
fi
if [[ "${{matrix.config.name}}" == "Fedora" ]]; then
dnf install -y curl zip unzip tar git make pkg-config gcc-c++ fedora-packager rpmdevtools cmake nasm qt5-qtbase-devel qt5-qttools-devel
fi
- name: Setup vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: ${{env.VCPKG_COMMITTISH}}
cache-key: vcpkg-${{matrix.config.name}}-${{github.sha}}
cache-restore-keys: vcpkg-${{matrix.config.name}}-
- name: Setup Overlays
uses: actions/checkout@v3
with:
repository: complexlogic/vcpkg
ref: refs/heads/easyaudiosync
path: build/overlays
- name: Configure
run: cmake -S . -B build
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TRIPLET}}
-DVCPKG_OVERLAY_PORTS=build/overlays/ports
-DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
-DSTRIP_BINARY=ON
-DQT_VERSION=5
-DPACKAGE=${{matrix.config.package_type}}
- name: Build
run: cmake --build build --target package
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: ${{matrix.config.name}} build
path: build/*${{matrix.config.package_ext}}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*${{matrix.config.package_ext}}
token: ${{secrets.ACTIONS_SECRET}}