Skip to content
30 changes: 17 additions & 13 deletions .github/actions/configure_wine/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ inputs:
required: true
default: "wine64"
crossflags:
descriptions: 'CROSSFLAGS to be given to ming-w64'
descriptions: 'CFLAGS to be given to ming-w64-gcc'
required: true
default: "-g -O2"
cflags:
descriptions: 'CFLAGS to be given to clang'
required: true
# Xcode12 by default enables '-Werror,-Wimplicit-function-declaration' (49917738)
# this causes wine(64) builds to fail so needs to be disabled.
# https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes
default: "-g -O2 -Wno-implicit-function-declaration -Wno-deprecated-declarations -Wno-format"
# this causes wine(64|32on64) builds to fail so needs to be dowbgraded back to a warning.
# see: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes
default: "-g -O2 -Wno-error=implicit-function-declaration -Wno-deprecated-declarations"
ldflags:
descriptions: 'LDFLAGS to be given to clang'
required: true
default: "-Wl,-headerpad_max_install_names"
default: "-Wl,-headerpad_max_install_names -Wl,-no_compact_unwind"
build-dir:
description: 'Build directory'
required: true
Expand All @@ -28,7 +28,7 @@ inputs:
required: true
default: ${{ github.workspace }}/sources/wine/configure
configure-params:
description: 'additional parameters to be given to the wine configure script'
description: 'Additional parameters to be given to configure'
required: true
default: "--enable-win64 --with-vulkan"
runs:
Expand All @@ -45,12 +45,10 @@ runs:
run: |
set -x

export GPHOTO2_CFLAGS="-I$(brew --prefix libgphoto2)/include -I$(brew --prefix libgphoto2)/include/gphoto2"
export GPHOTO2_PORT_CFLAGS="-I$(brew --prefix libgphoto2)/include -I$(brew --prefix libgphoto2)/include/gphoto2"
export SDL2_CFLAGS="-I$(brew --prefix sdl2)/include -I$(brew --prefix sdl2)/include/SDL2"

export ac_cv_lib_soname_MoltenVK="libMoltenVK.dylib"
export ac_cv_lib_soname_vulkan=""
export ac_cv_lib_soname_MoltenVK="$(brew --prefix molten-vk)/lib/libMoltenVK.dylib"

export CPATH="$(brew --prefix)/include"

mkdir -p ${{ inputs.build-dir }}/
pushd ${{ inputs.build-dir }}
Expand All @@ -60,14 +58,20 @@ runs:
--without-alsa \
--without-capi \
--without-dbus \
--without-gettext \
--without-gettextpo \
--without-gsm \
--without-inotify \
--without-krb5 \
--without-netapi \
--without-openal \
--without-oss \
--without-pulse \
--without-quicktime \
--without-sane \
--without-udev \
--without-usb \
--without-v4l2 \
--without-gsm \
--without-quicktime \
--without-x \
${{ inputs.configure-params }} || cat config.log
popd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
CROSS_OVER_VERSION: [22.0.1] # 22.0.0, 21.2.0, 21.1.0, 20.0.4, 20.0.2, 20.0.1, 20.0.0, 19.0.2, 19.0.1, 19.0.0
CROSS_OVER_VERSION: [22.1.1] # 22.1.0, 22.0.1, 22.0.0, 21.2.0, 21.1.0, 20.0.4, 20.0.2, 20.0.1, 20.0.0, 19.0.2, 19.0.1, 19.0.0

runs-on: macos-latest

Expand Down
109 changes: 4 additions & 105 deletions .github/workflows/build_monolithic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,64 +20,12 @@ env:
MOLTENVK_DXVK_INSTALLATION: moltenvk-dxvk

jobs:
moltenVK_DXVK:
runs-on: macos-latest
env:
# crossover source code to be downloaded
CROSS_OVER_SOURCE_URL: https://media.codeweavers.com/pub/crossover/source/crossover-sources-21.2.0.tar.gz
CROSS_OVER_LOCAL_FILE: crossover-22.0.1
steps:
- name: Checkout
uses: actions/checkout@v3

############ Restore MoltenVK / DXVK from cache ##############

- name: Restore MoltenVK / DXVK from cache
uses: actions/cache@v3
id: cache_moltenVK_DXVK
with:
path: ${{ env.INSTALLROOT }}/${{ env.MOLTENVK_DXVK_INSTALLATION }}
key: cache_moltenVK_DXVK_v6

############ Build MoltenVK / DXVK (if restore from cache failed) ##############

- name: Get and Extract Source
if: steps.cache_moltenVK_DXVK.outputs.cache-hit != 'true'
uses: ./.github/actions/get_source
with:
crossover-local-file: "${{ env.CROSS_OVER_LOCAL_FILE }}"
crossover-source-url: "${{ env.CROSS_OVER_SOURCE_URL }}"

- name: Build / Install MoltenVK and DXVK (if restore from cache failed)
if: steps.cache_moltenVK_DXVK.outputs.cache-hit != 'true'
uses: ./.github/actions/build_moltenvk_dxvk
with:
install-prefix: "${{ env.INSTALLROOT }}/${{ env.MOLTENVK_DXVK_INSTALLATION }}"

############ Upload MoltenVK / DXVK to be used in subsequent jobs ##############

- name: Tar MoltenVK / DXVK
run: |
set -x
pushd ${{ env.INSTALLROOT }}
tar -czf ${{ env.MOLTENVK_DXVK_INSTALLATION }}.tar.gz ${{ env.MOLTENVK_DXVK_INSTALLATION }}
ls -alt
popd

- name: Upload MoltenVK / DXVK
uses: actions/upload-artifact@v3
with:
name: ${{ env.MOLTENVK_DXVK_INSTALLATION }}
path: ${{ env.INSTALLROOT }}/${{ env.MOLTENVK_DXVK_INSTALLATION }}.tar.gz


wine-crossover:
needs: [moltenVK_DXVK]

strategy:
fail-fast: false
matrix:
CROSS_OVER_VERSION: [22.0.1, 21.2.0, 20.0.4, 19.0.2] # 22.0.0, 21.1.0, 21.0.0, 20.0.2, 20.0.1, 20.0.0, 19.0.1, 19.0.0
# Only build versions supported by winetricks
CROSS_OVER_VERSION: [22.1.1, 21.2.0, 20.0.4, 19.0.2] #22.1.0, 22.0.1 22.0.0, 21.1.0, 21.0.0, 20.0.4, 20.0.2, 20.0.1, 20.0.0, 19.0.2, 19.0.1, 19.0.0
runs-on: macos-latest

env:
Expand All @@ -86,7 +34,6 @@ jobs:
CROSS_OVER_LOCAL_FILE: crossover-${{ matrix.CROSS_OVER_VERSION }}
# artifact names
WINE_INSTALLATION: wine-cx${{ matrix.CROSS_OVER_VERSION }}
DXVK_INSTALLATION: dxvk-cx${{ matrix.CROSS_OVER_VERSION }}

steps:

Expand All @@ -104,17 +51,14 @@ jobs:
brew install bison \
gcenx/wine/cx-llvm \
flex \
gettext \
mingw-w64 \
pkgconfig

- name: Install Wine Runtime Dependencies
run: |
brew install freetype \
gphoto2 \
gst-plugins-base \
krb5 \
molten-vk \
sane-backends \
sdl2

- name: Install Wine Runtime Dependencies (pre 22)
Expand All @@ -125,29 +69,12 @@ jobs:
libpng \
mpg123

- name: Add bison, cx-llvm, flex & krb5 to $PATH
- name: Add bison, cx-llvm & flex to $PATH
run: |
set -x
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
echo "$(brew --prefix cx-llvm)/bin" >> $GITHUB_PATH
echo "$(brew --prefix flex)/bin" >> $GITHUB_PATH
echo "$(brew --prefix krb5)/bin" >> $GITHUB_PATH

- name: Download MoltenVK / DXVK (from previous job)
uses: actions/download-artifact@v3
with:
name: ${{ env.MOLTENVK_DXVK_INSTALLATION }}
path: ${{ env.INSTALLROOT }}

- name: Unpack MoltenVK / DXVK
run: |
set -x
mkdir -p ${{ env.INSTALLROOT }}/${{ env.WINE_INSTALLATION }}
pushd ${{ env.INSTALLROOT }}/${{ env.WINE_INSTALLATION }}
ls -al
tar --strip-components=1 -xvf ${{ env.INSTALLROOT }}/${{ env.MOLTENVK_DXVK_INSTALLATION }}.tar.gz
ls -alt
popd

############ Download and Prepare Source Code ##############

Expand Down Expand Up @@ -276,31 +203,3 @@ jobs:
with:
name: ${{ env.WINE_INSTALLATION }}
path: ${{ env.INSTALLROOT }}/${{ env.WINE_INSTALLATION }}.tar.gz

wine-crossover-local:

strategy:
fail-fast: false
matrix:
CROSS_OVER_VERSION: [22.0.1] # 22.0.0, 21.2.0, 20.0.4, 19.0.2, 21.1.0, 21.0.0, 20.0.2, 20.0.1, 20.0.0
runs-on: macos-latest
needs: wine-crossover

env:
CROSS_OVER_VERSION: ${{ matrix.CROSS_OVER_VERSION }}
# this has to be synchronized with the same variable in build_local.sh
PACKAGE_UPLOAD: ${{ github.workspace }}/upload

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Run build_local.sh
run: ./build_local.sh

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts-build_local-wine-cx${{ matrix.CROSS_OVER_VERSION }}
path: ${{ env.PACKAGE_UPLOAD }}
2 changes: 1 addition & 1 deletion build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endgroup() {
export GITHUB_WORKSPACE=$(pwd)

if [ -z "$CROSS_OVER_VERSION" ]; then
export CROSS_OVER_VERSION=22.0.1
export CROSS_OVER_VERSION=22.1.1
echo "CROSS_OVER_VERSION not set building crossover-wine-${CROSS_OVER_VERSION}"
fi

Expand Down