Skip to content

Commit 88d8a22

Browse files
authored
[CI] Clang 17 (from Dart SDK) CI coverage (#135)
1 parent 2aa6ef6 commit 88d8a22

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: dart
2+
permissions: read-all
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
paths:
8+
- ".github/workflows/native_toolchain_c.yaml"
9+
- "pkgs/native_toolchain_c/**"
10+
push:
11+
branches: [main]
12+
paths:
13+
- ".github/workflows/native_toolchain_c.yaml"
14+
- "pkgs/native_toolchain_c/**"
15+
schedule:
16+
- cron: "0 0 * * 0" # weekly
17+
18+
jobs:
19+
dart-sdk-clang:
20+
strategy:
21+
matrix:
22+
os: [ubuntu]
23+
sdk: [stable]
24+
package: [native_toolchain_c]
25+
26+
runs-on: ${{ matrix.os }}-latest
27+
28+
defaults:
29+
run:
30+
working-directory: pkgs/${{ matrix.package }}
31+
32+
steps:
33+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
34+
35+
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
39+
- uses: nttld/setup-ndk@dbacc5871a0fac6eef9a09d2ca86bc8bf79432c3
40+
with:
41+
ndk-version: r25b
42+
if: ${{ matrix.sdk == 'stable' }}
43+
44+
- run: dart pub get
45+
46+
- name: Install native toolchains
47+
run: sudo apt-get update && sudo apt-get install gcc-i686-linux-gnu gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
48+
if: ${{ matrix.sdk == 'stable' && matrix.os == 'ubuntu' }}
49+
50+
- run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
51+
- run: echo "$PWD/depot_tools" >> $GITHUB_PATH
52+
- run: mkdir dart-sdk
53+
- run: cd dart-sdk && fetch --no-history dart
54+
- run: echo "./dart-sdk/sdk/buildtools/linux-x64/clang/bin" >> $GITHUB_PATH
55+
- run: clang --version
56+
57+
- run: dart test
58+
if: ${{ matrix.sdk == 'stable' }}

pkgs/native_toolchain_c/lib/src/tool/tool_resolver.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ class PathToolResolver extends ToolResolver {
6363
if (process.exitCode == 0) {
6464
final file = File(LineSplitter.split(process.stdout).first);
6565
final uri = File(await file.resolveSymbolicLinks()).uri;
66+
if (uri.pathSegments.last == 'llvm') {
67+
// https://github.com/dart-lang/native/issues/136
68+
return file.uri;
69+
}
6670
return uri;
6771
}
6872
// The exit code for executable not being on the `PATH`.

0 commit comments

Comments
 (0)