Skip to content

Commit

Permalink
upgrade libuv version, also fix compiling error
Browse files Browse the repository at this point in the history
  • Loading branch information
partic2 committed May 9, 2024
1 parent 7059165 commit 0195b96
Show file tree
Hide file tree
Showing 302 changed files with 14,716 additions and 9,462 deletions.
23 changes: 0 additions & 23 deletions .github/stale.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/CI-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI-docs

on:
pull_request:
paths:
- 'docs/**'
- '!docs/code/**'
- '.github/workflows/CI-docs.yml'

jobs:
docs-src:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r docs/requirements.txt
- name: html
run: |
make -C docs html
- name: linkcheck
run: |
make -C docs linkcheck
1 change: 1 addition & 0 deletions .github/workflows/CI-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- '**'
- '!docs/**'
- '!.**'
- 'docs/code/**'
- '.github/workflows/CI-sample.yml'
push:
branches:
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/CI-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ on:
- master

jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: |
./autogen.sh
mkdir build
(cd build && ../configure)
- name: distcheck
run: |
make -C build distcheck
build-android:
runs-on: ubuntu-latest
container: reactnativecommunity/react-native-android:2020-5-20
Expand All @@ -40,7 +53,7 @@ jobs:
run: npx envinfo
- name: Setup
run: |
brew install ninja
brew install ninja automake libtool
- name: Configure
run: |
mkdir build
Expand All @@ -59,6 +72,13 @@ jobs:
- name: Test
run: |
cd build && ctest -V
- name: Autotools configure
if: always()
run: |
./autogen.sh
mkdir build-auto
(cd build-auto && ../configure)
make -C build-auto -j4
build-ios:
runs-on: macos-11
Expand Down Expand Up @@ -94,7 +114,6 @@ jobs:
- {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}
Expand All @@ -106,7 +125,7 @@ jobs:
# 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_7\\.0+dfsg-.*_amd64.deb$"
QEMU_VER: "qemu-user-static_7\\.2+dfsg-.*_amd64.deb$"
run: |
DEB=`curl -s $QEMU_SRC/ | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $QEMU_VER | tail -1`
wget $QEMU_SRC/$DEB
Expand Down
86 changes: 76 additions & 10 deletions .github/workflows/CI-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,105 @@ jobs:
- {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022}
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022}
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: ASAN}
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: UBSAN}
- {toolchain: Visual Studio 17 2022, arch: arm64, server: 2022}
steps:
- uses: actions/checkout@v2
- name: Envinfo
run: npx envinfo
- name: Build
shell: cmd
run:
cmake -S . -B build -DBUILD_TESTING=ON
-G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }}
${{ matrix.config.config == 'ASAN' && '-DASAN=on -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' || '' }}
${{ matrix.config.config == 'ASAN' && '-DASAN=on -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' ||
matrix.config.config == 'UBSAN' && '-DUBSAN=on' || '' }}

cmake --build build --config RelWithDebInfo

${{ matrix.config.config == 'ASAN' && 'Copy-Item -Path "build\\*.exe" -Destination "build\\RelWithDebInfo\\"' || '' }}

${{ matrix.config.config == 'ASAN' && 'Copy-Item -Path "build\\*.dll" -Destination "build\\RelWithDebInfo\\"' || '' }}

ls -l build
- name: platform_output
shell: cmd
run:
build\\RelWithDebInfo\\uv_run_tests.exe platform_output

ls -l build\\RelWithDebInfo
- name: platform_output_a
if: ${{ matrix.config.arch != 'arm64' }}
shell: cmd
run:
build\\RelWithDebInfo\\uv_run_tests_a.exe platform_output
- name: platform_output
if: ${{ matrix.config.arch != 'arm64' }}
shell: cmd
run:
build\\RelWithDebInfo\\uv_run_tests.exe platform_output
- name: Test
# only valid with libuv-master with the fix for
# https://github.com/libuv/leps/blob/master/005-windows-handles-not-fd.md
if: ${{ matrix.config.config != 'ASAN' }}
if: ${{ matrix.config.config != 'ASAN' && matrix.config.arch != 'arm64' }}
shell: cmd
run:
cd build

ctest -C RelWithDebInfo -V
- name: Test only static
if: ${{ matrix.config.config == 'ASAN' }}
if: ${{ matrix.config.config == 'ASAN' && matrix.config.arch != 'arm64' }}
shell: cmd
run:
build\\RelWithDebInfo\\uv_run_tests_a.exe

build-mingw:
runs-on: ubuntu-latest
name: build-mingw-${{ matrix.config.arch }}
strategy:
fail-fast: false
matrix:
config:
- {arch: i686, server: 2022, libgcc: dw2 }
- {arch: x86_64, server: 2022, libgcc: seh }
steps:
- uses: actions/checkout@v3
- name: Install mingw32 environment
run: |
sudo apt update
sudo apt install mingw-w64 ninja-build -y
- name: Build
run: |
cmake -S . -B build -G Ninja -DHOST_ARCH=${{ matrix.config.arch }} -DBUILD_TESTING=ON -DCMAKE_TOOLCHAIN_FILE=cmake-toolchains/cross-mingw32.cmake
cmake --build build
cmake --install build --prefix "`pwd`/build/usr"
mkdir -p build/usr/test build/usr/bin
cp -av test/fixtures build/usr/test
cp -av build/uv_run_tests_a.exe build/uv_run_tests.exe build/uv_run_tests_a_no_ext build/uv_run_tests_no_ext \
`${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libgcc_s_${{ matrix.config.libgcc }}-1.dll` \
`${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libwinpthread-1.dll` \
`${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libatomic-1.dll` \
build/usr/bin
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: mingw-${{ matrix.config.arch }}
path: build/usr/**/*
retention-days: 2

test-mingw:
runs-on: windows-${{ matrix.config.server }}
name: test-mingw-${{ matrix.config.arch }}
needs: build-mingw
strategy:
fail-fast: false
matrix:
config:
- {arch: i686, server: 2022}
- {arch: x86_64, server: 2022}
steps:
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: mingw-${{ matrix.config.arch }}
- name: Test
shell: cmd
run: |
bin\uv_run_tests_a.exe
- name: Test
shell: cmd
run: |
bin\uv_run_tests.exe
80 changes: 78 additions & 2 deletions .github/workflows/sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- master

jobs:
sanitizers:
sanitizers-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
Expand All @@ -23,6 +23,11 @@ jobs:
- name: Envinfo
run: npx envinfo

# [AM]SAN fail on newer kernels due to a bigger PIE slide
- name: Disable ASLR
run: |
sudo sysctl -w kernel.randomize_va_space=0
- name: ASAN Build
run: |
mkdir build-asan
Expand All @@ -47,6 +52,77 @@ jobs:
(cd build-tsan && cmake .. -G Ninja -DBUILD_TESTING=ON -DTSAN=ON -DCMAKE_BUILD_TYPE=Release)
cmake --build build-tsan
- name: TSAN Test
continue-on-error: true # currently permit failures
# Note: path must be absolute because some tests chdir.
# TSan exits with an error when it can't find the file.
run: |
env TSAN_OPTIONS="suppressions=$PWD/tsansupp.txt" ./build-tsan/uv_run_tests_a
- name: UBSAN Build
run: |
mkdir build-ubsan
(cd build-ubsan && cmake .. -G Ninja -DBUILD_TESTING=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang)
cmake --build build-ubsan
- name: UBSAN Test
run: |
./build-ubsan/uv_run_tests_a
sanitizers-macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v2

- name: Envinfo
run: npx envinfo

- name: ASAN Build
run: |
mkdir build-asan
(cd build-asan && cmake .. -DBUILD_TESTING=ON -DASAN=ON -DCMAKE_BUILD_TYPE=Debug)
cmake --build build-asan
- name: ASAN Test
run: |
./build-asan/uv_run_tests_a
- name: TSAN Build
run: |
mkdir build-tsan
(cd build-tsan && cmake .. -DBUILD_TESTING=ON -DTSAN=ON -DCMAKE_BUILD_TYPE=Release)
cmake --build build-tsan
- name: TSAN Test
run: |
./build-tsan/uv_run_tests_a
- name: UBSAN Build
run: |
mkdir build-ubsan
(cd build-ubsan && cmake .. -DBUILD_TESTING=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug)
cmake --build build-ubsan
- name: UBSAN Test
run: |
./build-ubsan/uv_run_tests_a
sanitizers-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Setup
run: |
choco install ninja
# Note: clang shipped with VS2022 has an issue where the UBSAN runtime doesn't link.
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "17"

- name: Envinfo
run: npx envinfo

- name: UBSAN Build
run: |
mkdir build-ubsan
cmake -B build-ubsan -G Ninja -DBUILD_TESTING=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang
cmake --build build-ubsan
- name: UBSAN Test
run: |
./build-ubsan/uv_run_tests_a
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
*.sdf
*.suo
.vs/
.vscode/
*.VC.db
*.VC.opendb
core
.cache
vgcore.*
.buildstamp
.dirstamp
Expand Down Expand Up @@ -74,3 +76,5 @@ cmake-build-debug/

# make dist output
libuv-*.tar.*
/dist.libuv.org/
/libuv-release-tool/
7 changes: 5 additions & 2 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Keno Fischer <[email protected]> <[email protected]>
Keno Fischer <[email protected]> <[email protected]>
Leith Bade <[email protected]> <[email protected]>
Leonard Hecker <[email protected]> <[email protected]>
Lewis Russell <[email protected]> <[email protected]>
Maciej Małecki <[email protected]> <[email protected]>
Marc Schlaich <[email protected]> <[email protected]>
Michael <[email protected]>
Expand All @@ -46,8 +47,8 @@ Sakthipriyan Vairamani <[email protected]>
Sam Roberts <[email protected]> <[email protected]>
San-Tai Hsu <[email protected]>
Santiago Gimeno <[email protected]> <[email protected]>
Saúl Ibarra Corretgé <[email protected]>
Saúl Ibarra Corretgé <[email protected]> <s@saghul.net>
Saúl Ibarra Corretgé <[email protected]>
Saúl Ibarra Corretgé <[email protected]> <saghul@gmail.com>
Shigeki Ohtsu <[email protected]> <[email protected]>
Shuowang (Wayne) Zhang <[email protected]>
TK-one <[email protected]>
Expand All @@ -60,5 +61,7 @@ gengjiawen <[email protected]>
jBarz <[email protected]> <[email protected]>
jBarz <[email protected]> <[email protected]>
ptlomholt <[email protected]>
theanarkh <[email protected]> <[email protected]>
tjarlama <[email protected]> <[email protected]>
ywave620 <[email protected]> <[email protected]>
zlargon <[email protected]>
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ sphinx:
configuration: null
fail_on_warning: false

build:
os: "ubuntu-22.04"
tools:
python: "3.9"

python:
version: 3.8
install:
- requirements: docs/requirements.txt
Loading

0 comments on commit 0195b96

Please sign in to comment.