| # Workflow that runs relevant tests with the clang from the Dart SDK. |
| |
| name: native_toolchain_c |
| 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: |
| dart-sdk-clang: |
| strategy: |
| matrix: |
| os: [ubuntu] |
| sdk: [dev, stable] |
| package: [native_toolchain_c] |
| |
| runs-on: ${{ matrix.os }}-latest |
| |
| defaults: |
| run: |
| working-directory: pkgs/${{ matrix.package }} |
| |
| steps: |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| |
| - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c |
| with: |
| sdk: ${{ matrix.sdk }} |
| |
| - uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 |
| with: |
| ndk-version: r27 |
| |
| - 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 gcc-riscv64-linux-gnu |
| |
| - name: Install rust for pkgs/native_toolchain_c/test/clinker/rust_test.dart |
| uses: actions-rust-lang/setup-rust-toolchain@02be93da58aa71fb456aa9c43b301149248829d8 |
| |
| - 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: echo "./dart-sdk/sdk/buildtools/linux-x64/clang/bin" >> $GITHUB_PATH |
| - run: clang --version |
| |
| - run: dart test |