Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
37 changes: 25 additions & 12 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ jobs:
run: cmake -E make_directory ${{github.workspace}}/build

- name: Install Flutter Engine library
#run: |
# echo `curl https://raw.githubusercontent.com/flutter/flutter/master/bin/internal/engine.version` > embedder.version
# export FLUTTER_ENGINE=`cat embedder.version`
# curl -O https://storage.googleapis.com/flutter_infra/flutter/${FLUTTER_ENGINE}/linux-x64/linux-x64-embedder
# ls
# unzip linux-x64-embedder
# mv libflutter_engine.so ${{github.workspace}}/build
run: |
curl -L https://github.com/sony/flutter-embedded-linux/releases/latest/download/elinux-x64-release.zip > elinux-x64-release.zip
unzip elinux-x64-release.zip
echo `curl https://raw.githubusercontent.com/flutter/flutter/flutter-3.38-candidate.0/bin/internal/engine.version` > embedder.version
export FLUTTER_ENGINE=`cat embedder.version`
curl -O https://storage.googleapis.com/flutter_infra_release/flutter/${FLUTTER_ENGINE}/linux-x64/linux-x64-embedder.zip
ls
unzip linux-x64-embedder
mv libflutter_engine.so ${{github.workspace}}/build
#run: |
#curl -L https://github.com/sony/flutter-embedded-linux/releases/latest/download/elinux-x64-release.zip > elinux-x64-release.zip
#unzip elinux-x64-release.zip
#mv libflutter_engine.so ${{github.workspace}}/build

- name: Configure CMake for wayland client
shell: bash
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Configure CMake for drm backend with GBM
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-drm-gbm-backend ..
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=DRM-GBM -DUSER_PROJECT_PATH=examples/flutter-drm-gbm-backend ..

- name: Build for drm backend with GBM
working-directory: ${{github.workspace}}/build
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Configure CMake for drm backend with EGLStream
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-drm-eglstream-backend ..
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=DRM-EGLSTREAM -DUSER_PROJECT_PATH=examples/flutter-drm-eglstream-backend ..

- name: Build for drm backend with EGLStream
working-directory: ${{github.workspace}}/build
Expand All @@ -74,7 +74,7 @@ jobs:
- name: Configure CMake for x11 backend
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-x11-client ..
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=X11 -DUSER_PROJECT_PATH=examples/flutter-x11-client ..

- name: Build for x11 backend
working-directory: ${{github.workspace}}/build
Expand All @@ -90,3 +90,16 @@ jobs:
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE

- name: List build output files
working-directory: ${{github.workspace}}/build
shell: bash
run: ls ${{github.workspace}}/build

- name: Upload build artifacts
uses: actions/upload-artifact@v6
with:
name: build-artifacts
path: ${{github.workspace}}/build


104 changes: 104 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: build

on: [pull_request]

jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
build-type: [ Release, Debug, Profile ]

steps:
- uses: actions/checkout@v6

- name: Install libraries
run: |
sudo apt update
sudo apt install clang-format
sudo apt install libgles2-mesa-dev libegl1-mesa-dev libxkbcommon-dev libwayland-dev libdrm-dev libgbm-dev libinput-dev libudev-dev libsystemd-dev wayland-protocols libx11-dev

#- name: Verify formatting
#run: |
#find src/flutter/shell/platform/linux_embedded/ -iname *.h -o -iname *.cc | xargs clang-format --dry-run --Werror
#find src/client_wrapper -iname *.h -o -iname *.cc | xargs clang-format --dry-run --Werror

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Install Flutter Engine library
run: |
echo `curl https://raw.githubusercontent.com/flutter/flutter/flutter-3.38-candidate.0/bin/internal/engine.version` > embedder.version
export FLUTTER_ENGINE=`cat embedder.version`
curl -O https://storage.googleapis.com/flutter_infra_release/flutter/${FLUTTER_ENGINE}/linux-x64/linux-x64-embedder.zip
ls
unzip linux-x64-embedder
mv libflutter_engine.so ${{github.workspace}}/build
#run: |
#curl -L https://github.com/sony/flutter-embedded-linux/releases/latest/download/elinux-x64-release.zip > elinux-x64-release.zip
#unzip elinux-x64-release.zip
#mv libflutter_engine.so ${{github.workspace}}/build

- name: Configure CMake for wayland client
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DUSER_PROJECT_PATH=examples/flutter-wayland-client ..

- name: Build for wayland client
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config ${{ matrix.build-type }}

- name: Configure CMake for drm backend with GBM
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=DRM-GBM -DUSER_PROJECT_PATH=examples/flutter-drm-gbm-backend ..

- name: Build for drm backend with GBM
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config ${{ matrix.build-type }}

- name: Configure CMake for drm backend with EGLStream
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=DRM-EGLSTREAM -DUSER_PROJECT_PATH=examples/flutter-drm-eglstream-backend ..

- name: Build for drm backend with EGLStream
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config ${{ matrix.build-type }}

- name: Configure CMake for x11 backend
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=X11 -DUSER_PROJECT_PATH=examples/flutter-x11-client ..

- name: Build for x11 backend
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config ${{ matrix.build-type }}

- name: Configure CMake to build libflutter_elinux.so
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=WAYLAND ..

- name: Build libflutter_elinux.so
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config ${{ matrix.build-type }}

- name: List build output files
working-directory: ${{github.workspace}}/build
shell: bash
run: ls ${{github.workspace}}/build

- name: Upload build artifacts
uses: actions/upload-artifact@v6
with:
name: build-artifacts-${{ matrix.build-type }}
path: ${{github.workspace}}/build


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Embedded Linux (eLinux) embedding for Flutter
# Embedded Linux (eLinux) embedding for Flutter at Agtonomy
![image](https://github.com/sony/flutter-elinux/blob/main/doc/images/overview.png)

[![build-test](https://github.com/sony/flutter-embedded-linux/actions/workflows/build-test.yml/badge.svg)](https://github.com/sony/flutter-embedded-linux/actions/workflows/build-test.yml)
Expand Down