mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
89 lines
2.3 KiB
YAML
89 lines
2.3 KiB
YAML
---
|
|
name: mingw
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '.mailmap'
|
|
- 'ChangeLog*'
|
|
- 'whatsnew*'
|
|
- 'LICENSE'
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '.mailmap'
|
|
- 'ChangeLog*'
|
|
- 'whatsnew*'
|
|
- 'LICENSE'
|
|
|
|
jobs:
|
|
windows:
|
|
runs-on: windows-2016
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
EVENT_MATRIX:
|
|
- none
|
|
- disable-openssl
|
|
- disable-thread-support
|
|
- disable-debug-mode
|
|
- disable-malloc-replacement
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.0.0
|
|
|
|
- name: Cache MingW
|
|
id: cache-mingw
|
|
uses: actions/cache@v1.0.3
|
|
with:
|
|
path: D:\a\_temp\msys
|
|
key: windows-mingw
|
|
|
|
- name: Cache Build
|
|
uses: actions/cache@v1.0.3
|
|
with:
|
|
path: build
|
|
key: mingw-${{ matrix.EVENT_MATRIX }}
|
|
|
|
- uses: numworks/setup-msys2@v1
|
|
if: steps.cache-mingw.outputs.cache-hit != 'true'
|
|
with:
|
|
msystem: MINGW64
|
|
|
|
- name: Install Dependes
|
|
if: steps.cache-mingw.outputs.cache-hit != 'true'
|
|
run: |
|
|
msys2do pacman -S --noconfirm mingw-w64-x86_64-gcc make autoconf automake libtool openssl-devel
|
|
|
|
- name: Build And Test
|
|
shell: powershell
|
|
run: |
|
|
$env:EVENT_CONFIGURE_OPTIONS=""
|
|
if ( "${{ matrix.EVENT_MATRIX }}" -ne "none" ) {
|
|
$env:EVENT_CONFIGURE_OPTIONS="--${{ matrix.EVENT_MATRIX }}"
|
|
}
|
|
$env:EVENT_TESTS_PARALLEL=1
|
|
$env:EVENT_BUILD_PARALLEL=10
|
|
|
|
$script='
|
|
export PATH="/mingw64/bin:/usr/bin:/bin:/usr/local/bin:/opt/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:$PATH"
|
|
./autogen.sh 2>&1 3>&1
|
|
[[ $? -ne 0 ]] && exit 1
|
|
mkdir -p build
|
|
cd build
|
|
[[ $? -ne 0 ]] && exit 1
|
|
LDFLAGS="-L/usr/lib" CFLAGS="-I/usr/include" ../configure $EVENT_CONFIGURE_OPTIONS 2>&1
|
|
[[ $? -ne 0 ]] && exit 1
|
|
make -j $EVENT_BUILD_PARALLEL 2>&1
|
|
[[ $? -ne 0 ]] && exit 1
|
|
make verify -j $EVENT_TESTS_PARALLEL 2>&1 '
|
|
D:\a\_temp\msys\msys64\usr\bin\bash.exe -c $script
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: mingw-${{ matrix.EVENT_MATRIX }}-build
|
|
path: build
|