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" <