Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Clang 17 (from Dart SDK) CI coverage #135

Merged
merged 5 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/native_toolchain_c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: dart
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"SDK smoke test"? We already have one workflow in this repo names 'dart'.

permissions: read-all

on:
pull_request:
branches: [main]
paths:
- ".github/workflows/native_toolchain_c.yaml"
- "pkgs/native_toolchain_c/**"
push:
branches: [main]
paths:
- ".github/workflows/native_toolchain_c.yaml"
- "pkgs/native_toolchain_c/**"
schedule:
- cron: "0 0 * * 0" # weekly

jobs:
clang-bleeding-edge:
strategy:
matrix:
os: [ubuntu]
sdk: [stable]
package: [native_toolchain_c]

runs-on: ${{ matrix.os }}-latest

defaults:
run:
working-directory: pkgs/${{ matrix.package }}

steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744

- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: ${{ matrix.sdk }}

- uses: nttld/setup-ndk@dbacc5871a0fac6eef9a09d2ca86bc8bf79432c3
with:
ndk-version: r25b
if: ${{ matrix.sdk == 'stable' }}

- run: dart pub get

- name: Install native toolchains
run: sudo apt-get update && sudo apt-get install gcc-i686-linux-gnu gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
if: ${{ matrix.sdk == 'stable' && matrix.os == 'ubuntu' }}

- run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- run: echo "$PWD/depot_tools" >> $GITHUB_PATH
- run: mkdir dart-sdk
- run: cd dart-sdk && fetch --no-history dart
- run: ./dart-sdk/sdk/buildtools/linux-x64/clang/bin/clang --version
dcharkes marked this conversation as resolved.
Show resolved Hide resolved
- run: echo "./dart-sdk/sdk/buildtools/linux-x64/clang/bin/" >> $GITHUB_PATH
- run: clang --version

- run: dart test
if: ${{ matrix.sdk == 'stable' }}
4 changes: 4 additions & 0 deletions pkgs/native_toolchain_c/lib/src/tool/tool_resolver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ class PathToolResolver extends ToolResolver {
if (process.exitCode == 0) {
final file = File(LineSplitter.split(process.stdout).first);
final uri = File(await file.resolveSymbolicLinks()).uri;
if (uri.pathSegments.last == 'llvm') {
// https://github.com/dart-lang/native/issues/136
return file.uri;
}
return uri;
}
// The exit code for executable not being on the `PATH`.
Expand Down
Loading