Skip to content

Fix: V210 pg format #2466

Fix: V210 pg format

Fix: V210 pg format #2466

Workflow file for this run

name: Windows MSYS2 build
on:
# allow manually trigger
workflow_dispatch:
push:
branches:
- main
- 'maint-**'
pull_request:
branches:
- main
- 'maint-**'
workflow_call:
env:
# FIXME: For some reason enabling jit debugging "fixes" random python crashes
# see https://github.com/msys2/MINGW-packages/issues/11864 and
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3280#note_1678973
MSYS: winjitdebug
permissions:
contents: read
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
changed: ${{ steps.filter.outputs.msys2_build == 'true' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v2
id: filter
with:
filters: .github/path_filters.yml
build:
needs: changes
if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed == 'true' }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sys:
- mingw64
- ucrt64
dpdk: [23.11, 23.07]
defaults:
run:
shell: msys2 {0}
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- name: Install dependencies
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff # v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
git
base-devel
unzip
pacboy: >-
pkgconf:p
openssl:p
gcc:p
meson:p
json-c:p
libpcap:p
gtest:p
SDL2:p
SDL2_ttf:p
dlfcn:p
- name: Install npcap-sdk
run: |
wget https://nmap.org/npcap/dist/npcap-sdk-1.12.zip
unzip -d npcap-sdk npcap-sdk-1.12.zip
cp npcap-sdk/Lib/x64/* ${MSYSTEM_PREFIX}/lib/
- name: Checkout IMTL code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Checkout mman-win32 code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
repository: 'alitrack/mman-win32'
ref: master
path: mman-win32
- name: Build and install mman-win32
run: |
cd mman-win32
./configure --prefix=${MSYSTEM_PREFIX}
make -j$(nproc) && make install
- name: Convert patches for DPDK
run: |
cd patches/dpdk/${{matrix.dpdk}}
ls *.patch | xargs -I{} bash -c 'if [[ $(sed -n '1p' "{}") =~ ^../.*\.patch$ ]]; then cp "$(cat "{}")" "{}"; fi'
cd windows
ls *.patch | xargs -I{} bash -c 'if [[ $(sed -n '1p' "{}") =~ ^../.*\.patch$ ]]; then cp "$(cat "{}")" "{}"; fi'
- name: Hash DPDK patches
id: hash-patches
run: |
HASH=$(sha1sum patches/dpdk/${{matrix.dpdk}}/*.patch patches/dpdk/${{matrix.dpdk}}/windows/*.patch | sha1sum | cut -d" " -f1)
echo "hash=${HASH}" >> $GITHUB_OUTPUT
- name: Cache DPDK
id: cache-dpdk
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: dpdk
key: dpdk-${{ matrix.dpdk }}-${{ matrix.sys }}-${{ steps.hash-patches.outputs.hash }}
- name: Checkout DPDK code
if: ${{ steps.cache-dpdk.outputs.cache-hit != 'true' }}
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
repository: 'DPDK/dpdk'
ref: v${{matrix.dpdk}}
path: dpdk
clean: true
- name: Apply patches for DPDK
if: ${{ steps.cache-dpdk.outputs.cache-hit != 'true' }}
shell: bash
run: |
cd dpdk
git config user.name github-actions
git config user.email github-actions@github.com
git am ../patches/dpdk/${{matrix.dpdk}}/*.patch
git am ../patches/dpdk/${{matrix.dpdk}}/windows/*.patch
- name: Build and install DPDK
if: ${{ steps.cache-dpdk.outputs.cache-hit != 'true' }}
run: |
cd dpdk
meson setup build -Dplatform=generic
meson install -C build
- name: Install cached DPDK
if: ${{ steps.cache-dpdk.outputs.cache-hit == 'true' }}
run: |
cd dpdk
meson install -C build --no-rebuild
- name: Build
run: |
./build.sh
- name: Build with debug
run: |
rm build -rf
./build.sh debugonly
- name: Build with TAP
run: |
meson setup tap_build -Denable_tap=true
meson install -C tap_build