-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
292 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,34 @@ | ||
name: Analyze | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: src | ||
|
||
- name: Install depot_tools | ||
run: | | ||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||
echo "$PWD/depot_tools" >> $GITHUB_PATH | ||
- name: Run gclient sync | ||
run: | | ||
pip3 install requests | ||
gclient config --name=src --unmanaged https://github.com/${{ github.repository }} | ||
gclient sync -v --no-history --shallow --nohooks | ||
- name: Verify C/C++ formatting | ||
working-directory: src | ||
run: | | ||
FILES=$(git ls-files -- '*.h' '*.cc' '*.cpp' | grep -v /third_party/) | ||
third_party/clang/bin/clang-format --style=file --dry-run --Werror $FILES | ||
- name: Verify GN formatting | ||
working-directory: src | ||
run: | | ||
FILES=$(git ls-files -- '*.gn' '*.gni') | ||
third_party/gn/gn format --dry-run $FILES |
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,26 @@ | ||
name: Build Docker | ||
|
||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
testbed: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
env: | ||
REPO_URL: http://download.tizen.org/releases/milestone/tizen/unified | ||
BUILD_ID: tizen-unified_20220517.1 | ||
IMAGE: tizen-headed-armv7l | ||
run: | | ||
wget -q ${REPO_URL}/${BUILD_ID}/images/standard/${IMAGE}/${BUILD_ID}_${IMAGE}.tar.gz | ||
tar -zxf ${BUILD_ID}_${IMAGE}.tar.gz | ||
mkdir rootfs | ||
sudo mount rootfs.img rootfs | ||
sudo tar -cC rootfs . | docker import - ghcr.io/${{ github.repository_owner }}/${IMAGE} | ||
sudo umount rootfs | ||
docker push ghcr.io/${{ github.repository_owner }}/${IMAGE}:latest |
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,158 @@ | ||
name: Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
matrix: | ||
api-version: [5.5, 6.5] | ||
arch: [arm, arm64, x86] | ||
include: | ||
- arch: arm | ||
triple: arm-linux-gnueabi | ||
- arch: arm64 | ||
triple: aarch64-linux-gnu | ||
- arch: x86 | ||
triple: i686-linux-gnu | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: src | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: src/sysroot* | ||
key: sysroot-${{ matrix.api-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y rpm2cpio cpio binutils-${{ matrix.triple }} | ||
pip3 install requests | ||
- name: Install depot_tools | ||
run: | | ||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||
echo "$PWD/depot_tools" >> $GITHUB_PATH | ||
- name: Run gclient sync | ||
run: | | ||
gclient config --name=src --unmanaged https://github.com/${{ github.repository }} | ||
gclient sync -v --no-history --shallow | ||
- name: Generate Tizen 6.5 sysroot | ||
if: ${{ matrix.api-version == 6.5 }} | ||
run: src/tools/generate_sysroot.py --api-version 6.5 --out src/sysroot-6.5 | ||
|
||
- name: Build for Tizen 5.5 | ||
if: ${{ matrix.api-version == 5.5 }} | ||
run: | | ||
src/tools/gn \ | ||
--target-cpu ${{ matrix.arch }} \ | ||
--target-toolchain /usr/lib/llvm-14 \ | ||
--target-dir build | ||
ninja -C src/out/build | ||
- name: Build for Tizen 6.5 | ||
if: ${{ matrix.api-version == 6.5 }} | ||
run: | | ||
src/tools/gn \ | ||
--target-cpu ${{ matrix.arch }} \ | ||
--target-toolchain /usr/lib/llvm-14 \ | ||
--target-sysroot src/sysroot-6.5/${{ matrix.arch }} \ | ||
--api-version 6.5 --system-cxx \ | ||
--target-dir build | ||
ninja -C src/out/build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }} | ||
path: src/out/build/libflutter_tizen*.so | ||
if-no-files-found: error | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}_unittests | ||
path: src/out/build/flutter_tizen_unittests | ||
if-no-files-found: error | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}_symbols | ||
path: src/out/build/so.unstripped/libflutter_tizen*.so | ||
if-no-files-found: error | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: ${{ matrix.arch == 'arm' && matrix.api-version == 5.5 }} | ||
with: | ||
name: tizen-common | ||
path: | | ||
src/out/build/cpp_client_wrapper | ||
src/out/build/icu | ||
src/out/build/public | ||
if-no-files-found: error | ||
|
||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: arm | ||
|
||
- uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: tizen-5.5-arm_unittests | ||
|
||
- name: Download engine | ||
run: | | ||
python3 tools/download_engine.py | ||
cp engine/arm/libflutter_engine.so . | ||
rm -rf engine | ||
- name: Run tests | ||
run: | | ||
chmod +x flutter_tizen_unittests | ||
docker run --rm -t -v $PWD:/root ghcr.io/flutter-tizen/tizen-headed-armv7l /root/flutter_tizen_unittests | ||
release: | ||
needs: test | ||
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/download-artifact@v3 | ||
|
||
- name: Create archives | ||
run: | | ||
rm -r *_unittests | ||
for name in tizen-*; do | ||
7z a $name.zip ./$name/* | ||
done | ||
- name: Set variable | ||
run: echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV | ||
|
||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
name: tizen-embedder-${{ env.SHORT_SHA }} | ||
tag_name: ${{ env.SHORT_SHA }} | ||
target_commitish: ${{ github.sha }} | ||
files: tizen-*.zip | ||
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} |
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,65 @@ | ||
name: Check symbols | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Build | ||
types: | ||
- completed | ||
|
||
jobs: | ||
check: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
repository: flutter-tizen/tizen_allowlist | ||
token: ${{ secrets.TIZENAPI_TOKEN }} | ||
path: tizen_allowlist | ||
|
||
- name: Download artifacts | ||
uses: TizenAPI/tizenfx-build-actions/download-workflow-artifacts@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
run-id: ${{ github.event.workflow_run.id }} | ||
name: tizen-5.5-arm | ||
path: artifacts | ||
|
||
- name: Check symbols | ||
run: | | ||
python3 tools/check_symbols.py \ | ||
--allowlist=tizen_allowlist/4.0.0_native_whitelist_wearable_v12.txt \ | ||
artifacts/libflutter_tizen_wearable.so | ||
- name: Commit success status | ||
if: ${{ success() }} | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
github.rest.repos.createCommitStatus({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
sha: context.payload.workflow_run.head_sha, | ||
context: 'Check symbols', | ||
state: 'success', | ||
description: 'All symbols are valid', | ||
}); | ||
- name: Commit failure status | ||
if: ${{ failure() }} | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
github.rest.repos.createCommitStatus({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
sha: context.payload.workflow_run.head_sha, | ||
context: 'Check symbols', | ||
state: 'failure', | ||
description: 'Failed in checking symbols', | ||
target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}', | ||
}); |
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