|
20 | 20 | platform: linux/386
|
21 | 21 | - arch: arm64
|
22 | 22 | platform: linux/arm64
|
| 23 | + # There is a bug in qemu's mremap causing pthread_getattr_np in musl to stuck in a loop on arm. |
| 24 | + # Unless qemu fixes the bug or we get a real linux-arm runner, we cannot build aot-snapshot |
| 25 | + # for arm on CI. So, we create a kernel snapshot for arm build in amd64 container instead. |
| 26 | + # https://gitlab.com/qemu-project/qemu/-/issues/1729 |
23 | 27 | - arch: arm
|
24 |
| - platform: linux/arm/v7 |
| 28 | + platform: linux/amd64 # linux/arm/v7 |
25 | 29 |
|
26 | 30 | steps:
|
27 | 31 | - uses: actions/checkout@v4
|
|
41 | 45 | dart run grinder protobuf
|
42 | 46 | EOF
|
43 | 47 |
|
44 |
| - # https://gitlab.com/qemu-project/qemu/-/issues/1729 |
45 |
| - # |
46 |
| - # There is a bug in qemu's mremap causing pthread_getattr_np in musl to stuck in a loop on arm. |
47 |
| - # Unless qemu fixes the bug or we get a real linux-arm runner, we cannot build aot-snapshot |
48 |
| - # for arm on CI. So, we create a kernel snapshot for arm build in amd64 container instead. |
49 | 48 | - name: Build
|
50 | 49 | run: |
|
51 | 50 | docker run --rm -i \
|
|
60 | 59 | find build -name '*.tar.gz' -print0 | xargs -0 -n 1 -- sh -xc 'mv "$1" "$(echo "$1" | sed -e "s/linux/linux-musl/")"' --
|
61 | 60 | EOF
|
62 | 61 |
|
63 |
| - # The kernel snapshot created for arm in the previous step is bundling a glibc based dart runtime |
64 |
| - # due to how cli_pkg downloads the sdk for building non-native platforms. Therefore we need to |
65 |
| - # replace it with musl-libc based dart runtime to create a working linux-musl-arm package. |
66 |
| - - name: Fix Dart Runtime |
67 |
| - if: matrix.arch == 'arm' |
68 |
| - run: | |
69 |
| - docker run --rm -i \ |
70 |
| - --platform ${{ matrix.platform }} \ |
71 |
| - --volume $PWD:$PWD \ |
72 |
| - --workdir $PWD \ |
73 |
| - ghcr.io/dart-musl/dart <<'EOF' |
74 |
| - set -e |
75 |
| - apk add --no-cache tar |
76 |
| - cd build |
77 |
| - DART_RUNTIME=$(tar -tzf *.tar.gz --wildcards "*/src/dart") |
78 |
| - tar -xzf *.tar.gz |
79 |
| - cp $DART_SDK/bin/dart $DART_RUNTIME |
80 |
| - tar -czf *.tar.gz "$(dirname "$(dirname "$DART_RUNTIME")")" |
81 |
| - EOF |
82 |
| -
|
83 | 62 | - name: Upload Artifact
|
84 | 63 | uses: actions/upload-artifact@v4
|
85 | 64 | with:
|
|
0 commit comments