dub icon indicating copy to clipboard operation
dub copied to clipboard

CI: Add test for building on Alpine Linux / Musl

Open Geod24 opened this issue 5 years ago • 5 comments

Tried to upgrade the Alpine Musl package, realized it was broken. So might as well do this. It also found some issues in the testsuite, so it's an instant win. This will fail the CI, just putting it up there in case someone is interested / has suggestions.

Geod24 avatar Aug 25 '20 11:08 Geod24

There are some issues that should be easy to fix like:

[INFO] Running /root/build/test/issue1773-lint.sh...
Invalid source/import path: /root/.dub/packages/dscanner-0.10.0/dscanner/bin
Invalid source/import path: /root/.dub/packages/dscanner-0.10.0/dscanner/bin
std.process.ProcessException@std/process.d(381): Executable file not found: ldmd2
Command failed with exit code 1: rdmd "/root/.dub/packages/dscanner-0.10.0/dscanner/dubhash.d"
0
[ERROR] /root/build/test/issue1773-lint.sh:7 DUB lint did not find expected warning.
[ERROR] Script failure.
[INFO] Building /root/build/test/issue1408-inherit-linker-files/...
Performing "debug" build using ldc2 for x86_64.
test:dep ~master: building configuration "library"...
Running pre-build commands...
/bin/sh: dub: not found
Command failed with exit code 127: dub build --root="/root/build/test/issue1408-inherit-linker-files/lib"
[ERROR] Build failure.

And others which look like much deeper ones:

[INFO] Running /root/build/test/issue782-gtkd-pkg-config.sh...
/root/build/test
/root/build/bin/dub
Performing "debug" build using dmd for x86_64.
fake-gtkd ~master: building configuration "library"...
Linking...
Performing "debug" build using dmd for x86_64.
fake-gtkd-test ~master: building configuration "application"...
Linking...
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -l:libdl.so.2
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
dmd failed with exit code 1.
[ERROR] /root/build/test/issue782-gtkd-pkg-config.sh:25 command failed
[ERROR] Script failure.

Perhaps you could disable some of the tests for now, so we can get the basic setup merged and then enable them one by one?

PetarKirov avatar Aug 26 '20 05:08 PetarKirov

Going over them tonight, and will fix what I can. I also saw some issues coming from #1987 so I'll resume work on this after those are fixed.

Geod24 avatar Aug 26 '20 06:08 Geod24

Time for a rebase? :P

PetarKirov avatar Aug 27 '20 06:08 PetarKirov

Already done :P That's actually why I self-merged the other PR.

Geod24 avatar Aug 27 '20 06:08 Geod24

Okay, I found the source of those spurious errors.

When we do things like $DUB describe package | grep something | head -n 1, head ends up closing the pipe as soon as it has read a single line, but grep keeps on writing. This close EINIT (141) on the grep side, which triggers a failure with pipefail. Source: https://stackoverflow.com/questions/45195700/curious-case-of-failed-pipe

I don't have words for how absolutely retarded this whole thing is, and how many hours it made us lost. Time to rewrite the test-suite in D.

Geod24 avatar Sep 18 '20 03:09 Geod24

@Geod24 it looks like some tests are still failing (though many are passing). Given that it has been 2 years since this PR had been opened, perhaps we should go with the disable failing tests & fix them later approach? :P

PetarKirov avatar Dec 07 '22 08:12 PetarKirov

@PetarKirov : Well they are all fixed. The issue we are left with is https://issues.dlang.org/show_bug.cgi?id=23157 However that should be fixed since I updated DMD: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/42064

Geod24 avatar Dec 07 '22 10:12 Geod24

As a matter of fact, it was just because the DMD package hadn't propagated yet. This is green now. Time to finally merge it.

Geod24 avatar Dec 07 '22 12:12 Geod24

Awesome, congrats @Geod24 (and everyone else that helped) on getting this through the finish line!

PetarKirov avatar Dec 08 '22 22:12 PetarKirov