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

[workflows] Add workflows for buliding and testing #2

Closed
wants to merge 1 commit into from
Closed
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
79 changes: 79 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build

on:
push:
branches:
- 'flutter-*-tizen'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/flutter-tizen/build-engine:latest
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

strategy:
matrix:
arch: [arm, arm64, x86]
mode: [debug, release, profile]
include:
- arch: arm
triple: armv7l-tizen-linux-gnueabi
- arch: arm64
triple: aarch64-tizen-linux-gnu
- arch: x86
triple: i586-tizen-linux-gnueabi
exclude:
- arch: x86
mode: release
- arch: x86
mode: profile

env:
CACHE_PATH: src/out/linux_${{ matrix.mode }}_${{ matrix.arch }}
CACHE_PREFIX: out-build-linux_${{ matrix.mode }}_${{ matrix.arch }}

steps:
- uses: actions/checkout@v2
with:
path: src/flutter

- uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATH }}
key: ${{ env.CACHE_PREFIX }}-${{ github.sha }}
restore-keys: |
${{ env.CACHE_PREFIX }}-

- name: gclient sync
run: |
gclient-prepare-sync.sh --reduce-deps --shallow-sync
gclient sync -v --no-history --shallow

- name: build
run: |
cache-checksum.sh restore $CACHE_PATH
build-engine.sh \
--target-os linux \
--target-arch ${{ matrix.arch }} \
--target-triple ${{ matrix.triple }} \
--runtime-mode ${{ matrix.mode }}
cache-checksum.sh save $CACHE_PATH

- uses: actions/upload-artifact@v2
with:
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}
path: src/out/linux_${{ matrix.mode }}_${{ matrix.arch }}/libflutter_*.so

- uses: actions/upload-artifact@v2
if: matrix.arch == 'arm' && matrix.mode == 'release'
with:
name: tizen-common
path: |
src/out/linux_release_arm/icu
src/out/linux_release_arm/public
src/out/linux_release_arm/cpp_client_wrapper
!src/out/linux_release_arm/cpp_client_wrapper/engine_method_result.cc
52 changes: 52 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Unit Tests

on:
push:
branches:
- 'flutter-*-tizen'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/flutter-tizen/build-engine:latest
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

env:
CACHE_PATH: src/out/host_debug
CACHE_PREFIX: out-build-host_debug

steps:
- uses: actions/checkout@v2
with:
path: src/flutter
fetch-depth: 0

- uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATH }}
key: ${{ env.CACHE_PREFIX }}-${{ github.sha }}
restore-keys: |
${{ env.CACHE_PREFIX }}-

- name: gclient sync
run: |
gclient-prepare-sync.sh --reduce-deps --shallow-sync
gclient sync -v --no-history --shallow

- name: check format
run: |
src/flutter/ci/format.sh

- name: build for testing
run: |
cache-checksum.sh restore $CACHE_PATH
build-engine.sh --build-target flutter_tizen_unittests
cache-checksum.sh save $CACHE_PATH

- name: run unittests
run: |
$CACHE_PATH/flutter_tizen_unittests