diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 27cf1f9cc..67842d43c 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -19,6 +19,8 @@ jobs: name: Windows MSVC Release, os: windows-latest, msvc: true, + pkgmanager: choco, + shell: 'powershell', buildtype: release, args: '-Ddefault_library=static --wrap-mode=forcefallback' } @@ -26,6 +28,9 @@ jobs: name: Windows MinGW Release, os: windows-latest, msvc: false, + pkgmanager: msys, + msystem: MINGW64, + shell: 'msys2 {0}', buildtype: debugoptimized, args: '' } @@ -42,42 +47,60 @@ jobs: args: '' } + defaults: + run: + shell: ${{ matrix.config.shell || 'bash' }} + steps: - uses: actions/checkout@v4 with: fetch-depth: '0' - - uses: actions/setup-python@v5 + - name: Setup MSys2 + if: matrix.config.pkgmanager == 'msys' + uses: msys2/setup-msys2@v2 with: - python-version: '3.x' - - - name: Setup Meson - run: | - python -m pip install --upgrade pip - pip install meson + msystem: ${{ matrix.config.msystem }} + update: false - name: Setup MSVC if: matrix.config.os == 'windows-latest' && matrix.config.msvc == true uses: ilammy/msvc-dev-cmd@v1 + - name: Install dependecies with choco + if: matrix.config.pkgmanager == 'choco' + run: | + # for whatever reason choco insist on a reboot if it installs meson + choco install ninja nasm python + python -m pip install --upgrade pip + pip install meson + - name: Install dependencies - shell: bash + if: matrix.config.pkgmanager != 'choco' run: | - case "${{ matrix.config.os }}" in - windows-*) - choco install ninja nasm + case "${{ matrix.config.pkgmanager || matrix.config.os }}" in + msys) + pre="$MINGW_PACKAGE_PREFIX" + pacman --noconfirm -S \ + $pre-gcc $pre-meson $pre-ninja nasm \ + $pre-fribidi $pre-freetype $pre-harfbuzz \ + $pre-fontconfig $pre-libpng ;; macos-*) - brew install nasm ninja pkg-config + brew install nasm ninja pkg-config meson ;; ubuntu-*) sudo apt-get update - sudo apt-get install ninja-build build-essential pkg-config nasm libfreetype6-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev + sudo apt-get install ninja-build build-essential pkg-config nasm \ + libfreetype-dev libfontconfig-dev libharfbuzz-dev libfribidi-dev \ + python3-pip + # Drop once 24.04 is available in GHA + pip3 install meson ;; esac - name: Set up WrapDB - if: matrix.config.os == 'windows-latest' || matrix.config.os == 'macos-latest' + if: matrix.config.pkgmanager == 'choco' || matrix.config.os == 'macos-latest' run: | meson wrap update-db