|  | 
| 27 | 27 |           - image: docker.io/library/dart | 
| 28 | 28 |             platform: linux/arm/v7 | 
| 29 | 29 |             target: linux-arm | 
| 30 |  | -          - image: docker.io/library/debian:trixie-slim | 
|  | 30 | +          - image: docker.io/library/dart | 
| 31 | 31 |             platform: linux/riscv64 | 
| 32 | 32 |             target: linux-riscv64 | 
| 33 | 33 |           - image: ghcr.io/dart-musl/dart | 
|  | 
| 65 | 65 |         run: docker run --privileged --rm registry.fedoraproject.org/fedora-minimal /bin/sh -c "microdnf install --assumeyes --nodocs --setopt=install_weak_deps=False qemu-user-static systemd-udev && mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc && /usr/lib/systemd/systemd-binfmt --unregister && /usr/lib/systemd/systemd-binfmt" | 
| 66 | 66 | 
 | 
| 67 | 67 |       - name: Build | 
| 68 |  | -        if: matrix.image != 'ghcr.io/dart-android/dart' && matrix.image != 'docker.io/library/debian:trixie-slim' | 
|  | 68 | +        if: matrix.image != 'ghcr.io/dart-android/dart' | 
| 69 | 69 |         run: | | 
| 70 | 70 |           docker run --rm -i \ | 
| 71 | 71 |                      --platform ${{ matrix.platform }} \ | 
|  | 
| 93 | 93 |           dart run grinder pkg-standalone-${{ matrix.target }} | 
| 94 | 94 |           EOF | 
| 95 | 95 | 
 | 
| 96 |  | -      # https://github.com/dart-lang/dart-docker/issues/96#issuecomment-1669860829 | 
| 97 |  | -      # There is no official riscv64 dart container image yet, build on debian:trixie instead. | 
| 98 |  | -      # The setup is adopted from: https://github.com/dart-lang/dart-docker/blob/main/Dockerfile-debian.template | 
| 99 |  | -      - name: Build | 
| 100 |  | -        if: matrix.image == 'docker.io/library/debian:trixie-slim' | 
| 101 |  | -        run: | | 
| 102 |  | -          DART_CHANNEL=stable | 
| 103 |  | -          DART_VERSION=$(curl -fsSL https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/release/latest/VERSION | yq .version) | 
| 104 |  | -          curl -fsSLO "https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/release/$DART_VERSION/sdk/dartsdk-${{ matrix.target }}-release.zip" | 
| 105 |  | -
 | 
| 106 |  | -          docker run --rm -i \ | 
| 107 |  | -                     --platform ${{ matrix.platform }} \ | 
| 108 |  | -                     --volume "$PWD:$PWD" \ | 
| 109 |  | -                     --workdir "$PWD" \ | 
| 110 |  | -                     ${{ matrix.image }} <<'EOF' | 
| 111 |  | -          set -e | 
| 112 |  | -          apt-get update | 
| 113 |  | -          apt-get install -y --no-install-recommends bind9-dnsutils ca-certificates curl git openssh-client unzip | 
| 114 |  | -
 | 
| 115 |  | -          export DART_SDK=/usr/lib/dart | 
| 116 |  | -          export PATH=$DART_SDK/bin:/root/.pub-cache/bin:$PATH | 
| 117 |  | -
 | 
| 118 |  | -          SDK="dartsdk-${{ matrix.target }}-release.zip" | 
| 119 |  | -          unzip "$SDK" && mv dart-sdk "$DART_SDK" && rm "$SDK" | 
| 120 |  | -
 | 
| 121 |  | -          dart pub get | 
| 122 |  | -          dart run grinder pkg-standalone-${{ matrix.target }} | 
| 123 |  | -          EOF | 
| 124 |  | -
 | 
| 125 | 96 |       - name: Generate artifact attestation | 
| 126 | 97 |         if: github.ref_type == 'tag' | 
| 127 | 98 |         uses: actions/attest-build-provenance@v2 | 
|  | 
0 commit comments