Skip to content

bin/build_native.dartdart run dart_bclibc:build_native builds the #7

bin/build_native.dartdart run dart_bclibc:build_native builds the

bin/build_native.dartdart run dart_bclibc:build_native builds the #7

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
# ── Analyze ──────────────────────────────────────────────────────────────────
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: dart pub get
- name: Analyze
run: dart analyze --fatal-infos
# ── Test: Mode 1 — submodule (pub.dev path) ──────────────────────────────────
test-submodule:
name: Test / submodule (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install system deps
run: |
sudo apt-get update -q
sudo apt-get install -y cmake clang
- name: Install Dart/Flutter dependencies
run: dart pub get
- name: Build native library (Mode 1 — submodule)
run: dart run bin/build_native.dart
- name: Run tests
run: dart test
# ── Test: Mode 3 — FetchContent (git dep path) ───────────────────────────────
test-fetchcontent:
name: Test / FetchContent (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# no submodules — simulates `dart pub get` of a git dep
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install system deps
run: |
sudo apt-get update -q
sudo apt-get install -y cmake ninja-build clang
- name: Install Dart/Flutter dependencies
run: dart pub get
- name: Build native library (Mode 3 — FetchContent)
run: |
cmake -S linux -B build/linux -DCMAKE_BUILD_TYPE=Debug -G Ninja
cmake --build build/linux --parallel
- name: Run tests
env:
# TARGET_LINKER_FILE (.so symlink) is what gets bundled; point tests at it
BCLIBC_FFI_PATH: build/linux/_deps/bclibc-build/libbclibc_ffi.so
run: dart test
# ── Test: macOS ───────────────────────────────────────────────────────────────
test-macos:
name: Test / submodule (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install Dart/Flutter dependencies
run: dart pub get
- name: Build native library (Mode 1 — submodule)
run: dart run bin/build_native.dart
- name: Run tests
run: dart test
# ── pub.dev publish dry-run ───────────────────────────────────────────────────
publish-dry-run:
name: pub.dev dry-run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: dart pub get
- name: Publish dry-run
run: dart pub publish --dry-run