forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workflows] Add workflows for buliding and testing
- Loading branch information
1 parent
e0dc8d8
commit 8d56c8e
Showing
2 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |