Skip to content

Commit e0d2ef7

Browse files
committed
feature<v1.x-udt>: merge v1.x mainline
2 parents fb0338b + 7b84d5b commit e0d2ef7

File tree

365 files changed

+17866
-9153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

365 files changed

+17866
-9153
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
If you want to report a bug, you are in the right place!
33
44
If you need help or have a question, go here:
5-
https://github.com/libuv/help/issues/new
5+
https://github.com/libuv/libuv/discussions
66
77
If you are reporting a libuv test failure, please ensure that you are not
88
running the test as root.

.github/stale.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Number of days of inactivity before an issue becomes stale
2-
daysUntilStale: 21
2+
daysUntilStale: 28
33
# Number of days of inactivity before a stale issue is closed
44
# Set to false to disable. If disabled, issues still need to be closed
55
# manually, but will remain marked as stale.
6-
daysUntilClose: 120
6+
daysUntilClose: false
77
# Issues with these labels will never be considered stale
88
exemptLabels:
99
- v2
@@ -18,7 +18,6 @@ staleLabel: stale
1818
# Comment to post when marking an issue as stale. Set to `false` to disable
1919
markComment: >
2020
This issue has been automatically marked as stale because it has not had
21-
recent activity. It will be closed if no further activity occurs. Thank you
22-
for your contributions.
21+
recent activity. Thank you for your contributions.
2322
# Comment to post when closing a stale issue. Set to `false` to disable
2423
closeComment: false

.github/workflows/CI-docs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI-docs
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docs/**'
7+
- '!docs/code/**'
8+
- '.github/workflows/CI-docs.yml'
9+
10+
jobs:
11+
docs-src:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.9'
18+
cache: 'pip' # caching pip dependencies
19+
- run: pip install -r docs/requirements.txt
20+
- name: html
21+
run: |
22+
make -C docs html
23+
- name: linkcheck
24+
run: |
25+
make -C docs linkcheck

.github/workflows/CI-sample.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: ci-sample
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**'
7+
- '!docs/**'
8+
- '!.**'
9+
- '.github/workflows/CI-sample.yml'
10+
push:
11+
branches:
12+
- v[0-9].*
13+
- master
14+
15+
jobs:
16+
build:
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [macos-latest, ubuntu-latest, windows-latest]
21+
runs-on: ${{matrix.os}}
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: setup
25+
run: cmake -E make_directory ${{runner.workspace}}/libuv/docs/code/build
26+
- name: configure
27+
# you may like use Ninja on unix-like OS, but for windows, the only easy way is to use Visual Studio if you want Ninja
28+
run: cmake ..
29+
working-directory: ${{runner.workspace}}/libuv/docs/code/build
30+
- name: build
31+
run: cmake --build .
32+
working-directory: ${{runner.workspace}}/libuv/docs/code/build

.github/workflows/CI-unix.yml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
name: CI-unix
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**'
7+
- '!docs/**'
8+
- '!src/win/**'
9+
- '!.**'
10+
- '.github/workflows/CI-unix.yml'
11+
push:
12+
branches:
13+
- v[0-9].*
14+
- master
15+
16+
jobs:
17+
build-linux:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: configure
22+
run: |
23+
./autogen.sh
24+
mkdir build
25+
(cd build && ../configure)
26+
- name: distcheck
27+
run: |
28+
make -C build distcheck
29+
30+
build-android:
31+
runs-on: ubuntu-latest
32+
container: reactnativecommunity/react-native-android:2020-5-20
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Envinfo
36+
run: npx envinfo
37+
- name: Configure android arm64
38+
# see build options you can use in https://developer.android.com/ndk/guides/cmake
39+
run: |
40+
mkdir build
41+
cd build
42+
$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-24 ..
43+
- name: Build android arm64
44+
run: |
45+
$ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake --build build
46+
ls -lh build
47+
48+
build-macos:
49+
runs-on: macos-11
50+
steps:
51+
- uses: actions/checkout@v2
52+
- name: Envinfo
53+
run: npx envinfo
54+
- name: Setup
55+
run: |
56+
brew install ninja automake libtool
57+
- name: Configure
58+
run: |
59+
mkdir build
60+
cd build
61+
cmake .. -DBUILD_TESTING=ON -G Ninja
62+
- name: Build
63+
run: |
64+
cmake --build build
65+
ls -lh
66+
- name: platform_output
67+
run: |
68+
./build/uv_run_tests platform_output
69+
- name: platform_output_a
70+
run: |
71+
./build/uv_run_tests_a platform_output
72+
- name: Test
73+
run: |
74+
cd build && ctest -V
75+
- name: Autotools configure
76+
if: always()
77+
run: |
78+
./autogen.sh
79+
mkdir build-auto
80+
(cd build-auto && ../configure)
81+
make -C build-auto -j4
82+
83+
build-ios:
84+
runs-on: macos-11
85+
steps:
86+
- uses: actions/checkout@v2
87+
- name: Configure
88+
run: |
89+
mkdir build-ios
90+
cd build-ios
91+
cmake .. -GXcode -DCMAKE_SYSTEM_NAME:STRING=iOS -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED:BOOL=NO -DCMAKE_CONFIGURATION_TYPES:STRING=Release
92+
- name: Build
93+
run: |
94+
cmake --build build-ios
95+
ls -lh build-ios
96+
97+
build-cross-qemu:
98+
runs-on: ubuntu-latest
99+
name: build-cross-qemu-${{ matrix.config.target }}
100+
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
config:
105+
- {target: arm, toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm-static }
106+
- {target: armhf, toolchain: gcc-arm-linux-gnueabihf, cc: arm-linux-gnueabihf-gcc, qemu: qemu-arm-static }
107+
- {target: aarch64, toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64-static }
108+
- {target: riscv64, toolchain: gcc-riscv64-linux-gnu, cc: riscv64-linux-gnu-gcc, qemu: qemu-riscv64-static }
109+
- {target: ppc, toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc-static }
110+
- {target: ppc64, toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static }
111+
- {target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, cc: powerpc64le-linux-gnu-gcc, qemu: qemu-ppc64le-static }
112+
- {target: s390x, toolchain: gcc-s390x-linux-gnu, cc: s390x-linux-gnu-gcc, qemu: qemu-s390x-static }
113+
- {target: mips, toolchain: gcc-mips-linux-gnu, cc: mips-linux-gnu-gcc, qemu: qemu-mips-static }
114+
- {target: mips64, toolchain: gcc-mips64-linux-gnuabi64, cc: mips64-linux-gnuabi64-gcc, qemu: qemu-mips64-static }
115+
- {target: mipsel, toolchain: gcc-mipsel-linux-gnu, cc: mipsel-linux-gnu-gcc, qemu: qemu-mipsel-static }
116+
- {target: mips64el,toolchain: gcc-mips64el-linux-gnuabi64, cc: mips64el-linux-gnuabi64-gcc,qemu: qemu-mips64el-static }
117+
- {target: arm (u64 slots), toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm-static}
118+
- {target: aarch64 (u64 slots), toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64-static}
119+
- {target: ppc (u64 slots), toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc-static}
120+
- {target: ppc64 (u64 slots), toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static}
121+
122+
steps:
123+
- uses: actions/checkout@v2
124+
- name: Install QEMU
125+
# this ensure install latest qemu on ubuntu, apt get version is old
126+
env:
127+
QEMU_SRC: "http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu"
128+
QEMU_VER: "qemu-user-static_7\\.0+dfsg-.*_amd64.deb$"
129+
run: |
130+
DEB=`curl -s $QEMU_SRC/ | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $QEMU_VER | tail -1`
131+
wget $QEMU_SRC/$DEB
132+
sudo dpkg -i $DEB
133+
- name: Install ${{ matrix.config.toolchain }}
134+
run: |
135+
sudo apt update
136+
sudo apt install ${{ matrix.config.toolchain }} -y
137+
- name: Configure with ${{ matrix.config.cc }}
138+
run: |
139+
mkdir build
140+
cd build
141+
cmake .. -DBUILD_TESTING=ON -DQEMU=ON -DCMAKE_C_COMPILER=${{ matrix.config.cc }}
142+
- name: Build
143+
run: |
144+
cmake --build build
145+
ls -lh build
146+
- name: Test
147+
run: |
148+
${{ matrix.config.qemu }} build/uv_run_tests_a
149+
150+
build-bsd:
151+
timeout-minutes: 30
152+
runs-on: ${{ matrix.config.runner }}
153+
name: build-${{ matrix.config.os }}-${{ matrix.config.version }}
154+
155+
strategy:
156+
fail-fast: false
157+
matrix:
158+
config:
159+
# The OS versions supported are specific to the version of the action
160+
# https://github.com/cross-platform-actions/action/blob/master/changelog.md
161+
- { os: freebsd, version: '13.1', runner: 'ubuntu-latest', install: 'pkg install -y' }
162+
- { os: openbsd, version: '7.2', runner: 'macos-11', install: 'pkg_add -I' }
163+
164+
steps:
165+
- uses: actions/checkout@v2
166+
167+
- uses: cross-platform-actions/[email protected]
168+
with:
169+
operating_system: ${{ matrix.config.os }}
170+
version: ${{ matrix.config.version }}
171+
run: |
172+
sudo ${{ matrix.config.install }} cmake ninja
173+
sudo hostname -s ci-host
174+
mkdir build
175+
cd build
176+
cmake .. -DBUILD_TESTING=ON -G Ninja
177+
cmake --build .
178+
ls -lh
179+
./uv_run_tests platform_output
180+
./uv_run_tests_a platform_output
181+
ctest -V

.github/workflows/CI-win.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: CI-win
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**'
7+
- '!docs/**'
8+
- '!src/unix/**'
9+
- '!.**'
10+
- '.github/workflows/CI-win.yml'
11+
push:
12+
branches:
13+
- v[0-9].*
14+
- master
15+
16+
jobs:
17+
build-windows:
18+
runs-on: windows-${{ matrix.config.server }}
19+
name: build-${{ join(matrix.config.*, '-') }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
config:
24+
- {toolchain: Visual Studio 16 2019, arch: Win32, server: 2019}
25+
- {toolchain: Visual Studio 16 2019, arch: x64, server: 2019}
26+
- {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022}
27+
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022}
28+
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: ASAN}
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Envinfo
32+
run: npx envinfo
33+
- name: Build
34+
shell: cmd
35+
run:
36+
cmake -S . -B build -DBUILD_TESTING=ON
37+
-G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }}
38+
${{ matrix.config.config == 'ASAN' && '-DASAN=on -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' || '' }}
39+
40+
cmake --build build --config RelWithDebInfo
41+
42+
ls -l build
43+
- name: platform_output
44+
shell: cmd
45+
run:
46+
build\\RelWithDebInfo\\uv_run_tests.exe platform_output
47+
- name: platform_output_a
48+
shell: cmd
49+
run:
50+
build\\RelWithDebInfo\\uv_run_tests_a.exe platform_output
51+
- name: Test
52+
# only valid with libuv-master with the fix for
53+
# https://github.com/libuv/leps/blob/master/005-windows-handles-not-fd.md
54+
if: ${{ matrix.config.config != 'ASAN' }}
55+
shell: cmd
56+
run:
57+
cd build
58+
59+
ctest -C RelWithDebInfo -V
60+
- name: Test only static
61+
if: ${{ matrix.config.config == 'ASAN' }}
62+
shell: cmd
63+
run:
64+
build\\RelWithDebInfo\\uv_run_tests_a.exe
65+
66+
build-mingw:
67+
runs-on: ubuntu-latest
68+
name: build-mingw-${{ matrix.config.arch }}
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
config:
73+
- {arch: i686, server: 2022, libgcc: dw2 }
74+
- {arch: x86_64, server: 2022, libgcc: seh }
75+
steps:
76+
- uses: actions/checkout@v3
77+
- name: Install mingw32 environment
78+
run: |
79+
sudo apt update
80+
sudo apt install mingw-w64 ninja-build -y
81+
- name: Build
82+
run: |
83+
cmake -S . -B build -G Ninja -DHOST_ARCH=${{ matrix.config.arch }} -DBUILD_TESTING=ON -DCMAKE_TOOLCHAIN_FILE=cmake-toolchains/cross-mingw32.cmake
84+
cmake --build build
85+
cmake --install build --prefix "`pwd`/build/usr"
86+
mkdir -p build/usr/test build/usr/bin
87+
cp -av test/fixtures build/usr/test
88+
cp -av build/uv_run_tests_a.exe build/uv_run_tests.exe \
89+
`${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libgcc_s_${{ matrix.config.libgcc }}-1.dll` \
90+
`${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libwinpthread-1.dll` \
91+
`${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libatomic-1.dll` \
92+
build/usr/bin
93+
- name: Upload build artifacts
94+
uses: actions/upload-artifact@v3
95+
with:
96+
name: mingw-${{ matrix.config.arch }}
97+
path: build/usr/**/*
98+
retention-days: 2
99+
100+
test-mingw:
101+
runs-on: windows-${{ matrix.config.server }}
102+
name: test-mingw-${{ matrix.config.arch }}
103+
needs: build-mingw
104+
strategy:
105+
fail-fast: false
106+
matrix:
107+
config:
108+
- {arch: i686, server: 2022}
109+
- {arch: x86_64, server: 2022}
110+
steps:
111+
- name: Download build artifacts
112+
uses: actions/download-artifact@v2
113+
with:
114+
name: mingw-${{ matrix.config.arch }}
115+
- name: Test
116+
shell: cmd
117+
run: |
118+
bin\uv_run_tests_a.exe
119+
- name: Test
120+
shell: cmd
121+
run: |
122+
bin\uv_run_tests.exe

0 commit comments

Comments
 (0)