This repository was archived by the owner on Dec 25, 2025. It is now read-only.
Fix macOS CI: Add ffmpeg@7, use temporary tap for mingw installation, make debug step resilient #106
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: Build Wine | |
| on: | |
| pull_request: | |
| push: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 1 * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CC: clang | |
| CXX: clang++ | |
| CPATH: /usr/local/include | |
| LIBRARY_PATH: /usr/local/lib | |
| CFLAGS: -O3 | |
| CROSSCFLAGS: -O3 -Wno-error=incompatible-pointer-types -Wno-error=int-conversion | |
| LDFLAGS: -Wl,-ld_classic -Wl,-headerpad_max_install_names -Wl,-rpath,@loader_path/../../ -Wl,-rpath,/usr/local/lib | |
| MACOSX_DEPLOYMENT_TARGET: 10.14 | |
| WINE_CONFIGURE: $GITHUB_WORKSPACE/configure | |
| BUILDROOT: $GITHUB_WORKSPACE/build | |
| WINE_INSTALLROOT: install | |
| WINE_MONO: https://github.com/madewokherd/wine-mono/releases/download/wine-mono-7.4.1/wine-mono-7.4.1-x86.tar.xz | |
| jobs: | |
| build: | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Xcode 15 | |
| run: sudo xcode-select -switch /Applications/Xcode_15.2.app/Contents/Developer | |
| - name: Install MacPorts | |
| run: | | |
| # install ports by defualt to /opt/local/bin | |
| sudo curl -L https://github.com/macports/macports-base/releases/download/v2.10.5/MacPorts-2.10.5-13-Ventura.pkg > /tmp/macports.pkg | |
| sudo installer -pkg /tmp/macports.pkg -target / | |
| sudo ln -s /opt/local/bin/port /usr/local/bin/port | |
| sudo port selfupdate | |
| - name: Install Homebrew Packages | |
| continue-on-error: true | |
| run: | | |
| REQUIRED_PACKAGES=( | |
| # Build Dependencies | |
| "bison" | |
| "pkg-config" | |
| # "gcenx/wine/cx-llvm" # deprecated; using llvm-cx from macports instead | |
| # Dependencies | |
| "freetype" | |
| "gettext" | |
| "gnutls" | |
| "gstreamer" | |
| "sdl2" | |
| "molten-vk" | |
| "winetricks" | |
| "ffmpeg@7" | |
| ) | |
| brew update | |
| brew install "${REQUIRED_PACKAGES[@]}" | |
| - name: Install llvm-cx from macports | |
| continue-on-error: true | |
| run: | | |
| sudo port install llvm-cx | |
| - name: Install mingw (install legacy formula from a temporary tap) | |
| continue-on-error: true | |
| run: | | |
| FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/31209a399a7b40bf2cd3abd7aee2715547ccd5bd/Formula/m/mingw-w64.rb" | |
| TMP_FORMULA="/tmp/mingw-w64.rb" | |
| curl -fL "$FORMULA_URL" -o "$TMP_FORMULA" | |
| TAP_USER="${GITHUB_ACTOR:-MythicApp}" | |
| TAP_REPO="homebrew-old-formula" | |
| TAP_FULL="$TAP_USER/$TAP_REPO" | |
| brew tap-new "$TAP_FULL" | |
| TAP_DIR="$(brew --repo "$TAP_FULL")" | |
| mkdir -p "$TAP_DIR/Formula" | |
| mv "$TMP_FORMULA" "$TAP_DIR/Formula/mingw-w64.rb" | |
| pushd "$TAP_DIR" >/dev/null | |
| git add -A || true | |
| git commit -m "Add legacy mingw-w64 formula" || true | |
| popd >/dev/null | |
| brew update || true | |
| if ! brew install "$TAP_FULL/mingw-w64"; then | |
| echo "Binary install failed; attempting build-from-source" | |
| brew install --build-from-source "$TAP_FULL/mingw-w64" | |
| fi | |
| # optional: cleanup tap after install | |
| # brew untap "$TAP_FULL" || true | |
| - name: Echo Libs [DEBUG] | |
| run: | | |
| echo "Brew Libs" | |
| ls "$(brew --prefix)/lib" || true | |
| echo "FFmpeg Libs" | |
| if brew ls --versions ffmpeg@7 >/dev/null 2>&1; then | |
| ls "$(brew --prefix ffmpeg@7)/lib" || true | |
| else | |
| echo "ffmpeg@7 not installed" | |
| fi | |
| echo "GStreamer Libs" | |
| if brew ls --versions gstreamer >/dev/null 2>&1; then | |
| ls "$(brew --prefix gstreamer)/lib/gstreamer-1.0" || true | |
| else | |
| echo "gstreamer not installed" | |
| fi | |
| - name: Add bison & cx-llvm to $PATH | |
| run: | | |
| echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
| # echo "$(brew --prefix cx-llvm)/bin" >> $GITHUB_PATH | |
| echo "/opt/local/libexec/llvm-cx/bin" >> $GITHUB_PATH | |
| - name: Configure wine64 | |
| run: | | |
| set -x | |
| export ac_cv_lib_soname_MoltenVK="libMoltenVK.dylib" | |
| export ac_cv_lib_soname_vulkan="" | |
| mkdir -p ${{ env.BUILDROOT }}/wine64 | |
| pushd ${{ env.BUILDROOT }}/wine64 | |
| ${{ env.WINE_CONFIGURE }} \ | |
| --prefix= \ | |
| --disable-tests \ | |
| --disable-winedbg \ | |
| --enable-win64 \ | |
| --without-alsa \ | |
| --without-capi \ | |
| --with-coreaudio \ | |
| --with-cups \ | |
| --without-dbus \ | |
| --without-fontconfig \ | |
| --with-freetype \ | |
| --with-gettext \ | |
| --without-gettextpo \ | |
| --without-gphoto \ | |
| --with-gnutls \ | |
| --without-gssapi \ | |
| --with-gstreamer \ | |
| --without-krb5 \ | |
| --with-mingw \ | |
| --without-netapi \ | |
| --with-opencl \ | |
| --with-opengl \ | |
| --without-oss \ | |
| --with-pcap \ | |
| --with-pthread \ | |
| --without-pulse \ | |
| --without-sane \ | |
| --with-sdl \ | |
| --without-udev \ | |
| --with-unwind \ | |
| --without-usb \ | |
| --without-v4l2 \ | |
| --with-vulkan \ | |
| --without-x | |
| popd | |
| - name: Build wine64 | |
| run: | | |
| pushd ${{ env.BUILDROOT }}/wine64 | |
| make -j$(sysctl -n hw.ncpu 2>/dev/null) | |
| popd | |
| - name: Install wine64 | |
| run: | | |
| pushd ${{ env.BUILDROOT }}/wine64 | |
| make install-lib DESTDIR="$GITHUB_WORKSPACE/${{ env.WINE_INSTALLROOT }}" | |
| popd | |
| - name: Configure wine32on64 | |
| run: | | |
| set -x | |
| export ac_cv_lib_soname_MoltenVK="libMoltenVK.dylib" | |
| export ac_cv_lib_soname_vulkan="" | |
| mkdir -p ${{ env.BUILDROOT }}/wine32on64 | |
| pushd ${{ env.BUILDROOT }}/wine32on64 | |
| ${{ env.WINE_CONFIGURE }} \ | |
| --prefix= \ | |
| --disable-loader \ | |
| --disable-tests \ | |
| --disable-winedbg \ | |
| --enable-win32on64 \ | |
| --without-alsa \ | |
| --without-capi \ | |
| --with-coreaudio \ | |
| --with-cups \ | |
| --without-dbus \ | |
| --without-fontconfig \ | |
| --with-freetype \ | |
| --with-gettext \ | |
| --without-gettextpo \ | |
| --without-gphoto \ | |
| --with-gnutls \ | |
| --without-gssapi \ | |
| --without-gstreamer \ | |
| --without-inotify \ | |
| --without-krb5 \ | |
| --with-mingw \ | |
| --without-netapi \ | |
| --without-openal \ | |
| --with-opencl \ | |
| --with-opengl \ | |
| --without-oss \ | |
| --with-pcap \ | |
| --with-pthread \ | |
| --without-pulse \ | |
| --without-sane \ | |
| --with-sdl \ | |
| --without-udev \ | |
| --with-unwind \ | |
| --without-usb \ | |
| --without-v4l2 \ | |
| --with-vulkan \ | |
| --with-wine64=${{ env.BUILDROOT }}/wine64 \ | |
| --without-x | |
| popd | |
| - name: Build wine32on64 | |
| run: | | |
| pushd ${{ env.BUILDROOT }}/wine32on64 | |
| make -j$(sysctl -n hw.ncpu 2>/dev/null) | |
| popd | |
| - name: Install wine32on64 | |
| run: | | |
| pushd ${{ env.BUILDROOT }}/wine32on64 | |
| make install-lib DESTDIR="$GITHUB_WORKSPACE/${{ env.WINE_INSTALLROOT }}" | |
| popd | |
| - name: Fetch Winetricks Verbs | |
| run: | | |
| curl -L -o verbs.txt https://raw.githubusercontent.com/Winetricks/winetricks/master/files/verbs/all.txt | |
| - name: Assemble Engine Folder | |
| run: | | |
| mkdir -p Engine/DXVK | |
| mkdir -p Engine/wine | |
| cp -a ${{ env.WINE_INSTALLROOT }}/. Engine/wine/ | |
| rm -rf Engine/wine/share/man | |
| cp -a verbs.txt Engine | |
| cp -a properties.plist Engine | |
| cp -a $(brew --prefix winetricks)/bin/winetricks Engine | |
| cp -a DXVK Engine | |
| - name: Copy External Libraries | |
| run: | | |
| chmod +x .github/dylib_packer.zsh | |
| .github/dylib_packer.zsh | |
| - name: Copy GPTK Libraries | |
| run: | | |
| ditto GPTK/redist/lib/ Engine/wine/lib/ | |
| - name: Download & Install Wine Mono | |
| run: | | |
| mkdir Engine/wine/share/wine/mono | |
| curl -L -o mono.tar.xz ${{ env.WINE_MONO }} | |
| tar -xzf mono.tar.xz -C Engine/wine/share/wine/mono | |
| - name: Calculate Checksums | |
| run: > | |
| find ./Engine -type f -exec shasum "{}" + > checksums.sha | |
| - name: Upload config64.log | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: config64 | |
| path: build/wine64/config.log | |
| - name: Upload config32.log | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: config32 | |
| path: build/wine32on64/config.log | |
| - name: Compress Files | |
| if: success() | |
| run: > | |
| tar -cJf Engine.txz Engine | |
| - name: Upload Engine | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Engine | |
| path: Engine.txz | |
| - name: Upload Checksums | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Checksums | |
| path: checksums.sha |