diff options
| -rw-r--r-- | .github/workflows/android.yml | 5 | ||||
| -rw-r--r-- | .github/workflows/linux.yml | 25 | ||||
| -rwxr-xr-x | scripts/test | 18 |
3 files changed, 28 insertions, 20 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 5e5cf66..a2faa94 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml | |||
| @@ -27,6 +27,11 @@ jobs: | |||
| 27 | - name: "Checkout repository" | 27 | - name: "Checkout repository" |
| 28 | uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | 28 | uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 29 | 29 | ||
| 30 | - name: "Install build dependencies" | ||
| 31 | run: | | ||
| 32 | sudo apt-get update | ||
| 33 | sudo apt-get install -y cmake ninja-build | ||
| 34 | |||
| 30 | - name: "Run CI script" | 35 | - name: "Run CI script" |
| 31 | run: ./scripts/test | 36 | run: ./scripts/test |
| 32 | env: | 37 | env: |
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 197e894..ad13ed8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml | |||
| @@ -48,8 +48,29 @@ jobs: | |||
| 48 | 48 | ||
| 49 | - name: "Install test dependencies" | 49 | - name: "Install test dependencies" |
| 50 | run: | | 50 | run: | |
| 51 | packages=(cmake ninja-build libio-socket-ssl-perl) | ||
| 52 | case "${{ matrix.arch }}" in | ||
| 53 | mingw32|mingw64) | ||
| 54 | packages+=(mingw-w64) | ||
| 55 | ;; | ||
| 56 | arm32) | ||
| 57 | packages+=(qemu-user-static binfmt-support g++-arm-linux-gnueabihf) | ||
| 58 | ;; | ||
| 59 | arm64) | ||
| 60 | packages+=(qemu-user-static binfmt-support g++-aarch64-linux-gnu) | ||
| 61 | ;; | ||
| 62 | loong64) | ||
| 63 | packages+=(qemu-user-static binfmt-support g++-14-loongarch64-linux-gnu) | ||
| 64 | ;; | ||
| 65 | mips32) | ||
| 66 | packages+=(qemu-user-static binfmt-support g++-mips-linux-gnu) | ||
| 67 | ;; | ||
| 68 | mips64) | ||
| 69 | packages+=(qemu-user-static binfmt-support g++-mips64el-linux-gnuabi64) | ||
| 70 | ;; | ||
| 71 | esac | ||
| 51 | sudo apt-get update | 72 | sudo apt-get update |
| 52 | sudo apt-get install -y libio-socket-ssl-perl | 73 | sudo apt-get install -y "${packages[@]}" |
| 53 | perl -MIO::Socket::SSL::Utils -e 1 | 74 | perl -MIO::Socket::SSL::Utils -e 1 |
| 54 | 75 | ||
| 55 | - name: "Run tests" | 76 | - name: "Run tests" |
| @@ -77,7 +98,7 @@ jobs: | |||
| 77 | - name: "Install test dependencies" | 98 | - name: "Install test dependencies" |
| 78 | run: | | 99 | run: | |
| 79 | sudo apt-get update | 100 | sudo apt-get update |
| 80 | sudo apt-get install -y libio-socket-ssl-perl | 101 | sudo apt-get install -y cmake ninja-build libio-socket-ssl-perl |
| 81 | perl -MIO::Socket::SSL::Utils -e 1 | 102 | perl -MIO::Socket::SSL::Utils -e 1 |
| 82 | 103 | ||
| 83 | - name: "Run tests" | 104 | - name: "Run tests" |
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 | ||
