diff options
| author | Kenjiro Nakayama <nakayamakenjiro@gmail.com> | 2026-08-08 16:01:21 +0900 |
|---|---|---|
| committer | Kenjiro Nakayama <nakayamakenjiro@gmail.com> | 2026-08-08 16:35:19 +0900 |
| commit | 71aba26edb2c3951c5c9f9fcb2ae3bb40ac291c6 (patch) | |
| tree | 2a18718c23ce741a32f7df214c720ad0d084dda2 /scripts | |
| parent | 8430c1d169b83d5bfef4651e4bdacc8925dce2d1 (diff) | |
| download | portable-71aba26edb2c3951c5c9f9fcb2ae3bb40ac291c6.tar.gz portable-71aba26edb2c3951c5c9f9fcb2ae3bb40ac291c6.tar.bz2 portable-71aba26edb2c3951c5c9f9fcb2ae3bb40ac291c6.zip | |
Install CI dependencies in workflows
Move APT package installation from scripts/test to the CI workflows.
Build the Linux package list based on the target architecture so that CMake,
Ninja, QEMU, and the required cross-compilers are installed together. This
makes the packages required by each target explicit and avoids repeated
apt-get operations within each CI job.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/test | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/scripts/test b/scripts/test index 2148d52..0e84b22 100755 --- a/scripts/test +++ b/scripts/test | |||
| @@ -41,11 +41,6 @@ setup_cross_compiler() { | |||
| 41 | echo "##### Using $($CC --version | head -n 1)" | 41 | echo "##### Using $($CC --version | head -n 1)" |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | if type apt-get >/dev/null 2>&1; then | ||
| 45 | sudo apt-get update | ||
| 46 | sudo apt-get install -y cmake ninja-build | ||
| 47 | fi | ||
| 48 | |||
| 49 | # generate source tree | 44 | # generate source tree |
| 50 | ./autogen.sh | 45 | ./autogen.sh |
| 51 | 46 | ||
| @@ -122,10 +117,6 @@ elif [ "$ARCH" = "mingw32" ] || [ "$ARCH" = "mingw64" ]; then | |||
| 122 | CPU=x86_64 | 117 | CPU=x86_64 |
| 123 | fi | 118 | fi |
| 124 | 119 | ||
| 125 | if ! type i686-w64-mingw32-gcc > /dev/null; then | ||
| 126 | sudo apt-get install -y mingw-w64 | ||
| 127 | fi | ||
| 128 | |||
| 129 | ./configure --host=$CPU-w64-mingw32 | 120 | ./configure --host=$CPU-w64-mingw32 |
| 130 | make -j 4 | 121 | make -j 4 |
| 131 | 122 | ||
| @@ -145,17 +136,13 @@ elif [ "$ARCH" = "mingw32" ] || [ "$ARCH" = "mingw64" ]; then | |||
| 145 | ) | 136 | ) |
| 146 | 137 | ||
| 147 | elif [ "$ARCH" = "arm32" ] || [ "$ARCH" = "arm64" ]; then | 138 | elif [ "$ARCH" = "arm32" ] || [ "$ARCH" = "arm64" ]; then |
| 148 | sudo apt-get install -y qemu-user-static binfmt-support | ||
| 149 | |||
| 150 | if [ "$ARCH" = "arm32" ]; then | 139 | if [ "$ARCH" = "arm32" ]; then |
| 151 | sudo apt-get install -y g++-arm-linux-gnueabihf | ||
| 152 | sudo ln -sf /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ | 140 | sudo ln -sf /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ |
| 153 | setup_cross_compiler arm-linux-gnueabihf | 141 | setup_cross_compiler arm-linux-gnueabihf |
| 154 | 142 | ||
| 155 | ./configure --host=arm-linux-gnueabihf | 143 | ./configure --host=arm-linux-gnueabihf |
| 156 | LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib make -j 4 check | 144 | LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib make -j 4 check |
| 157 | else | 145 | else |
| 158 | sudo apt-get install -y g++-aarch64-linux-gnu | ||
| 159 | sudo ln -sf /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ | 146 | sudo ln -sf /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ |
| 160 | setup_cross_compiler aarch64-linux-gnu | 147 | setup_cross_compiler aarch64-linux-gnu |
| 161 | 148 | ||
| @@ -166,7 +153,6 @@ elif [ "$ARCH" = "arm32" ] || [ "$ARCH" = "arm64" ]; then | |||
| 166 | file apps/openssl/openssl | 153 | file apps/openssl/openssl |
| 167 | 154 | ||
| 168 | elif [ "$ARCH" = "loong64" ]; then | 155 | elif [ "$ARCH" = "loong64" ]; then |
| 169 | sudo apt install -y qemu-user-static binfmt-support g++-14-loongarch64-linux-gnu | ||
| 170 | sudo ln -sf /usr/loongarch64-linux-gnu/lib64/ld-linux-loongarch-lp64d.so.1 /lib64 | 156 | sudo ln -sf /usr/loongarch64-linux-gnu/lib64/ld-linux-loongarch-lp64d.so.1 /lib64 |
| 171 | setup_cross_compiler loongarch64-linux-gnu | 157 | setup_cross_compiler loongarch64-linux-gnu |
| 172 | 158 | ||
| @@ -176,17 +162,13 @@ elif [ "$ARCH" = "loong64" ]; then | |||
| 176 | file apps/openssl/openssl | 162 | file apps/openssl/openssl |
| 177 | 163 | ||
| 178 | elif [ "$ARCH" = "mips32" ] || [ "$ARCH" = "mips64" ]; then | 164 | elif [ "$ARCH" = "mips32" ] || [ "$ARCH" = "mips64" ]; then |
| 179 | sudo apt-get install -y qemu-user-static binfmt-support | ||
| 180 | |||
| 181 | if [ "$ARCH" = "mips32" ]; then | 165 | if [ "$ARCH" = "mips32" ]; then |
| 182 | sudo apt-get install -y g++-mips-linux-gnu | ||
| 183 | sudo ln -sf /usr/mips-linux-gnu/lib/ld.so.1 /lib/ | 166 | sudo ln -sf /usr/mips-linux-gnu/lib/ld.so.1 /lib/ |
| 184 | setup_cross_compiler mips-linux-gnu | 167 | setup_cross_compiler mips-linux-gnu |
| 185 | 168 | ||
| 186 | ./configure --host=mips-linux-gnu | 169 | ./configure --host=mips-linux-gnu |
| 187 | LD_LIBRARY_PATH=/usr/mips-linux-gnu/lib make -j 4 check | 170 | LD_LIBRARY_PATH=/usr/mips-linux-gnu/lib make -j 4 check |
| 188 | else | 171 | else |
| 189 | sudo apt-get install -y g++-mips64el-linux-gnuabi64 | ||
| 190 | sudo ln -sf /usr/mips64el-linux-gnuabi64/lib64/ld.so.1 /lib64 | 172 | sudo ln -sf /usr/mips64el-linux-gnuabi64/lib64/ld.so.1 /lib64 |
| 191 | setup_cross_compiler mips64el-linux-gnuabi64 | 173 | setup_cross_compiler mips64el-linux-gnuabi64 |
| 192 | 174 | ||
