Skip to content

Commit

Permalink
Build windows 64bit binary using UCRT64
Browse files Browse the repository at this point in the history
Is the default and recommended msystem setting. Will produce
binaries that are compatible with windows 10 and later.

Also run tests for 32bit build.

Related to #2831
  • Loading branch information
wader committed Aug 9, 2023
1 parent a692060 commit af53e81
Showing 1 changed file with 22 additions and 29 deletions.
51 changes: 22 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,16 @@ jobs:
- i386
include:
- arch: amd64
CC: x86_64-pc-msys
toolchain: gcc
msystem: msys
msystem: UCRT64
- arch: i386
CC: i686-w64-mingw32
toolchain: mingw-w64-i686-toolchain
msystem: mingw32
msystem: MINGW32
runs-on: windows-2022
env:
CHOST: ${{ matrix.CC }}
CC: ${{ matrix.CC }}-gcc
LDFLAGS: -s
# LDFLAGS: -s
SUFFIX: windows-${{ matrix.arch }}
defaults:
run:
shell: msys2 {0}
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand All @@ -224,39 +221,35 @@ jobs:
autoconf
automake
libtool
${{ matrix.toolchain }}
pacboy: >-
toolchain:p
- name: Build
shell: msys2 {0}
run: |
autoreconf -i
./configure \
--host=${{ matrix.CC }} \
--disable-docs \
--disable-valgrind \
--with-oniguruma=builtin \
--disable-shared \
--enable-static \
--enable-all-static \
CFLAGS="-O2 -pthread -fstack-protector-all"
CFLAGS="-O0 -g -pthread -fstack-protector-all"
make -j$(nproc)
file ./jq.exe
cp ./jq.exe jq-${{ env.SUFFIX }}.exe
- name: Test
# Only run tests for amd64 matching the CI machine arch
if: ${{ matrix.arch == 'amd64' }}
shell: msys2 {0}
run: |
make check VERBOSE=yes
git diff --exit-code --ignore-submodules
- name: Upload Test Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-logs-${{ env.SUFFIX }}
retention-days: 7
path: |
test-suite.log
tests/*.log
# - name: Test
# run: |
# make check VERBOSE=yes
# git diff --exit-code --ignore-submodules
# - name: Upload Test Logs
# if: ${{ failure() }}
# uses: actions/upload-artifact@v3
# with:
# name: test-logs-${{ env.SUFFIX }}
# retention-days: 7
# path: |
# test-suite.log
# tests/*.log
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit af53e81

Please sign in to comment.