From 7a9b817cc144d4daf31af281825f25889b2d549d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 15 Sep 2020 00:36:24 -0700 Subject: Add support for github actions Signed-off-by: Khem Raj --- .drone.yml | 83 ----------------------------------------------- .github/workflows/yoe.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 80 insertions(+), 84 deletions(-) delete mode 100644 .drone.yml create mode 100644 .github/workflows/yoe.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index a96ba46..0000000 --- a/.drone.yml +++ /dev/null @@ -1,83 +0,0 @@ -kind: pipeline -type: exec -name: arm64 - -platform: - os: linux - arch: arm64 - -clone: - disable: false - -trigger: - branch: - - master - event: - - push - - pull_request - -steps: - - name: build - commands: - - git clone --recurse-submodules -j8 git://github.com/YoeDistro/yoe-distro.git yoe - - cd yoe - - git checkout -b test origin/master - - git pull - - git submodule update --recursive --init - - rm -rf sources/meta-clang - - ln -sf `pwd`/../ sources/meta-clang - - export DOCKER_REPO=none - - export LANG=en_US.UTF-8 - - export SSTATE_CACHE_DIR=/scratch/sstate-cache - - echo "Started build# $DRONE_BUILD_NUMBER" - - echo "sstate cache dir = $SSTATE_CACHE_DIR" - - echo "building $DRONE_GIT_HTTP_URL, branch $DRONE_SOURCE_BRANCH" - - echo export DOCKER_REPO=none > local.sh - - echo export LANG=en_US.UTF-8 >> local.sh - - echo export SSTATE_CACHE_DIR=/scratch/sstate-cache >> local.sh - - cp conf/local.conf.sample conf/local.conf - - echo SSTATE_DIR = \"$SSTATE_CACHE_DIR\" >> conf/local.conf - - echo IMAGE_CLASSES += \"testimage testsdk\" >> conf/local.conf - - echo INHERIT += \"report-error rm_work blacklist\" >> conf/local.conf - - echo ERR_REPORT_SERVER = \"errors.yoctoproject.org\" >> conf/local.conf - - echo ERR_REPORT_PORT = \"80\" >> conf/local.conf - - echo ERR_REPORT_USERNAME = \"Drone Autobuilder\" >> conf/local.conf - - echo ERR_REPORT_EMAIL = \"info@yoedistro.org\" >> conf/local.conf - - echo TOOLCHAIN = \"clang\" >> conf/local.conf - - echo CLANGSDK = \"1\" >> conf/local.conf - - echo IMAGE_INSTALL_append = \" clang \" >> conf/local.conf - - echo XZ_DEFAULTS = \"--threads=8\" >> conf/local.conf - - echo LICENSE_FLAGS_WHITELIST_append = \" commercial non-commercial\" >> conf/local.conf - #- echo TESTIMAGE_AUTO_qemuall = \"1\" >> conf/local.conf - - /bin/bash -c ". ./qemux86-64-envsetup.sh && bitbake yoe-debug-image -cpopulate_sdk" - - /bin/bash -c ". ./qemux86-64-envsetup.sh && ./sources/openembedded-core/scripts/sstate-cache-management.sh -d -y" ---- -kind: pipeline -type: exec -name: cleanup - -platform: - os: linux - arch: arm64 - -clone: - disable: true - -trigger: - branch: - - master - event: - - push - - pull_request - status: - - success - - failure - -steps: -- name: clean - commands: - - echo "Deleting tmpdir for build# $DRONE_BUILD_NUMBER" - - rm -rf /scratch/tmp-clang-$DRONE_BUILD_NUMBER - -depends_on: -- arm64 diff --git a/.github/workflows/yoe.yml b/.github/workflows/yoe.yml new file mode 100644 index 0000000..bdb4c30 --- /dev/null +++ b/.github/workflows/yoe.yml @@ -0,0 +1,79 @@ +name: Yoe Distro CI + +on: + # Trigger the workflow on push or pull request, + # but only for the master branch + push: + branches: + - master + - dunfell + pull_request: + branches: + - master + - dunfell +jobs: + build: + name: Yoe Build + runs-on: [self-hosted, Linux] + timeout-minutes: 720 + steps: + - name: Checkout + uses: actions/checkout@v2.3.2 + with: + fetch-depth: 0 + submodules: recursive + - name: checkout yoe + run: | + git clone --recurse-submodules -j8 -b master git://github.com/YoeDistro/yoe-distro.git yoe + cd yoe + git checkout master + git pull + git submodule update --recursive --init + rm -rf sources/meta-clang + rsync -av --progress --exclude="yoe" `pwd`/../ sources/meta-clang/ + - name: Setup + run: | + cd yoe + export DOCKER_REPO=none + export LANG=en_US.UTF-8 + export SSTATE_CACHE_DIR=/scratch/sstate-cache + echo export DOCKER_REPO=none > local.sh + echo export LANG=en_US.UTF-8 >> local.sh + echo export SSTATE_CACHE_DIR=/scratch/sstate-cache >> local.sh + cp conf/local.conf.sample conf/local.conf + echo SSTATE_DIR = \"$SSTATE_CACHE_DIR\" >> conf/local.conf + echo IMAGE_CLASSES += \"testimage testsdk\" >> conf/local.conf + echo INHERIT += \"report-error rm_work\" >> conf/local.conf + echo ERR_REPORT_SERVER = \"errors.yoctoproject.org\" >> conf/local.conf + echo ERR_REPORT_PORT = \"80\" >> conf/local.conf + echo ERR_REPORT_USERNAME = \"Drone Autobuilder\" >> conf/local.conf + echo ERR_REPORT_EMAIL = \"info@yoedistro.org\" >> conf/local.conf + echo TOOLCHAIN = \"clang\" >> conf/local.conf + echo CLANGSDK = \"1\" >> conf/local.conf + echo IMAGE_INSTALL_append = \" clang \" >> conf/local.conf + echo XZ_DEFAULTS = \"--threads=8\" >> conf/local.conf + echo SDKMACHINE = \"aarch64\" >> conf/local.conf + /bin/bash -c "sed -i -e 's/PACKAGE_FEED_URI.*$//' conf/site.conf" + /bin/bash -c "sed -i -e 's/SDK_UPDATE_URL.*$//' conf/site.conf" + /bin/bash -c "sed -i -e 's/backend=fbdev-backend.so.*$//' sources/openembedded-core/meta/recipes-graphics/wayland/weston-init/qemuall/weston.ini" + - name: Build Image + run: | + cd yoe + /bin/bash -c ". ./qemuarm64-envsetup.sh && bitbake yoe-qt5-image yoe-sdk-image yoe-debug-image" + - name: Build SDK + run: | + cd yoe + /bin/bash -c ". ./qemuarm64-envsetup.sh && bitbake yoe-debug-image -cpopulate_sdk_ext" + - name: Test Image + run: | + cd yoe + echo TESTIMAGE_AUTO_qemuall = \"1\" >> conf/local.conf + /bin/bash -c ". ./qemuarm64-envsetup.sh && bitbake yoe-sdk-image" + - name: Prepare results + run: | + cd yoe + /bin/bash -c ". ./qemuarm64-envsetup.sh && resulttool report build/tmp/log/oeqa" + - name: Clean shared state + run: | + cd yoe + /bin/bash -c ". ./qemuarm64-envsetup.sh && ./sources/openembedded-core/scripts/sstate-cache-management.sh -d -y" diff --git a/README.md b/README.md index ee5d341..3990731 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://drone.yoedistro.org/api/badges/kraj/meta-clang/status.svg)](https://drone.yoedistro.org/kraj/meta-clang) +![Yoe Distro CI](https://github.com/kraj/meta-clang/workflows/Yoe%20Distro%20CI/badge.svg?branch=master) # meta-clang (a C language family frontend and LLVM compiler backend) -- cgit v1.2.3-54-g00ecf