From f67a56b830e83b68b67cc5fc8927f541c9b1fcab Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 27 Sep 2022 15:13:02 +0200 Subject: [PATCH] ci/mingw64: refresh build scripts - newer library versions - use libplacebo submodules - prefer meson where possible - fix minor details --- .github/workflows/build.yml | 19 +++++---- ci/build-mingw64.sh | 77 +++++++++++++++++++++---------------- 2 files changed, 55 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e877748aa..eaeab7f1e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,22 +16,27 @@ jobs: matrix: target: [i686-w64-mingw32, x86_64-w64-mingw32] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Increase -N suffix here to force full rebuild after changes - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: mingw_prefix/ - key: "${{ matrix.target }}-3" + key: "${{ matrix.target }}-6" - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y autoconf automake pkg-config g++-mingw-w64 gcc-multilib nasm yasm - # Meson from apt is too old - pip3 install --no-input meson ninja + sudo apt-get install -y autoconf automake pkg-config g++-mingw-w64 gcc-multilib nasm ninja-build + pip3 install --no-input meson ./bootstrap.py + - name: Build libraries + run: | + ./ci/build-mingw64.sh + env: + TARGET: ${{ matrix.target }} + - name: Build with meson run: | ./ci/build-mingw64.sh meson @@ -41,7 +46,7 @@ jobs: - name: Print meson log if: ${{ failure() }} run: | - cat ./${{ matrix.target }}_mingw_build/meson-logs/meson-log.txt + cat ./build/meson-logs/meson-log.txt - name: Build with waf run: | diff --git a/ci/build-mingw64.sh b/ci/build-mingw64.sh index 0647376b14..5daf6979f4 100755 --- a/ci/build-mingw64.sh +++ b/ci/build-mingw64.sh @@ -6,7 +6,7 @@ ln -snf . "$prefix_dir/usr" ln -snf . "$prefix_dir/local" wget="wget -nc --progress=bar:force" -gitclone="git clone --depth=10" +gitclone="git clone --depth=10 --recursive" commonflags="--disable-static --enable-shared" export PKG_CONFIG_SYSROOT_DIR="$prefix_dir" @@ -22,19 +22,23 @@ export RANLIB=$TARGET-ranlib export CFLAGS="-O2 -pipe -Wall -D_FORTIFY_SOURCE=2" export LDFLAGS="-fstack-protector-strong" -cat > "${prefix_dir}/crossfile" << EOF +fam=x86_64 +[[ "$TARGET" == "i686-"* ]] && fam=x86 +cat >"$prefix_dir/crossfile" <