17
17
build-linux :
18
18
runs-on : ubuntu-latest
19
19
steps :
20
- - uses : actions/checkout@v3
20
+ - uses : actions/checkout@v4
21
21
- name : configure
22
22
run : |
23
23
./autogen.sh
@@ -29,33 +29,67 @@ jobs:
29
29
30
30
build-android :
31
31
runs-on : ubuntu-latest
32
- container : reactnativecommunity/react-native-android:2020-5-20
33
- # Work around an issue where the node from actions/checkout is too new
34
- # to run inside the long-in-the-tooth react-nactive-android container
35
- # image.
36
32
env :
37
- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
33
+ ANDROID_AVD_HOME : /root/.android/avd
38
34
steps :
39
- - uses : actions/checkout@v2
35
+ - uses : actions/checkout@v4
40
36
- name : Envinfo
41
37
run : npx envinfo
42
- - name : Configure android arm64
43
- # see build options you can use in https://developer.android.com/ndk/guides/cmake
44
- run : |
45
- mkdir build
46
- cd build
47
- $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 ..
48
- - name : Build android arm64
49
- run : |
50
- $ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake --build build
51
- ls -lh build
38
+ - name : Enable KVM
39
+ run : |
40
+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
41
+ sudo udevadm control --reload-rules
42
+ sudo udevadm trigger --name-match=kvm
43
+ - name : Build and Test
44
+ uses : reactivecircus/android-emulator-runner@v2
45
+ with :
46
+ api-level : 24
47
+ arch : x86_64
48
+ target : google_apis
49
+ ram-size : 2048M
50
+ 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
51
+ disable-animations : true
52
+ script : |
53
+ echo "::group::Configure"
54
+ 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
55
+ echo "::endgroup::"
56
+
57
+ echo "::group::Build"
58
+ cmake --build build
59
+
60
+ ## Correct some ld bugs that cause problems with libuv tests
61
+ wget "https://github.com/termux/termux-elf-cleaner/releases/download/v2.2.1/termux-elf-cleaner" -P build
62
+ chmod a+x build/termux-elf-cleaner
63
+ build/termux-elf-cleaner --api-level 24 ./build/uv_run_tests
64
+ build/termux-elf-cleaner --api-level 24 ./build/uv_run_tests_a
65
+
66
+ adb shell "su 0 setenforce 0" # to allow some syscalls like link, chmod, etc.
67
+
68
+ ## Push the build and test fixtures to the device
69
+ adb push build /data/local/tmp
70
+ adb shell mkdir /data/local/tmp/build/test
71
+ adb push test/fixtures /data/local/tmp/build/test
72
+ echo "::endgroup::"
73
+
74
+ ## Run the tests
75
+ file build/uv_run_tests_a
76
+ adb shell "cd /data/local/tmp/build && env UV_TEST_TIMEOUT_MULTIPLIER=5 ./uv_run_tests_a"
52
77
53
78
build-macos :
54
- runs-on : macos-12
79
+ runs-on : ${{ matrix.os }}
80
+ strategy :
81
+ fail-fast : false
82
+ matrix :
83
+ os : [macos-13, macos-14]
55
84
steps :
56
85
- uses : actions/checkout@v4
57
86
- name : Envinfo
58
87
run : npx envinfo
88
+ - name : Disable Firewall
89
+ run : |
90
+ /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
91
+ sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 0
92
+ /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
59
93
- name : Setup
60
94
run : |
61
95
brew install ninja automake libtool
@@ -86,7 +120,11 @@ jobs:
86
120
make -C build-auto -j4
87
121
88
122
build-ios :
89
- runs-on : macos-12
123
+ runs-on : ${{ matrix.os }}
124
+ strategy :
125
+ fail-fast : false
126
+ matrix :
127
+ os : [macos-13, macos-14]
90
128
steps :
91
129
- uses : actions/checkout@v4
92
130
- name : Configure
@@ -100,45 +138,36 @@ jobs:
100
138
ls -lh build-ios
101
139
102
140
build-cross-qemu :
103
- runs-on : ubuntu-latest
141
+ runs-on : ubuntu-24.04
104
142
name : build-cross-qemu-${{ matrix.config.target }}
105
143
106
144
strategy :
107
145
fail-fast : false
108
146
matrix :
109
147
config :
110
- - {target: arm, toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm-static }
111
- - {target: armhf, toolchain: gcc-arm-linux-gnueabihf, cc: arm-linux-gnueabihf-gcc, qemu: qemu-arm-static }
112
- - {target: aarch64, toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64-static }
113
- - {target: riscv64, toolchain: gcc-riscv64-linux-gnu, cc: riscv64-linux-gnu-gcc, qemu: qemu-riscv64-static }
114
- - {target: ppc, toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc-static }
115
- - {target: ppc64, toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static }
116
- - {target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, cc: powerpc64le-linux-gnu-gcc, qemu: qemu-ppc64le-static }
117
- - {target: s390x, toolchain: gcc-s390x-linux-gnu, cc: s390x-linux-gnu-gcc, qemu: qemu-s390x-static }
118
- - {target: mips, toolchain: gcc-mips-linux-gnu, cc: mips-linux-gnu-gcc, qemu: qemu-mips-static }
119
- - {target: mips64, toolchain: gcc-mips64-linux-gnuabi64, cc: mips64-linux-gnuabi64-gcc, qemu: qemu-mips64-static }
120
- - {target: mipsel, toolchain: gcc-mipsel-linux-gnu, cc: mipsel-linux-gnu-gcc, qemu: qemu-mipsel-static }
121
- - {target: mips64el,toolchain: gcc-mips64el-linux-gnuabi64, cc: mips64el-linux-gnuabi64-gcc,qemu: qemu-mips64el-static }
122
- - {target: arm (u64 slots), toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm-static }
123
- - {target: aarch64 (u64 slots), toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64-static }
124
- - {target: ppc (u64 slots), toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc-static }
125
- - {target: ppc64 (u64 slots), toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static }
148
+ - {target: arm, toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm }
149
+ - {target: armhf, toolchain: gcc-arm-linux-gnueabihf, cc: arm-linux-gnueabihf-gcc, qemu: qemu-arm }
150
+ - {target: aarch64, toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64 }
151
+ - {target: riscv64, toolchain: gcc-riscv64-linux-gnu, cc: riscv64-linux-gnu-gcc, qemu: qemu-riscv64 }
152
+ - {target: ppc, toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc }
153
+ - {target: ppc64, toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64 }
154
+ - {target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, cc: powerpc64le-linux-gnu-gcc, qemu: qemu-ppc64le }
155
+ - {target: s390x, toolchain: gcc-s390x-linux-gnu, cc: s390x-linux-gnu-gcc, qemu: qemu-s390x }
156
+ - {target: mips, toolchain: gcc-mips-linux-gnu, cc: mips-linux-gnu-gcc, qemu: qemu-mips }
157
+ - {target: mips64, toolchain: gcc-mips64-linux-gnuabi64, cc: mips64-linux-gnuabi64-gcc, qemu: qemu-mips64 }
158
+ - {target: mipsel, toolchain: gcc-mipsel-linux-gnu, cc: mipsel-linux-gnu-gcc, qemu: qemu-mipsel }
159
+ - {target: mips64el, toolchain: gcc-mips64el-linux-gnuabi64, cc: mips64el-linux-gnuabi64-gcc,qemu: qemu-mips64el }
160
+ - {target: arm (u64 slots), toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm }
161
+ - {target: aarch64 (u64 slots), toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64 }
162
+ - {target: ppc (u64 slots), toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc }
163
+ - {target: ppc64 (u64 slots), toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64 }
126
164
127
165
steps :
128
- - uses : actions/checkout@v2
129
- - name : Install QEMU
130
- # this ensure install latest qemu on ubuntu, apt get version is old
131
- env :
132
- QEMU_SRC : " http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu"
133
- QEMU_VER : " qemu-user-static_7\\ .2+dfsg-.*_amd64.deb$"
134
- run : |
135
- DEB=`curl -s $QEMU_SRC/ | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $QEMU_VER | tail -1`
136
- wget $QEMU_SRC/$DEB
137
- sudo dpkg -i $DEB
138
- - name : Install ${{ matrix.config.toolchain }}
166
+ - uses : actions/checkout@v4
167
+ - name : Install qemu and ${{ matrix.config.toolchain }}
139
168
run : |
140
169
sudo apt update
141
- sudo apt install ${{ matrix.config.toolchain }} -y
170
+ sudo apt install qemu-user qemu-user-binfmt ${{ matrix.config.toolchain }} -y
142
171
- name : Configure with ${{ matrix.config.cc }}
143
172
run : |
144
173
mkdir build
0 commit comments