mirror of
https://github.com/libuv/libuv
synced 2025-03-28 21:13:16 +00:00
build(deps): bump actions/checkout from 3 to 4 (#4490)
Requires updating the android builder, since the arm emulator is deprecated and unavailable now. Switch to using a Github Action plugin instead of a container, so that hopefully future updates will be delivered via that channel instead. Changed the idna test since printf returns EILSEQ for some byte sequences in the format on Android in glibc. We don't fully understand the cause, but we can avoid that by not asking it to reencode the bytes in the current locale settings.
This commit is contained in:
parent
1b084f7bbe
commit
d05744e3ed
69
.github/workflows/CI-unix.yml
vendored
69
.github/workflows/CI-unix.yml
vendored
@ -29,52 +29,51 @@ jobs:
|
|||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: reactnativecommunity/react-native-android:2020-5-20
|
|
||||||
# Work around an issue where the node from actions/checkout is too new
|
|
||||||
# to run inside the long-in-the-tooth react-nactive-android container
|
|
||||||
# image.
|
|
||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
|
||||||
ANDROID_AVD_HOME: /root/.android/avd
|
ANDROID_AVD_HOME: /root/.android/avd
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Envinfo
|
- name: Envinfo
|
||||||
run: npx envinfo
|
run: npx envinfo
|
||||||
- name: Configure android arm64
|
- name: Enable KVM
|
||||||
# see build options you can use in https://developer.android.com/ndk/guides/cmake
|
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
cd build
|
sudo udevadm control --reload-rules
|
||||||
$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 ..
|
sudo udevadm trigger --name-match=kvm
|
||||||
- name: Build android arm64
|
- name: Build and Test
|
||||||
run: |
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
$ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake --build build
|
with:
|
||||||
ls -lh build
|
api-level: 24
|
||||||
- name: Install Android ABI arm64-v8a
|
arch: x86_64
|
||||||
run: |
|
target: google_apis
|
||||||
# TODO: This can be in a pre-built docker image
|
ram-size: 2048M
|
||||||
sdkmanager "build-tools;24.0.3" "platforms;android-24" "system-images;android-24;google_apis;arm64-v8a"
|
emulator-options: -no-audio -no-window -gpu off -no-boot-anim -netdelay none -netspeed full -writable-system -no-snapshot-save -no-snapshot-load -no-snapshot
|
||||||
|
disable-animations: true
|
||||||
|
script: |
|
||||||
|
echo "::group::Configure"
|
||||||
|
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-24
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Start emulator
|
echo "::group::Build"
|
||||||
run: |
|
cmake --build build
|
||||||
echo no | avdmanager create avd -n test -k "system-images;android-24;google_apis;arm64-v8a"
|
|
||||||
|
|
||||||
adb start-server
|
## Correct some ld bugs that cause problems with libuv tests
|
||||||
|
wget "https://github.com/termux/termux-elf-cleaner/releases/download/v2.2.1/termux-elf-cleaner" -P build
|
||||||
|
chmod a+x build/termux-elf-cleaner
|
||||||
|
build/termux-elf-cleaner --api-level 24 ./build/uv_run_tests
|
||||||
|
build/termux-elf-cleaner --api-level 24 ./build/uv_run_tests_a
|
||||||
|
|
||||||
emulator @test -memory 2048 -no-audio -no-window -gpu off -no-snapshot -no-boot-anim -netdelay none -netspeed full -no-snapshot-save -no-snapshot-load -writable-system &
|
adb shell "su 0 setenforce 0" # to allow some syscalls like link, chmod, etc.
|
||||||
|
|
||||||
adb wait-for-device
|
## Push the build and test fixtures to the device
|
||||||
|
adb push build /data/local/tmp
|
||||||
|
adb shell mkdir /data/local/tmp/build/test
|
||||||
|
adb push test/fixtures /data/local/tmp/build/test
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
adb shell "su 0 setenforce 0" # to allow some syscalls like link, chmod, etc.
|
## Run the tests
|
||||||
|
file build/uv_run_tests_a
|
||||||
# Push the build and test fixtures to the device
|
adb shell "cd /data/local/tmp/build && env UV_TEST_TIMEOUT_MULTIPLIER=5 ./uv_run_tests_a"
|
||||||
adb push build /data/local/tmp
|
|
||||||
adb shell mkdir /data/local/tmp/build/test
|
|
||||||
adb push test/fixtures /data/local/tmp/build/test
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
adb shell "cd /data/local/tmp/build ; env UV_TEST_TIMEOUT_MULTIPLIER=5 ./uv_run_tests_a"
|
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -39,7 +39,7 @@ TEST_IMPL(utf8_decode1) {
|
|||||||
|
|
||||||
/* Two-byte sequences. */
|
/* Two-byte sequences. */
|
||||||
p = b;
|
p = b;
|
||||||
snprintf(b, sizeof(b), "\xC2\x80\xDF\xBF");
|
snprintf(b, sizeof(b), "%s", "\xC2\x80\xDF\xBF");
|
||||||
ASSERT_EQ(128, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ(128, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
ASSERT_PTR_EQ(p, b + 2);
|
ASSERT_PTR_EQ(p, b + 2);
|
||||||
ASSERT_EQ(0x7FF, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ(0x7FF, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
@ -47,7 +47,7 @@ TEST_IMPL(utf8_decode1) {
|
|||||||
|
|
||||||
/* Three-byte sequences. */
|
/* Three-byte sequences. */
|
||||||
p = b;
|
p = b;
|
||||||
snprintf(b, sizeof(b), "\xE0\xA0\x80\xEF\xBF\xBF");
|
snprintf(b, sizeof(b), "%s", "\xE0\xA0\x80\xEF\xBF\xBF");
|
||||||
ASSERT_EQ(0x800, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ(0x800, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
ASSERT_PTR_EQ(p, b + 3);
|
ASSERT_PTR_EQ(p, b + 3);
|
||||||
ASSERT_EQ(0xFFFF, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ(0xFFFF, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
@ -55,7 +55,7 @@ TEST_IMPL(utf8_decode1) {
|
|||||||
|
|
||||||
/* Four-byte sequences. */
|
/* Four-byte sequences. */
|
||||||
p = b;
|
p = b;
|
||||||
snprintf(b, sizeof(b), "\xF0\x90\x80\x80\xF4\x8F\xBF\xBF");
|
snprintf(b, sizeof(b), "%s", "\xF0\x90\x80\x80\xF4\x8F\xBF\xBF");
|
||||||
ASSERT_EQ(0x10000, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ(0x10000, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
ASSERT_PTR_EQ(p, b + 4);
|
ASSERT_PTR_EQ(p, b + 4);
|
||||||
ASSERT_EQ(0x10FFFF, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ(0x10FFFF, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
@ -63,7 +63,7 @@ TEST_IMPL(utf8_decode1) {
|
|||||||
|
|
||||||
/* Four-byte sequences > U+10FFFF; disallowed. */
|
/* Four-byte sequences > U+10FFFF; disallowed. */
|
||||||
p = b;
|
p = b;
|
||||||
snprintf(b, sizeof(b), "\xF4\x90\xC0\xC0\xF7\xBF\xBF\xBF");
|
snprintf(b, sizeof(b), "%s", "\xF4\x90\xC0\xC0\xF7\xBF\xBF\xBF");
|
||||||
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
ASSERT_PTR_EQ(p, b + 4);
|
ASSERT_PTR_EQ(p, b + 4);
|
||||||
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
@ -71,7 +71,7 @@ TEST_IMPL(utf8_decode1) {
|
|||||||
|
|
||||||
/* Overlong; disallowed. */
|
/* Overlong; disallowed. */
|
||||||
p = b;
|
p = b;
|
||||||
snprintf(b, sizeof(b), "\xC0\x80\xC1\x80");
|
snprintf(b, sizeof(b), "%s", "\xC0\x80\xC1\x80");
|
||||||
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
ASSERT_PTR_EQ(p, b + 2);
|
ASSERT_PTR_EQ(p, b + 2);
|
||||||
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
@ -79,7 +79,7 @@ TEST_IMPL(utf8_decode1) {
|
|||||||
|
|
||||||
/* Surrogate pairs; disallowed. */
|
/* Surrogate pairs; disallowed. */
|
||||||
p = b;
|
p = b;
|
||||||
snprintf(b, sizeof(b), "\xED\xA0\x80\xED\xA3\xBF");
|
snprintf(b, sizeof(b), "%s", "\xED\xA0\x80\xED\xA3\xBF");
|
||||||
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
ASSERT_PTR_EQ(p, b + 3);
|
ASSERT_PTR_EQ(p, b + 3);
|
||||||
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
@ -87,7 +87,7 @@ TEST_IMPL(utf8_decode1) {
|
|||||||
|
|
||||||
/* Simply illegal. */
|
/* Simply illegal. */
|
||||||
p = b;
|
p = b;
|
||||||
snprintf(b, sizeof(b), "\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
|
snprintf(b, sizeof(b), "%s", "\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
|
||||||
|
|
||||||
for (i = 1; i <= 8; i++) {
|
for (i = 1; i <= 8; i++) {
|
||||||
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
|
||||||
|
@ -169,6 +169,10 @@ TEST_IMPL(udp_multicast_join) {
|
|||||||
if (r == UV_ENOEXEC)
|
if (r == UV_ENOEXEC)
|
||||||
RETURN_SKIP("No multicast support (likely a firewall issue).");
|
RETURN_SKIP("No multicast support (likely a firewall issue).");
|
||||||
ASSERT_OK(r);
|
ASSERT_OK(r);
|
||||||
|
#if defined(__ANDROID__)
|
||||||
|
/* It returns an ENOSYS error */
|
||||||
|
RETURN_SKIP("Test does not currently work in ANDROID");
|
||||||
|
#endif
|
||||||
|
|
||||||
r = uv_udp_recv_start(&server, alloc_cb, cl_recv_cb);
|
r = uv_udp_recv_start(&server, alloc_cb, cl_recv_cb);
|
||||||
ASSERT_OK(r);
|
ASSERT_OK(r);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user