diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d8dab48 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,60 @@ +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-20.04 + strategy: + matrix: + oe-version: [hardknott] + steps: + - name: Install dependencies + run: | + sudo apt-get -qq update + sudo apt-get -y -qq install gawk wget git-core diffstat unzip texinfo gcc-multilib \ + build-essential chrpath socat cpio python3 python3-pip python3-pexpect \ + xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \ + pylint3 xterm + - name: Install required layers + run: | + git clone --depth 1 -b ${{ matrix.oe-version }} https://git.yoctoproject.org/git/poky + cd poky + git clone --depth 1 -b ${{ matrix.oe-version }} https://github.com/openembedded/meta-openembedded.git + git clone --depth 1 -b ${{ matrix.oe-version }} git://github.com/kraj/meta-clang.git + - uses: actions/checkout@v2 + with: + path: 'poky/meta-codechecker' + # We can cache up to 5Go + # So we cache only sstate-cache and not the download directory + - name: Cache sstates + uses: actions/cache@v2 + with: + path: | + poky/build/sstate-cache + key: ${{ matrix.oe-version }} + - name: Run bitbake + run: | + cd poky + source oe-init-build-env + bitbake-layers add-layer ../meta-openembedded/meta-oe + bitbake-layers add-layer ../meta-openembedded/meta-python + bitbake-layers add-layer ../meta-clang + bitbake-layers add-layer ../meta-codechecker + bitbake simple-helloworld + - name: Archive results + uses: actions/upload-artifact@v2 + with: + name: codechecker-report + path: poky/build/tmp/deploy/CodeChecker + if-no-files-found: error + \ No newline at end of file