Skip to content

Commit

Permalink
[workflows] Add workflows for buliding and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
WonyoungChoi committed Sep 9, 2021
1 parent e0dc8d8 commit 2a9582b
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 0 deletions.
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: |
out/linux_release_arm/icu
out/linux_release_arm/public
out/linux_release_arm/cpp_client_wrapper
!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

0 comments on commit 2a9582b

Please sign in to comment.