Skip to content

Commit 3a8a618

Browse files
committed
Merge branch 'main' of github.com:sass/dart-sass into feature.color-4
2 parents c91178d + c8d0643 commit 3a8a618

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2296
-998
lines changed

.github/util/initialize/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Initialize
22
description: Check out Dart Sass and build the embedded protocol buffer.
33
inputs:
44
github-token: {required: true}
5-
node-version: {required: false, default: 18}
5+
node-version: {required: false, default: 'lts/*'}
66
dart-sdk: {required: false, default: stable}
77
architecture: {required: false}
88
runs:
@@ -13,7 +13,7 @@ runs:
1313
sdk: "${{ inputs.dart-sdk }}"
1414
architecture: "${{ inputs.architecture }}"
1515

16-
- uses: actions/setup-node@v3
16+
- uses: actions/setup-node@v4
1717
with:
1818
node-version: "${{ inputs.node-version }}"
1919

@@ -23,7 +23,7 @@ runs:
2323
- run: npm install
2424
shell: bash
2525

26-
- uses: bufbuild/buf-setup-action@v1.13.1
26+
- uses: bufbuild/buf-setup-action@v1.30.0
2727
with: {github_token: "${{ inputs.github-token }}"}
2828

2929
- name: Check out the language repo

.github/workflows/build-android.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build for android
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- arch: x64
18+
lib: lib64
19+
platform: linux/amd64
20+
- arch: ia32
21+
lib: lib
22+
platform: linux/amd64
23+
- arch: arm64
24+
lib: lib64
25+
platform: linux/arm64
26+
- arch: arm
27+
lib: lib
28+
platform: linux/arm64
29+
# There is no docker image for riscv64 dart-sdk, build kernel snapshot instead.
30+
- arch: riscv64
31+
lib: lib64
32+
platform: linux/amd64 # linux/riscv64
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Set up QEMU
38+
uses: docker/setup-qemu-action@v3
39+
with:
40+
image: tonistiigi/binfmt:master # need qemu >= 7.0.0
41+
42+
- name: Compile Protobuf
43+
run: |
44+
docker run --rm -i \
45+
--volume "$PWD:$PWD" \
46+
--workdir "$PWD" \
47+
docker.io/library/dart <<'EOF'
48+
set -e
49+
curl -fsSL -H "Authorization: Bearer ${{ github.token }}" "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m).tar.gz" | tar -xzC /usr/local --strip-components 1
50+
dart pub get
51+
dart run grinder protobuf
52+
EOF
53+
54+
- name: Build
55+
run: |
56+
docker run --rm -i \
57+
--platform ${{ matrix.platform }} \
58+
--privileged \
59+
--volume "$PWD:$PWD" \
60+
--workdir "$PWD" \
61+
ghcr.io/dart-android/dart <<'EOF'
62+
set -e
63+
export DART_SDK=/system/${{ matrix.lib }}/dart
64+
export PATH=$DART_SDK/bin:$PATH
65+
dart pub get
66+
dart run grinder pkg-standalone-android-${{ matrix.arch }}
67+
EOF
68+
69+
- name: Upload Artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: build-android-${{ matrix.arch }}
73+
path: build/*.tar.gz
74+
if-no-files-found: error
75+
compression-level: 0
+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build for linux-musl
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- arch: x64
18+
platform: linux/amd64
19+
- arch: ia32
20+
platform: linux/386
21+
- arch: arm64
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
27+
- arch: arm
28+
platform: linux/amd64 # linux/arm/v7
29+
# There is no docker image for riscv64 dart-sdk, build kernel snapshot instead.
30+
- arch: riscv64
31+
platform: linux/amd64 # linux/riscv64
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Set up QEMU
37+
uses: docker/setup-qemu-action@v3
38+
39+
- name: Compile Protobuf
40+
run: |
41+
docker run --rm -i \
42+
--volume "$PWD:$PWD" \
43+
--workdir "$PWD" \
44+
docker.io/library/dart <<'EOF'
45+
set -e
46+
curl -fsSL -H "Authorization: Bearer ${{ github.token }}" "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m).tar.gz" | tar -xzC /usr/local --strip-components 1
47+
dart pub get
48+
dart run grinder protobuf
49+
EOF
50+
51+
- name: Build
52+
run: |
53+
docker run --rm -i \
54+
--platform ${{ matrix.arch == 'arm' && 'linux/amd64' || matrix.platform }} \
55+
--volume "$PWD:$PWD" \
56+
--workdir "$PWD" \
57+
ghcr.io/dart-musl/dart <<'EOF'
58+
set -e
59+
dart pub get
60+
dart run grinder pkg-standalone-linux-${{ matrix.arch }}-musl
61+
EOF
62+
63+
- name: Upload Artifact
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: build-linux-musl-${{ matrix.arch }}
67+
path: build/*.tar.gz
68+
if-no-files-found: error
69+
compression-level: 0

.github/workflows/build-linux.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build for linux
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- arch: x64
18+
platform: linux/amd64
19+
- arch: ia32
20+
platform: linux/amd64
21+
- arch: arm
22+
platform: linux/arm/v7
23+
- arch: arm64
24+
platform: linux/arm64
25+
# There is no docker image for riscv64 dart-sdk, build kernel snapshot instead.
26+
# https://github.com/dart-lang/dart-docker/issues/96#issuecomment-1669860829
27+
- arch: riscv64
28+
platform: linux/amd64 # linux/riscv64
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Set up QEMU
34+
uses: docker/setup-qemu-action@v3
35+
36+
- name: Compile Protobuf
37+
run: |
38+
docker run --rm -i \
39+
--volume "$PWD:$PWD" \
40+
--workdir "$PWD" \
41+
docker.io/library/dart <<'EOF'
42+
set -e
43+
curl -fsSL -H "Authorization: Bearer ${{ github.token }}" "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m).tar.gz" | tar -xzC /usr/local --strip-components 1
44+
dart pub get
45+
dart run grinder protobuf
46+
EOF
47+
48+
- name: Build
49+
run: |
50+
docker run --rm -i \
51+
--platform ${{ matrix.platform }} \
52+
--volume "$PWD:$PWD" \
53+
--workdir "$PWD" \
54+
docker.io/library/dart:latest <<'EOF'
55+
set -e
56+
dart pub get
57+
dart run grinder pkg-standalone-linux-${{ matrix.arch }}
58+
EOF
59+
60+
- name: Upload Artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: build-linux-${{ matrix.arch }}
64+
path: build/*.tar.gz
65+
if-no-files-found: error
66+
compression-level: 0

.github/workflows/build-macos.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build for macos
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
11+
runs-on: ${{ matrix.runner }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- arch: x64
18+
runner: macos-13
19+
- arch: arm64
20+
runner: macos-14
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: ./.github/util/initialize
26+
with: {github-token: "${{ github.token }}"}
27+
28+
- name: Build
29+
run: dart run grinder pkg-standalone-macos-${{ matrix.arch }}
30+
31+
- name: Upload Artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: build-macos-${{ matrix.arch }}
35+
path: build/*.tar.gz
36+
if-no-files-found: error
37+
compression-level: 0

.github/workflows/build-windows.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build for windows
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
11+
runs-on: ${{ matrix.runner }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- arch: x64
18+
runner: windows-latest
19+
- arch: ia32
20+
runner: windows-latest
21+
- arch: arm64
22+
runner: windows-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: ./.github/util/initialize
28+
with: {github-token: "${{ github.token }}"}
29+
30+
- name: Build
31+
run: dart run grinder pkg-standalone-windows-${{ matrix.arch }}
32+
33+
- name: Upload Artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: build-windows-${{ matrix.arch }}
37+
path: build/*.zip
38+
if-no-files-found: error
39+
compression-level: 0

0 commit comments

Comments
 (0)