From d24cab5ee5f2b5dac8e9d098d9ffd81276d0d2ff Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Thu, 20 Oct 2022 11:56:55 +0900 Subject: [PATCH] [ci] Remove build-docker.yml and clean up (#360) --- .github/workflows/build-docker.yml | 51 ------------------ .github/workflows/build.yml | 27 ++++++---- .github/workflows/check-symbol.yml | 1 + ci/tizen/docker/Dockerfile | 12 ----- ci/tizen/docker/build-docker.sh | 6 --- ci/tizen/gclient-prepare-sync.sh | 87 ------------------------------ 6 files changed, 18 insertions(+), 166 deletions(-) delete mode 100644 .github/workflows/build-docker.yml delete mode 100644 ci/tizen/docker/Dockerfile delete mode 100755 ci/tizen/docker/build-docker.sh delete mode 100755 ci/tizen/gclient-prepare-sync.sh diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml deleted file mode 100644 index 76c205b686739..0000000000000 --- a/.github/workflows/build-docker.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Build Docker - -on: - push: - branches: - - "flutter-*-tizen" - paths: - - ".github/workflows/build-docker.yml" - - "ci/tizen/docker/**" - - "DEPS" - workflow_dispatch: - -jobs: - builder: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: docker/setup-buildx-action@v2 - - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/build-push-action@v3 - with: - context: ci/tizen/docker - file: ci/tizen/docker/Dockerfile - push: true - tags: ghcr.io/${{ github.repository_owner }}/build-engine:latest - - 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_20211014.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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd573be83aed6..6bcdb18b8fd93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,14 +3,14 @@ name: Build on: push: branches: - - "flutter-*-tizen" + - flutter-*-tizen pull_request: jobs: build: runs-on: ubuntu-latest container: - image: ghcr.io/${{ github.repository_owner }}/build-engine:latest + image: ghcr.io/flutter-tizen/tizen-tools:latest credentials: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} @@ -48,9 +48,19 @@ jobs: restore-keys: | out-build-${{ env.OUTPUT_NAME }}- + - 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: gclient sync run: | - src/flutter/ci/tizen/gclient-prepare-sync.sh --reduce-deps --shallow-sync + gclient config --name=src/flutter --unmanaged https://github.com/flutter-tizen/engine + gclient setdep --var=download_android_deps=False --deps-file=src/flutter/DEPS + sed -i -e '/src\/ios_tools/,+2d' src/flutter/DEPS + sed -i -e '/src\/third_party\/angle/,+2d' src/flutter/DEPS + sed -i -e '/src\/fuchsia\/sdk/,+9d' src/flutter/DEPS + PYTHONPATH="$PWD/depot_tools" python3 src/flutter/ci/tizen/gclient-shallow-sync.py src/flutter/DEPS gclient sync -v --no-history --shallow - name: verify formatting @@ -121,7 +131,7 @@ jobs: if-no-files-found: error - uses: actions/upload-artifact@v3 - if: (matrix.arch == 'arm' || matrix.arch == 'arm64') && matrix.mode != 'debug' + if: matrix.mode != 'debug' with: name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64 path: src/out/${{ env.OUTPUT_NAME }}/clang_x64/gen_snapshot @@ -211,12 +221,11 @@ jobs: - name: install depot_tools run: | - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git echo "$PWD/depot_tools" >> $GITHUB_PATH - name: install required packages - run: | - brew install md5sha1sum + run: brew install md5sha1sum - name: gclient sync run: | @@ -276,11 +285,9 @@ jobs: name: tizen-arm-unittests - name: run unittests - env: - IMAGE_TAG: ghcr.io/${{ github.repository_owner }}/tizen-headed-armv7l run: | chmod +x flutter_tizen_unittests - docker run --rm -t -v `pwd`:/root ${IMAGE_TAG} /root/flutter_tizen_unittests + docker run --rm -t -v $PWD:/root ghcr.io/flutter-tizen/tizen-headed-armv7l /root/flutter_tizen_unittests release: needs: [windows-build, macos-build, test] diff --git a/.github/workflows/check-symbol.yml b/.github/workflows/check-symbol.yml index c2650951b1cc6..db751a384bec6 100644 --- a/.github/workflows/check-symbol.yml +++ b/.github/workflows/check-symbol.yml @@ -14,6 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: repository: flutter-tizen/tizen_allowlist diff --git a/ci/tizen/docker/Dockerfile b/ci/tizen/docker/Dockerfile deleted file mode 100644 index 72c3c3a187b13..0000000000000 --- a/ci/tizen/docker/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM ghcr.io/flutter-tizen/tizen-tools:latest - -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update -RUN apt-get install -y git curl pkg-config ca-certificates xz-utils python python3 python3-lib2to3 libncurses5 && \ - apt-get clean - -# Install depot tools. -ENV DEPOT_TOOLS_PATH=/usr/share/depot_tools -ENV PATH=$PATH:${DEPOT_TOOLS_PATH} -RUN git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git ${DEPOT_TOOLS_PATH} diff --git a/ci/tizen/docker/build-docker.sh b/ci/tizen/docker/build-docker.sh deleted file mode 100755 index 57bd591d42d93..0000000000000 --- a/ci/tizen/docker/build-docker.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -IMAGE_NAME=ghcr.io/flutter-tizen/build-engine -IMAGE_TAG=latest - -docker build --tag $IMAGE_NAME:$IMAGE_TAG . diff --git a/ci/tizen/gclient-prepare-sync.sh b/ci/tizen/gclient-prepare-sync.sh deleted file mode 100755 index 4219c57a3ede2..0000000000000 --- a/ci/tizen/gclient-prepare-sync.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# GCLIENT-PREPARE-SYNC # -# -# The `gclient sync` command takes a lot of time because it downloads overly -# many objects to perform builds. To reduce the sync time, this script provides -# following two methods: -# -# 1. Removing unnecesary dependencies. -# The DEPS describes unnecessary repositories to build the flutter-tizen, -# such as android, ios, fuchsia related things. By removing thease repositories -# not to download, the sync time can be shortened. -# -# 2. Shallow clone repositories. -# Even the `--no-history` option is used, the `gclient sync` fetches all objects -# of each repository. In CI build situations, these objects are wasted time and -# storage space. Before run `gclient sync`, these repositories can be shallow -# fetched by using `fetch --depth 1` to avoid these wastes. -# - -set -e - -DEPS=src/flutter/DEPS - -while [ $# -ne 0 ]; do - name=$1 - case "$name" in - --reduce-deps) - FLAG_REDUCE_DEPS=true - ;; - --shallow-sync) - FLAG_SHALLOW_SYNC=true - ;; - --deps) - shift - DEPS=$1 - ;; - -h | --help) - script_name="$(basename "$0")" - echo "Usage: $script_name [Options]" - echo " $script_name -h|-?|--help" - echo "" - echo "Options:" - echo " --deps [DEPS] Set DEPS file path. Default is \`$DEPS\`." - echo " --reduce-deps Remove unnecessary dependencies from DEPS." - echo " --shallow-sync Checkout git repositories with a single depth." - exit 0 - ;; - *) - echo "Unknown argument \`$name\`" - exit 1 - ;; - esac - - shift -done - -if [ ! -f $DEPS ]; then - echo "Could not find DEPS file. \`$DEPS\`" - exit 1 -fi - -cat >.gclient <