Skip to content

fix: revert SDK version to ^3.10.8 in pubspec.yaml #3

fix: revert SDK version to ^3.10.8 in pubspec.yaml

fix: revert SDK version to ^3.10.8 in pubspec.yaml #3

Workflow file for this run

# A workflow for building and releasing prebuilt native assets for fast_image
name: fast_image_prebuild_assets
permissions:
contents: write
on:
pull_request:
branches: [main]
paths:
- .github/workflows/build_release.yaml
- packages/fast_image/
push:
tags:
- "fast_image-assets*"
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
runs-on: ${{ matrix.os }}-latest
defaults:
run:
working-directory: packages/fast_image/
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: main
- uses: dtolnay/rust-toolchain@stable
- uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410
with:
ndk-version: r27
if: ${{ matrix.os == 'ubuntu' }} # Only build on one host.
- name: Install native toolchains
run: sudo apt-get update && sudo apt-get install clang-15 gcc-i686-linux-gnu gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf gcc-riscv64-linux-gnu
if: ${{ matrix.os == 'ubuntu' }}
- name: Install Rust targets (Linux)
if: matrix.os == 'ubuntu'
run: |
rustup target add armv7-linux-androideabi
rustup target add aarch64-linux-android
rustup target add i686-linux-android
rustup target add x86_64-linux-android
rustup target add armv7-unknown-linux-gnueabihf
rustup target add aarch64-unknown-linux-gnu
rustup target add i686-unknown-linux-gnu
rustup target add x86_64-unknown-linux-gnu
- name: Install Rust targets (macOS)
if: matrix.os == 'macos'
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-ios
rustup target add aarch64-apple-ios-sim
rustup target add x86_64-apple-ios
- name: Install Rust targets (Windows)
if: matrix.os == 'windows'
run: |
rustup target add aarch64-pc-windows-msvc
rustup target add x86_64-pc-windows-msvc
# rustup target add i686-pc-windows-msvc
- run: dart pub get
- run: mkdir libs
# Keep this list consistent with packages/fast_image/lib/src/hook/target_versions.dart
- name: Build Linux host
if: matrix.os == 'ubuntu'
run: |
# dart tool/build.dart -oandroid -aia32
# dart tool/build.dart -oandroid -ariscv64
# dart tool/build.dart -olinux -aarm
# dart tool/build.dart -olinux -aia32
# dart tool/build.dart -olinux -ariscv64
dart tool/build.dart -oandroid -aarm
dart tool/build.dart -oandroid -aarm64
dart tool/build.dart -oandroid -ax64
dart tool/build.dart -olinux -aarm64
dart tool/build.dart -olinux -ax64
mv .dart_tool/fast_image/shared/**/target/armv7-linux-androideabi/release/libfastimg.so libs/libfastimg_android_armv7.so
mv .dart_tool/fast_image/shared/**/target/aarch64-linux-android/release/libfastimg.so libs/libfastimg_android_arm64.so
mv .dart_tool/fast_image/shared/**/target/x86_64-linux-android/release/libfastimg.so libs/libfastimg_android_x86_64.so
mv .dart_tool/fast_image/shared/**/target/aarch64-unknown-linux-gnu/release/libfastimg.so libs/libfastimg_linux_aarch64.so
mv .dart_tool/fast_image/shared/**/target/x86_64-unknown-linux-gnu/release/libfastimg.so libs/libfastimg_linux_x86_64.so
- name: Build MacOS host
if: matrix.os == 'macos'
run: |
dart tool/build.dart -omacos -aarm64
dart tool/build.dart -omacos -ax64
dart tool/build.dart -oios -iiphoneos -aarm64
dart tool/build.dart -oios -iiphonesimulator -aarm64
dart tool/build.dart -oios -iiphonesimulator -ax64
mv .dart_tool/fast_image/shared/**/target/aarch64-apple-darwin/release/libfastimg.dylib libs/libfastimg_macos_arm64.dylib
mv .dart_tool/fast_image/shared/**/target/x86_64-apple-darwin/release/libfastimg.dylib libs/libfastimg_macos_x86_64.dylib
mv .dart_tool/fast_image/shared/**/target/aarch64-apple-ios/release/libfastimg.dylib libs/libfastimg_ios_arm64.dylib
mv .dart_tool/fast_image/shared/**/target/aarch64-apple-ios-sim/release/libfastimg.dylib libs/libfastimg_ios_sim_arm64.dylib
mv .dart_tool/fast_image/shared/**/target/x86_64-apple-ios/release/libfastimg.dylib libs/libfastimg_ios_sim_x86_64.dylib
- name: Build Windows host
if: matrix.os == 'windows'
run: |
dart tool/build.dart -owindows -aarm64
dart tool/build.dart -owindows -ax64
mv .dart_tool/fast_image/shared/**/target/aarch64-pc-windows-msvc/release/fastimg.dll libs/fastimg_windows_arm64.dll
mv .dart_tool/fast_image/shared/**/target/x86_64-pc-windows-msvc/release/fastimg.dll libs/fastimg_windows_x86_64.dll
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: ${{ matrix.os }}-host
path: packages/fast_image/libs/
if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/fast_image/
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: true
- name: Download assets
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
merge-multiple: true
path: packages/fast_image/libs/
- name: Display structure of downloaded assets
run: ls -R libs/
- name: Release
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836
if: startsWith(github.ref, 'refs/tags/fast_image')
with:
files: "packages/fast_image/libs/**"
fail_on_unmatched_files: true