From 2a5f8950fd2bd45554467d035fd5cd046fda8b06 Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Fri, 28 Apr 2023 11:42:05 -0400 Subject: [PATCH] ci: run tests for 32-bit architectures This commit introduces a 32-bit test run to our Linux CI in an attempt to detect architecture dependent bugs earlier. I was forced to install the i386 packages in a build step becuase they can only be added after enabling the architecture. Also GOARCH=386 does not support the race detector, so I'm not running the tests with race detection enabled for that GOARCH. Signed-off-by: Chris Waldon --- .builds/linux.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.builds/linux.yml b/.builds/linux.yml index 40100791..342b7f46 100644 --- a/.builds/linux.yml +++ b/.builds/linux.yml @@ -3,6 +3,7 @@ image: debian/testing packages: - curl - pkg-config + - gcc-multilib - libwayland-dev - libx11-dev - libx11-xcb-dev @@ -24,11 +25,11 @@ packages: - scrot - sway - grim - - wine - unzip sources: - https://git.sr.ht/~eliasnaur/gio environment: + PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig/:/usr/lib/i386-linux-gnu/pkgconfig/ PATH: /home/build/sdk/go/bin:/usr/bin:/home/build/go/bin:/home/build/android/tools/bin ANDROID_SDK_ROOT: /home/build/android android_sdk_tools_zip: sdk-tools-linux-3859397.zip @@ -56,9 +57,14 @@ tasks: - mirror: | # mirror to github ssh-keyscan github.com > "$HOME"/.ssh/known_hosts && cd gio && git push --mirror "$github_mirror" || echo "failed mirroring" + - add_32bit_arch: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install -y "libwayland-dev:i386" "libx11-dev:i386" "libx11-xcb-dev:i386" "libxkbcommon-dev:i386" "libxkbcommon-x11-dev:i386" "libgles2-mesa-dev:i386" "libegl1-mesa-dev:i386" "libffi-dev:i386" "libvulkan-dev:i386" "libxcursor-dev:i386" - test_gio: | cd gio go test -race ./... + CGO_ENABLED=1 GOARCH=386 go test ./... GOOS=windows go test -exec=wine ./... GOOS=js GOARCH=wasm go build -o /dev/null ./... - install_chrome: | -- 2.45.2