From e767128671dae1870ea120d51eb6f923b7224858 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Fri, 19 Jun 2020 11:11:46 +0300 Subject: [PATCH] ci: build test binaries without using Meson --- ci/build.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 2156d3c..084e4a6 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -22,14 +22,24 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -for i in arm-any32-linux-musleabi armeb-any32-linux-musleabi i386-any32-linux-musl mips-any32-linux-musl mipsel-any32-linux-musl +toolchains="arm-any32-linux-musleabi armeb-any32-linux-musleabi i386-any32-linux-musl mips-any32-linux-musl mipsel-any32-linux-musl" + +for i in $toolchains do - meson --cross-file=$i -Dcompression=$1 --buildtype=release -Dci=true build-$1-$i - ninja -C build-$1-$i test_putser + meson --cross-file=$i -Dcompression=$1 --buildtype=release build-$1-$i + ninja -C build-$1-$i /opt/x-tools/$i/bin/$i-strip -s -R.note -R.comment build-$1-$i/papaw install -D -m 755 build-$1-$i/papaw artifacts/papaw-$1-${i%%-*} - install -m 755 build-$1-$i/test_putser artifacts/hello-$1-${i%%-*} done install -m 755 build-$1-arm-any32-linux-musleabi/papawify artifacts/papawify-$1 install -m 755 build-$1-arm-any32-linux-musleabi/unpapawify artifacts/unpapawify-$1 + +for i in $toolchains +do + unset CFLAGS + unset LDFLAGS + . /opt/x-tools/$i/activate + /bin/echo -e "#include \nint main() {puts(\"hello\"); return 0;}" | $i-gcc $CFLAGS -x c -o hello-$i - $LDFLAGS + python3 artifacts/papawify-$1 artifacts/papaw-$1-${i%%-*} hello-$i artifacts/hello-$1-${i%%-*} +done