Skip to content

Commit d2537a6

Browse files
authored
Build riscv64 on alpine stable with lld 18 from edge (#17)
1 parent 0f2282e commit d2537a6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
runs-on: ubuntu-latest
9090

9191
container:
92-
image: docker.io/library/alpine:${{ matrix.target-arch == 'riscv64' && 'edge' || 'latest' }}
92+
image: docker.io/library/alpine
9393

9494
strategy:
9595
fail-fast: false
@@ -131,6 +131,12 @@ jobs:
131131
run: |
132132
apk add --no-cache -- bash clang curl git gn lld llvm python3
133133
134+
# TODO: remove once lld 18 is available in alpine stable
135+
- name: Install build tools
136+
if: matrix.target-arch == 'riscv64'
137+
run: |
138+
apk upgrade --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/main -- lld
139+
134140
- name: Setup multiarch
135141
run: |
136142
cd "$(mktemp -d)"
@@ -148,13 +154,7 @@ jobs:
148154
- name: Install default sysroots
149155
run: |
150156
cd dart-sdk/sdk
151-
./build/linux/alpine_sysroot_scripts/install-sysroot.sh
152-
153-
- name: Install riscv64 sysroot
154-
if: matrix.target-arch == 'riscv64'
155-
run: |
156-
cd dart-sdk/sdk
157-
./build/linux/alpine_sysroot_scripts/install-sysroot.sh riscv64
157+
./build/linux/alpine_sysroot_scripts/install-sysroot.sh x86_64 x86 aarch64 armv7 riscv64
158158
159159
- name: Build
160160
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
build-args: |
103103
BASEURL=${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}
104104
context: .
105-
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7
105+
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/riscv64
106106
push: ${{ !endsWith(github.ref_name, '.beta') && !endsWith(github.ref_name, '.dev') }}
107107
tags: ${{ steps.docker-metadata.outputs.tags }}
108108
labels: ${{ steps.docker-metadata.outputs.labels }}

0 commit comments

Comments
 (0)