Skip to content

Commit

Permalink
Merge pull request #2 from escherstair/v1.x
Browse files Browse the repository at this point in the history
merge v1.x into fix_MinGW_warnings_on_win
  • Loading branch information
escherstair committed Jul 29, 2020
2 parents e124896 + 0a0b554 commit 393c642
Show file tree
Hide file tree
Showing 58 changed files with 1,744 additions and 200 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/CI.yml
@@ -0,0 +1,68 @@
name: CI

on: [push, pull_request]

jobs:
build-android:
runs-on: ubuntu-latest
container: reactnativecommunity/react-native-android:2020-5-20
steps:
- uses: actions/checkout@v2
- name: Envinfo
run: npx envinfo
- name: Build android arm64
# see build options you can use in https://developer.android.com/ndk/guides/cmake
run: |
mkdir build && cd build
$ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk/20.0.5594570/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 ..
$ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake --build .
build-cross-qemu:
runs-on: ubuntu-latest
name: build-cross-qemu-${{ matrix.config.target }}

strategy:
fail-fast: false
matrix:
config:
- {target: arm, toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm-static }
- {target: armhf, toolchain: gcc-arm-linux-gnueabihf, cc: arm-linux-gnueabihf-gcc, qemu: qemu-arm-static }
- {target: aarch64, toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64-static }
- {target: riscv64, toolchain: gcc-riscv64-linux-gnu, cc: riscv64-linux-gnu-gcc, qemu: qemu-riscv64-static }
- {target: ppc, toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc-static }
- {target: ppc64, toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static }
- {target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, cc: powerpc64le-linux-gnu-gcc, qemu: qemu-ppc64le-static }
- {target: s390x, toolchain: gcc-s390x-linux-gnu, cc: s390x-linux-gnu-gcc, qemu: qemu-s390x-static }
- {target: mips, toolchain: gcc-mips-linux-gnu, cc: mips-linux-gnu-gcc, qemu: qemu-mips-static }
- {target: mips64, toolchain: gcc-mips64-linux-gnuabi64, cc: mips64-linux-gnuabi64-gcc, qemu: qemu-mips64-static }
- {target: mipsel, toolchain: gcc-mipsel-linux-gnu, cc: mipsel-linux-gnu-gcc, qemu: qemu-mipsel-static }
- {target: mips64el,toolchain: gcc-mips64el-linux-gnuabi64, cc: mips64el-linux-gnuabi64-gcc,qemu: qemu-mips64el-static }
- {target: alpha, toolchain: gcc-alpha-linux-gnu, cc: alpha-linux-gnu-gcc, qemu: qemu-alpha-static }
- {target: arm (u64 slots), toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm-static}
- {target: aarch64 (u64 slots), toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64-static}
- {target: ppc (u64 slots), toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc-static}
- {target: ppc64 (u64 slots), toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static}

steps:
- uses: actions/checkout@v2
- name: Install QEMU
# this ensure install latest qemu on ubuntu, apt get version is old
env:
QEMU_SRC: "http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu"
QEMU_VER: "qemu-user-static_4\\.2-.*_amd64.deb$"
run: |
DEB=`curl -s $QEMU_SRC/ | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $QEMU_VER | tail -1`
wget $QEMU_SRC/$DEB
sudo dpkg -i $DEB
- name: Install ${{ matrix.config.toolchain }}
run: |
sudo apt install ${{ matrix.config.toolchain }} -y
- name: Build
run: |
mkdir build
cd build && cmake .. -DBUILD_TESTING=ON -DQEMU=ON -DCMAKE_C_COMPILER=${{ matrix.config.cc }}
cmake --build .
ls -lh
- name: Test
run: |
${{ matrix.config.qemu }} build/uv_run_tests_a
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -67,6 +67,7 @@ ipch

# Clion / IntelliJ project files
/.idea/
cmake-build-debug/

*.xcodeproj
*.xcworkspace
Expand Down
10 changes: 10 additions & 0 deletions AUTHORS
Expand Up @@ -425,3 +425,13 @@ Sk Sajidul Kadir <sheikh.sajid522@gmail.com>
twosee <twose@qq.com>
Rikard Falkeborn <rikard.falkeborn@gmail.com>
Yash Ladha <yashladhapankajladha123@gmail.com>
James Ross <git@james-ross.co.uk>
Colin Finck <colin@reactos.org>
Shohei YOSHIDA <syohex@gmail.com>
Philip Chimento <philip.chimento@gmail.com>
Michal Artazov <michal@artazov.cz>
Jeroen Roovers <jer@gentoo.org>
MasterDuke17 <MasterDuke17@users.noreply.github.com>
Alexander Tokmakov <avtokmakov@yandex-team.ru>
Arenoros <arenoros@gmail.com>
lander0s <dh.landeros08@gmail.com>
41 changes: 33 additions & 8 deletions CMakeLists.txt
Expand Up @@ -24,6 +24,12 @@ cmake_dependent_option(LIBUV_BUILD_BENCH
"Build the benchmarks when building unit tests and we are the root project" ON
"LIBUV_BUILD_TESTS" OFF)

# Qemu Build
option(QEMU "build for qemu" OFF)
if(QEMU)
add_definitions(-D__QEMU__=1)
endif()

# Compiler check
string(CONCAT is-msvc $<OR:
$<C_COMPILER_ID:MSVC>,
Expand Down Expand Up @@ -101,6 +107,8 @@ if(WIN32)
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0600)
list(APPEND uv_libraries
psapi
user32
advapi32
iphlpapi
userenv
ws2_32)
Expand Down Expand Up @@ -176,6 +184,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Android")
list(APPEND uv_defines _GNU_SOURCE)
list(APPEND uv_libraries dl)
list(APPEND uv_sources
src/unix/android-ifaddrs.c
Expand All @@ -186,8 +195,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
src/unix/pthread-fixes.c
src/unix/random-getentropy.c
src/unix/random-getrandom.c
src/unix/random-sysctl-linux.c
src/unix/sysinfo-loadavg.c)
src/unix/random-sysctl-linux.c)
endif()

if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux|OS390")
Expand All @@ -200,7 +208,6 @@ endif()

if(CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
list(APPEND uv_sources src/unix/posix-hrtime.c src/unix/bsd-proctitle.c)
list(APPEND uv_libraries kvm)
endif()

if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
Expand Down Expand Up @@ -232,12 +239,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
src/unix/linux-syscalls.c
src/unix/procfs-exepath.c
src/unix/random-getrandom.c
src/unix/random-sysctl-linux.c
src/unix/sysinfo-loadavg.c)
src/unix/random-sysctl-linux.c)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
list(APPEND uv_sources src/unix/netbsd.c)
list(APPEND uv_libraries kvm)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
Expand Down Expand Up @@ -413,6 +420,9 @@ if(LIBUV_BUILD_TESTS)
test/test-loop-time.c
test/test-multiple-listen.c
test/test-mutexes.c
test/test-not-readable-nor-writable-on-read-error.c
test/test-not-readable-on-eof.c
test/test-not-writable-after-shutdown.c
test/test-osx-select.c
test/test-pass-always.c
test/test-ping-pong.c
Expand Down Expand Up @@ -468,6 +478,7 @@ if(LIBUV_BUILD_TESTS)
test/test-tcp-oob.c
test/test-tcp-open.c
test/test-tcp-read-stop.c
test/test-tcp-read-stop-start.c
test/test-tcp-shutdown-after-write.c
test/test-tcp-try-write.c
test/test-tcp-try-write-error.c
Expand All @@ -494,6 +505,7 @@ if(LIBUV_BUILD_TESTS)
test/test-udp-create-socket-early.c
test/test-udp-dgram-too-big.c
test/test-udp-ipv6.c
test/test-udp-mmsg.c
test/test-udp-multicast-interface.c
test/test-udp-multicast-interface6.c
test/test-udp-multicast-join.c
Expand All @@ -504,6 +516,7 @@ if(LIBUV_BUILD_TESTS)
test/test-udp-send-and-recv.c
test/test-udp-send-hang-loop.c
test/test-udp-send-immediate.c
test/test-udp-sendmmsg-error.c
test/test-udp-send-unreachable.c
test/test-udp-try-send.c
test/test-uname.c
Expand All @@ -525,13 +538,17 @@ if(LIBUV_BUILD_TESTS)
add_executable(uv_run_tests_a ${uv_test_sources} uv_win_longpath.manifest)
target_compile_definitions(uv_run_tests_a PRIVATE ${uv_defines})
target_compile_options(uv_run_tests_a PRIVATE ${uv_cflags})
target_link_libraries(uv_run_tests_a uv_a ${uv_test_libraries})
if(QEMU)
target_link_libraries(uv_run_tests_a uv_a ${uv_test_libraries} -static)
else()
target_link_libraries(uv_run_tests_a uv_a ${uv_test_libraries})
endif()
add_test(NAME uv_test_a
COMMAND uv_run_tests_a
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()

if(UNIX)
if(UNIX OR MINGW)
# Now for some gibbering horrors from beyond the stars...
foreach(lib IN LISTS uv_libraries)
list(APPEND LIBS "-l${lib}")
Expand All @@ -558,10 +575,18 @@ if(UNIX)
install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()

if(WIN32)
if(MSVC)
install(DIRECTORY include/ DESTINATION include)
install(FILES LICENSE DESTINATION .)
install(TARGETS uv uv_a
RUNTIME DESTINATION lib/$<CONFIG>
ARCHIVE DESTINATION lib/$<CONFIG>)
endif()

message(STATUS "summary of build options:
Install prefix: ${CMAKE_INSTALL_PREFIX}
Target system: ${CMAKE_SYSTEM_NAME}
Compiler:
C compiler: ${CMAKE_C_COMPILER}
CFLAGS: ${CMAKE_C_FLAGS_${_build_type}} ${CMAKE_C_FLAGS}
")
112 changes: 112 additions & 0 deletions ChangeLog
@@ -1,3 +1,115 @@
2020.07.04, Version 1.38.1 (Stable), e8b989ea1f7f9d4083511a2caec7791e9abd1871

Changes since version 1.38.0:

* test: use last matching qemu version (cjihrig)

* win, util: rearrange uv_hrtime (Bartosz Sosnowski)

* test: skip signal_multiple_loops test on QEMU (gengjiawen)

* build: add android build to CI (gengjiawen)

* test: extend fs_event_error_reporting timeout (cjihrig)

* build: link libkvm on netbsd only (Alexander Tokmakov)

* linux: refactor /proc file reader logic (Ben Noordhuis)

* linux: read load average from /proc/loadavg (Ben Noordhuis)

* android: remove patch code for below 21 (gengjiawen)

* win: fix visual studio 2008 build (Arenoros)

* win,tty: fix deadlock caused by inconsistent state (lander0s)

* unix: use relaxed loads/stores for feature checks (Ben Noordhuis)

* build: don't .gitignore m4/ax_pthread.m4 (Ben Noordhuis)

* unix: fix gcc atomics feature check (Ben Noordhuis)

* darwin: work around clock jumping back in time (Ben Noordhuis)

* udp: fix write_queue cleanup on sendmmsg error (Santiago Gimeno)

* src: build fix for Android (David Carlier)


2020.05.18, Version 1.38.0 (Stable), 1ab9ea3790378f9f25c4e78e9e2b511c75f9c9ed

Changes since version 1.37.0:

* test: skip poll_duplex and poll_unidirectional on PASE (Xu Meng)

* linux: make cpu_times consistently be milliseconds (James Ross)

* win: DRY uv_poll_start() and uv_poll_stop() (Ben Noordhuis)

* win: DRY uv_poll_close() (Ben Noordhuis)

* unix,win: add uv_library_shutdown() (Ben Noordhuis)

* unix: yield cpu when spinlocking on async handle (Ben Noordhuis)

* win: remove dep on GetQueuedCompletionStatusEx (Colin Finck)

* doc: correct source lines (Shohei YOSHIDA)

* build,android: fix typo (twosee)

* doc: uv_cancel() handles uv_random_t requests (Philip Chimento)

* doc: fix unescaped character (Philip Chimento)

* build,cmake: fix compilation on old MinGW (erw7)

* build: remove unnessesary MSVC warnings (Bartosz Sosnowski)

* win: make uv_udp_init_ex() accept UV_UDP_RECVMMSG (Ben Noordhuis)

* unix: simplify uv__udp_init_ex() (Ben Noordhuis)

* win: remove MAX_PATH limitations (Bartosz Sosnowski)

* build, win: add long path aware manifest (Bartosz Sosnowski)

* doc: check/idle/prepare functions always succeed (Ben Noordhuis)

* darwin: fix build with non-apple compilers (Ben Noordhuis)

* win: support environment variables > 32767 chars (Ben Noordhuis)

* unix: fully initialize struct msghdr (Ben Noordhuis)

* doc: add uv_replace_allocator thread safety warning (twosee)

* unix: fix int overflow when copying large files (Michal Artazov)

* fs: report original error (Bartosz Sosnowski)

* win, fs: add IO_REPARSE_TAG_APPEXECLINK support (Bartosz Sosnowski)

* doc: fix formatting (Ben Noordhuis)

* unix: fix memory leak when uv_loop_init() fails (Anna Henningsen)

* unix: shrink uv_udp_set_source_membership() stack (Ben Noordhuis)

* unix,win: fix wrong sizeof argument to memcpy() (Ben Noordhuis)

* build: check for libraries not provided by libc (Jeroen Roovers)

* doc: fix the order of arguments to calloc() (MasterDuke17)

* unix: don't abort when getrlimit() fails (Ben Noordhuis)

* test: support common user profile on IBMi (Xu Meng)

* build: test on more platforms via QEMU in CI (gengjiawen)


2020.04.20, Version 1.37.0 (Stable), 02a9e1be252b623ee032a3137c0b0c94afbe6809

Changes since version 1.36.0:
Expand Down

0 comments on commit 393c642

Please sign in to comment.